Troubleshooting
In this section we'll highlight and explain the most common issues you may encounter that require troubleshooting; including formatting issues and nuances when using ATM strategies.
Last updated
In this section we'll highlight and explain the most common issues you may encounter that require troubleshooting; including formatting issues and nuances when using ATM strategies.
Last updated
To help with Troubleshooting issues we offer a free TradingView indicator that will force signals to be generated on every bar. When using this with the trigger "Once per bar close" each bar will send a single alert.
Be sure to also use the "flatten_first=true;" in your Alert Message so that each bar opens a new position.
Similarly to the Test Indicator, this strategy is designed to provide a code example of how to establish buy and sell signals that utilize the {{strategy.order.action}} variable, as well as provide a way to test your alerts using the variable in place of the BUY or SELL in your Action field. (e.g. action={{strategy.order.action}} vs. action=BUY;)
Each pine script strategy is coded differently and the strategy.order.action variable is not a default in all strategies.
Did you forget the semi colon on the end? Did you add a semi colon in between accounts when it should be a comma? Are you missing a required field for your command type? These are the common reasons you'll see a formatting issue. Let's break them down one by one...
key=my-secret-key
;
command=PLACE
;
account=sim101
;
instrument=ES 12-24
;
action=BUY
;
āqty=1
;
order_type=MARKET
;
tif=DAY
;
ā
ākey=my-secret-key
;
command=PLACE
;
account=sim101
,
sim102
,
sim103
;
instrument=ES 12-24
;
action=BUY
;
āqty=1
;
order_type=MARKET
;
tif=DAY
;
Examples:
(NT Sim) account=sim101;
(NT Demo) account=demo123456789;
(TST) account=S1Aug12345!;
NinjaTrader's available commands require (R) certain fields be present for the command to be implemented.
For example a PLACE command requires the Account, Instrument, Action, Qty, Order Type and TIF (time in force) to be present.
key=my-secret-key;
- Required by CrossTrade
command=PLACE;
- Required by NinjaTrader
account=sim101;
- Required by NinjaTrader
instrument=ES 12-24;
- Required by NinjaTrader
action=BUY;
- Required By NinjaTrader
āqty=1;
- Required by NinjaTrader
order_type=MARKET;
- Required by NinjaTrader
tif=DAY;
- Required by NinjaTrader
CrossTrade can not 'see' your setting on NinjaTrader; which means you'll need to ensure that the settings between the two platforms match. For example, you may be wondering why your ATM is not opening a trade. Chances are it's because the quantities do not match.
If your alert information is like this:
ākey=my-secret-key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
strategy=your-atm-name;
ā
But on NinjaTrader the ATM Strategy is set to 2 Order Qty, the position will open with only 1 contract using your inner most Stop and Target bracket.
If you're a CrossTrade user trading through NinjaTrader's Automated Trading Interface (ATI), you might have encountered the "Unable to load ATM strategy template" error. This is fairly common issue, but thankfully, it's also one that's relatively easy to fix with the right approach.
This guide will walk you through the troubleshooting steps to resolve the error.
If you submit an alert with an expired contract, you'll encounter this error message. Be sure to update your alerts to the front month contract after rollover to ensure you're submitting orders on an active contract. Otherwise, NinjaTrader will return the following error: