Command Editor
1. Connect to the NT8 Add-On
2. Send test alerts from Editor to NinjaTrader
3. Copy command and webhook URL into TradingView alert
Send to NT8
Copy
Commands
Standard NT commands and CrossTrade only enhancements, allowing you to test a variety of scenarios.
Buy Market
Place a market order to buy 1 ES contract. Change the account and instrument to your preference. Use action=SELL; to convert to a Sell market order.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
Show Command
Select
Buy with ATM Strategy
Place a market order to buy using a ATM strategy template for trade management. Provide the exact name of your ATM to the strategy field.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
strategy=Your ATM Template;
Show Command
Select
Buy Limit
Place a limit order to buy 1 ES contract. Limit price must be provided below the current price and can be numerical, percentage, or tick based.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=LIMIT;
limit_price=X(below market);
tif=DAY;
Show Command
Select
Close Position
Close an existing position in the account.
key=Your CrossTrade Secret Key;
command=CLOSEPOSITION;
account=sim101;
instrument=ES 12-24;
Show Command
Select
Flatten Everything
Cancel all active orders and flatten all positions across all accounts. This is a nuclear option to flatten everything.
key=Your CrossTrade Secret Key;
command=FLATTENEVERYTHING;
Show Command
Select
Reverse Position
Reverse an existing position in the account. If the quantities match, you will only offset an existing position. Use Flatten_first to perform and close-and-reverse strategy.
key=Your CrossTrade Secret Key;
command=REVERSEPOSITION;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
Show Command
Select
Flatten First
XT Enhancement - Flattens the open position in your account before a new PLACE command is implemented.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
flatten_first=true;
Show Command
Select
Multi-Account Placement
XT Enhancement - Places an order across multiple accounts. Separate each account by comma.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101,sim102 ;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
Show Command
Select
Take Profit and Stop Loss
XT Enhancment - Set both take profit and stop loss for an open position. Profit and Loss price levels can be numerical, percentage, or tick based.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
take_profit=(price above) ;
stop_loss=(price below) ;
Show Command
Select
Self Rate Limiting
XT Enhancement - Limits the rate of requests to avoid server overloads. The default is 1 which will limit signals to one per minute.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
rate_limit=1 ;
id=mystrategy;
Show Command
Select
Require Market Position
XT Enhancement - Place an order only if the market position is flat, long, short or a combination of long/flat or short/flat.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
TIF=DAY;
require_market_position=flat ;
Show Command
Select
Max Positions
XT Enhancement - Place an order with a max positions limit.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
TIF=DAY;
max_positions=2 ;
Show Command
Select
Trading Window
XT Enhancement - Place an order within a specific trading window.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
TIF=DAY;
start_time=9:30 AM ;
end_time=4:00 PM ;
Show Command
Select
Delay Timer
XT Enhancement - Place an order with a delay timer before execution. The default '3' will delay the order by 3 seconds.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action=BUY;
qty=1;
order_type=MARKET;
TIF=DAY;
delay=3 ;
Show Command
Select
TradingView Examples
Example indicators and strategies demonstrating how to use TradingView alerts with CrossTrade.
Up/Down Bar Indicator
Apply to your chart and create an alert. The command is preloaded for you in the alert Message field.
SMA Crossover Strategy
Use this strategy example to send orders with CrossTrade. Copy the payload below for your TradingView alert Message field.
key=Your CrossTrade Secret Key;
command=PLACE;
account=sim101;
instrument=ES 12-24;
action={{strategy.order.action}};
qty={{strategy.order.quantity}};
order_type=MARKET;
tif=DAY;
flatten_first=true;
SMA Crossover with 50 Tick SL/TP
SMA crossover with stop loss and take profit settings. You'll need to add your secret key to the pine script and use the strategy alert message.
{{strategy.order.alert_message}}