Important Instructions for Trading Bot
You can create a trading strategy using the Trading Bot via either the “Strategies” tab of the Control Center or from a Chart.
How to create a strategy from the Strategies tab
-
Left mouse click on the Strategies tab found in the NinjaTrader Control Center
-
Right mouse click within the Strategies tab. The right click menu will appear.
-
Select the menu item New Strategy... The New Strategy window will appear.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4. Choose the strategy you wish to run from the list of Available strategies on the left
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5. Set the account, instrument, trading intervals, and other strategy parameters.
6. Once the setup of parameters is completed, Click the OK button, the created strategy will appear on the Strategies tab.
​
​
​
​
​
​
​
​
​
​
​
​
​
7. Check the box in the Enable column of the Strategies tab next to the strategy you wish to enable.
Here is a video showing how to create a trading strategy from the Strategies tab
​
​
​
​
​
​
​
​
​
​
​
​
​
How to create a strategy from the Chart
-
Open Up a 1-second Chart
-
​Open up a Data Series window by clicking on Chart under NinjaTrader Control Center>New..
-
Select the instrument of interest in the Instrument drop down menu.
-
On the right panel, making sure the following setups.
Under Data Series section, set the parameters “Price based on” to Last, “Type” to Second, and “Value” to 1.
Under Time frame section, set the parameters “Load data based on” to Days, “Days to load” to 1.
Under Chart style section, set Chart style to Candlestick.
-
Leave other parameters as defaults.
-
Click OK button, a Chart window will open showing the market prices.
Here is a video showing how to create a 1-second Chart
​
​
​
​
​
​
​
​
​
​
​
​
​
2. Select either the Strategies menu from within the right click menu on the chart area or the Strategies icon from the chart tool bar.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3. Select a strategy of interest in the "Available" section, then click the add button. Alternatively, you can double-click any strategy listed in the "Available" section.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4. Once the selected strategy is added to the "Configured" section, set any strategy properties in the Properties section to your desired settings.
5. Press the OK button, the created strategy is added to the Strategies tab in the NinjaTrader Control Center.
​
​
​
​
​
​
​
​
​
​
​
​
6. Check the box in the Enable column of the Strategies tab next to the strategy you wish to enable..
Here is a video showing how to create a strategy from the Chart
​
​
​
​
​
​
​
​
​
​
​
​
​
Understanding Strategy Parameters
IATB - an automated trading software developed to assist traders in making well-informed trading decisions as to how and when to enter the markets in order to improve trading consistency. The software is fully automated but flexible enough to be customized for a wide range of specific strategies that can be setup via GUI (Graphic User Interface). Parameters for a strategy of interest must be defined and input prior to launching the trading software. Such parameters together with the initial setup are classified into 11 sections in the GUI settings as shown below.
​
-
Algo IATB:NT8
-
Bot Trading Mode
-
Entry Strategy
-
Exit Strategy
-
Trading Time Frame
-
Window Output Tab
-
Data Series
-
Time Frame
-
Setup
-
Historical fill processing
-
Order properties
​
Each of these sections can be expanded into a specific class of parameters fully listed and explained in the following section.
It is important to note here that this user guide assumes users are already familiar with the basic acronyms and abbreviations used in trading.
-
Algo IATB:NT8
Version: Shows the trading Bot commercial option in gray color.​​
2. Bot Trading Mode
Direction:
Long: restrict to entry Long position only
Short: restrict to entry Short position only
LongShort: No restriction, entry either Long or Short positions
Copy trades:
number of sub-accounts(0,if imported from a file): Specify the number of sub-accounts (up to 100 sub-accounts) to copy trades
created from the main account. if 0 is input, the file (full path) containing
sub-account names is specified.
sub-account 1: Dropdown menu showing a list of accounts to select from.
entry order size: The order quantity of account #1.
entries per direction: The maximum number of entries allowed per direction for account #1.
exit sub-act position: Check if account #1 has opening position (existed prior to launching the trading Bot) to be exited.
sub-account 2: Dropdown menu showing a list of accounts to select from.
entry order size: The order quantity of account #2.
entries per direction: The maximum number of entries allowed per direction for account #2.
exit sub-act position: Check if account #2 has opening position (existed prior to launching the trading Bot) to be exited.
.
.
.
Lock account:
Initial account value ($): Balance of an account prior to launching the Bot.
Max trailing drawdown ($): The maximum amount of either loss or earned profit given back to market to protect accrued earning
Remaining drawdown ($): The remaining drawdown before the account hits the maximum trailing drawdown.
Profit target ($): The point at which all trades are exited for a positive gain meeting the specified target. All active orders are canceled and Bot is terminated.
Positions to close (inst1, inst2,…): List of opening positions to be closed as either Max trailing drawdown, Remaining drawdown, or Profit target is met.
Risk-reward:
risk to reward ratio (risk:reward): The ratio of risk to reward in any given trade
risk (Mkt. price units): The amount of risk in market price units (points)
custom stoploss: Allows initial stoploss to be trailed up with accrued profits
breakeven:
profit trigger (Mkt. price units): The amount of profit required to move the Stop Loss to a breakeven level
plus (Mkt. price units): The amount added to the breakeven (average entry price of the opening position)
trailing:
profit trigger (Mkt. price units): The amount of profit required to enable auto trailing.
trail offset (Mkt. price units): The trailing offset value.
cash register sound: Check to activate cash-register sound.
singleTrade: Check to limit the number of trades to 1.
crossing angle by ticks (0-5): The angle of the crossover measured in ticks
fee/order/side ($): Commission fee per order per side (buyer and seller)
fee/unit(contract,lot,share)/side ($): Commission fee per unit per side
voice announcement: Check to activate voice announcement with the choice of either male or female voices.
3. Entry Strategy
entry signal: A complete list of entry signals users can chose from when purchasing renting options.
candlestick: 16 basic plus 4 advanced candlestick patterns.
trending: Identify trend directions based on candles count
indicator: Crossover between fast and slow moving average indicators
tripleEMA: Triple EMA (Not TEMA indicator) - 3 EMA lines with crossovers in alignment with SQZM, MACD, RSI
trndRev: Trend Reversal - Method to identify potential trend reversal setups
tripleRSI: Analysis of RSI simultaneously on 3 different intervals
priRSIMACDtb: Alignment of either tops or bottoms of prices, RSI, and MACD
sdZones: Supply Demand Zones - Method to continuously find and update supply and demand zones
chaikinVOL: Chaikin Volume - Method to monitor the flow of money in and out the market and momentum
bollinger: Bollinger Bands - Simple method to identify riding, breakout and trend reversal
​
Each entry signal has a few basic parameters required user input. Such parameters are listed and explained as below:
RSI high (rsi>high:Short): Overbought value of Relative Strength Index (RSI)
RSI low (rsi<low:Long): Oversold value of Relative Strength Index (RSI)
entry downtrend: The minimum number of consecutive bearish bars
entry uptrend: The minimum number of consecutive bullish bars
entry fast: Smaller lookback period
entry slow: Larger lookback period
short period: Small period
mid period: Medium period
long period: Large period
min # red bars(<=4): Short: Minimum number of red bars
min # green bars(<=4): Long: Minimum number of green bars
money Flow Coefficient(0-1): The maximum distance between either green bar Close and High or red bar Close and Low
relative to range (High - Low)
No. of SDs: Number of standard deviations..
time-frame: The interval based on which main signals are calculated
Type:
Value:
confirm time-frame: The interval based on which confirm signals are calculated to confirm main signals
Type:
Value:
entry order size: The order quantity.
entries per direction: The maximum number of entries allowed per direction.
position size limit: The maximum quantity of the opening position
entries cascading: Subsequent entries are placed as additional profit since last entry exceeds the specified reward.
cascade risk(% of reward<=50): The position is exited as the market adversely moves and hits the specified percent
of reward offset from the last entry.
4. Exit Strategy
exit by session close:
session close time(hh(24):mm:ss): Determines the time of the current trading session
exit loss(%):: The maximum loss allowed on exiting a position
exit time(m): The elapsed time prior to the session close time in minutes. After this time, all opening positions with entry fills losing
below exit loss(%) will be exited.
5. Trading Time frame
period: Specify a trading period.
range: Specify start date/time and end date/time of a trading period
start date: Specify the date in MM/DD/YYYY format to start trading
start time(hh(24):mm:ss): Specify the time in hh(24):mm:ss format to start trading
end date: Specify the date in MM/DD/YYYY format to end trading
end time(hh(24):mm:ss): Specify the time in hh(24):mm:ss format to end trading
span:
time span(d,hh(24),mm,ss): Determines the run time of the trading Bot (d = No. of days)
intervals: Specify up to three separate or none-overlapsed trading intervals
interval 1:
start time(hh(24):mm:ss): Specify the start time in hh(24):mm:ss format for interval 1
end time(hh(24):mm:ss): Specify the end time in hh(24):mm:ss format for interval 1
interval 2:
start time(hh(24):mm:ss): Specify the start time in hh(24):mm:ss format for interval 2
end time(hh(24):mm:ss): Specify the end time in hh(24):mm:ss format for interval 2
interval 3:
start time(hh(24):mm:ss): Specify the start time in hh(24):mm:ss format for interval 3
end time(hh(24):mm:ss): Specify the end time in hh(24):mm:ss format for interval 3
6. Window output tab
Two tabs available to display information messages in real time while trading Bot is running.
Output window can be opened by selecting NinjaScript Output under New menu item in the Control Center window
7. Date Series
Instrument: A drop down list of various instruments at the top and various classes of securities at the bottom
Price based on: Sets the type of market data used to drive the Data Series including (Last, Bid, and Ask)
Type: Sets the bar type of the Data Series including (Tick, Volume, Range, Time, and a variety of other bar types)
Value: Sets the Data Series value, based on the selected Bar Type
8. Time frame
Days to load: Determines how much historical data is loaded for processing prior to transitioning to real-time
9. Setup
Account: A drop down menu of accounts to choose from for trading
Calculate: Determines how often the trading Bot processes real-time market data including (OnBarClose, OnEachTick, OnPriceChange)
Label: Input text field allowing uses to label each run.
10. Historical fill processing
Order fill resolution: Historical fill processing is only for historical backtests.
Standard: This is the default setting, which is recommended for backtests
High: Allow to set a secondary bar series to be used as the price data to fill orders.
11. Order properties
Time in force: A special instruction used when placing a trade to indicate how long an order will remain active
before it is executed or expires. Three options can be selected including (DAY, GTC, GTD)
DAY: Orders are canceled if not executed by the close of the trading day. These are often the default Time in force (TIF) for
brokerage accounts.
GTC: Orders are effective until executed or canceled
GTD: Order will remain working within the system and in the marketplace until it executes or until the close of the market on
the date specified.