[go: up one dir, main page]

0% found this document useful (0 votes)
72 views7 pages

Trading Levels Algo Setup

The document outlines the setup process for the Trading Levels Algo bot, including recommendations for using a VPS, installing NinjaTrader, and configuring the bot's settings. It emphasizes the importance of risk management when running the bot unattended and provides troubleshooting tips for potential issues such as stop loss rejections and broker connection timeouts. Daily maintenance practices are also suggested to ensure a stable trading environment.

Uploaded by

Gaston Ferrari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views7 pages

Trading Levels Algo Setup

The document outlines the setup process for the Trading Levels Algo bot, including recommendations for using a VPS, installing NinjaTrader, and configuring the bot's settings. It emphasizes the importance of risk management when running the bot unattended and provides troubleshooting tips for potential issues such as stop loss rejections and broker connection timeouts. Daily maintenance practices are also suggested to ensure a stable trading environment.

Uploaded by

Gaston Ferrari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Trading Levels Algo Setup

VPS/Host
This bot is not a high-frequency trading bot, and trades largely using limit/bracket orders.
What this means is the environment running it doesn’t need to be particularly special. Just
make sure you have sufficient memory and meet the NT recommended specs. You can run
the bot on your home computer if you wish but I personally use a VPS as it allows the bot to
be setup to trade everyday, without any setup needed on your part. VPS location isn’t
critical but ideally, something on the east coast of the US/Canada is best. I use Canada
east myself. The company I use is OVH and I use the following VPS.
Installing Ninjatrader
Get the latest installed from their website (accessible once you log into your account).

Any issues refer to https://support.ninjatrader.com/s/article/NinjaTrader-Desktop-


Installation-Guide?language=en_US

Connect to Broker
https://support.ninjatrader.com/s/article/Connecting-to-Your-Account-NinjaTrader-
Desktop?language=en_US
Installing plugin
Install the provided NinjaTrader plugin for TradingLevelsAlgo following the guide below.

https://support.ninjatrader.com/s/article/How-Can-I-Import-Indicators-and-Strategies-
into-NinjaTrader-Desktop?language=en_US

Setup Charts
Either use the existing base chart provided with NT or create a new chart. The only settings
you need to change is the data series settings as below.

Key values to note are it should be on the 3min timeframe, load 20 days of past data and
select MNQ (the latest contract needs to be chosen. Right now it will be 12-24, but it will
need to be rolled to next year at some point. I will let you know when to roll).
Adding License
The license is driven from my side so I just need your NT machine ID as below, and I will
license you. This is accessed from the About page.

Adding/Configuring Strategy
The strategy needs to be added to the chart you previously configured. This can be done by
right clicking and clicking on strategies. Then double click on TradingLevelsAlgo
Settings
The only settings you need to change when using this bot is your account and number of
contracts. If you wish you can adjust max loss and max gain but I do not recommend
changing the other settings. Most of these settings have been exposed largely for
backtesting and so it's easier for me to send optimisations to users. However if you are an
advanced user, I am happy to explain the settings as there are situations where adjusting
the options could be advantageous (though I personally very rarely change from defaults).

Trading
Enable the bot in the strategy tab and you should see it go green. It is now ready to go. The
dashboard displayed will show you the status of the bot. The PnL that is displayed will not
be perfect due to the way NT works and if you deselect the bot during the day and restart it,
the PnL can shift a bit as NT will calculate this now using historical data rather than live
data. The bot runs 9am – 4pm EST but has filters for specifics times and days.
Setting Daily Gain/Loss Limits
This bot is designed to run largely unattended. When you run any sort of bot unattended it
is import to use risk settings on your account. Ninjatrader is a reliable product and I run it
unattended a lot but like any piece of software you are always at risk of bugs. The purpose
of using risk settings is so if NT disconnects from your broker, your trades will not be
allowed to destroy your account. This also protects the bot from doing the same (as the bot
does use risk settings, but also NT can calculate PnL differently from the broker, so
sometimes they can drift).

I recommend setting a daily gain limit just above the bots target gain for the day. So if you
are running $500 daily gain, set the risk setting at $600. Same for the loss limit. Once the
loss/gain limit hit, NT will automatically liquidate your account. This liquidation will stay in
effect until end of the trading day. This will cause errors on the bot if it tries to keep trading
but this isn’t a issue. Your broker settings always override the bot and NinjaTrader.

Refer to: https://support.ninjatrader.com/s/article/Risk-Settings?language=en_US

I personally will review the bot during the day as it runs on my VPS. I recommend you do the
same, especially as you get comfortable. If you need assistance on setting up a VPS RDP
on your mobile, please get in touch.

Issues/Potential Bugs
Stop loss rejected

You may encounter the following error message. This means the bot has attempted to
place the stoploss above market so it got rejected. This shouldn’t really happen (I have
tested about 40 days of historical trade data with every release) but there are edge cases
where it can happen especially if the broker has a delay (think of it as the close of a bar is at
20000, so the SL is meant to go to 19998, but by the time the broker gets the command,
price has already moved below).
The way NT handles this kind of error, is the strategy is cancelled, and it attempts to close
all the trades. If you see this, first ok the error and then check your account is flat, with no
working orders. If so, you should be safe to then restart.

Broker Connection Timeout

This is caused by the broker connection dropping out to NT. If this happens, it means your
account is no longer synchronized with the bot. The first thing you should do here is
reconnect to the broker, and ensure the open positions are all closed. This shouldn’t
typically happen with Ninjatrader brokerage, but it is important to be aware that when this
happens, you are at risk of being in a losing position without the bot knowing. This is why
we need to always use the risk settings when trading unattended.

https://support.ninjatrader.com/s/article/Close-operation-failed-to-manually-close-your-
position?language=en_US#:~:text=Cause%20and%20Symptoms,computer%20and%20th
e%20brokerage%20servers.

Daily Maintenance
While this isn’t required, I personally like to disconnect and reconnect the connection to
the broker in the evening after the start of the new session (6PM EST). This just ensure that
there is no issues with the broker connection.

You might also like