Automation Wizard
How to use the Automation Wizard
Overview
The Automation Wizard is an interactive tool that helps you construct commands for NinjaTrader 8 through a step-by-step interface. It allows you to generate properly formatted commands without needing to memorize the syntax. The Automation Wizard replaced the legacy 'Command Builder' with greater functionality and flexibility.

How the Automation Wizard works
The Automation Wizard is a guided tool that builds webhook alert messages for you, step by step. Instead of manually writing command syntax, you make selections through a visual interface and the wizard generates the correct alert message in real time — ready to paste into TradingView or send via the API.
You'll find it on the Webhooks page of your dashboard.
How It Works
The wizard is split into two panels. The left side walks you through configuration in numbered steps. The right side shows a live preview of the alert message that updates as you make changes. When you're done, copy the message and paste it into your TradingView alert.
A breadcrumb at the top of the preview panel tracks what you've configured so far (e.g., Strategy → Full Sync, or Indicator → Buy + ATM). Validation errors and warnings appear above the preview — the Copy button is disabled until all errors are resolved.
Step 1: What Are You Automating?
Choose between Strategy and Indicator. This determines the entire flow of the wizard.
Strategy is for Pine Script strategies that generate entries and exits through strategy.entry(), strategy.close(), and similar calls. The wizard automatically uses TradingView's built-in strategy variables like {{strategy.order.action}} and {{strategy.order.contracts}} so your alert dynamically adapts to whatever the strategy does. You don't hardcode buy/sell — the strategy tells CrossTrade what to do.
Indicator is for alert-based signals where you define the exact action. You pick the command (Buy, Sell, Close Position, etc.) and configure it yourself. This is the right choice for indicators, manual alert setups, or any scenario where you want explicit control over what each alert does.
Step 2: Command & Action
What you see in this step depends on your Step 1 selection.
Strategy Mode
The action is locked to {{strategy.order.action}} because TradingView supplies it dynamically. You can optionally enable Strategy Tag here, which tags alerts with a unique identifier so multiple strategies running on the same instrument and account don't interfere with each other. For example, tag one strategy "scalper" and another "swing" — exit signals from one won't close positions opened by the other.
Indicator Mode
You choose from a set of commands organized into Common and Advanced categories.
Common Actions are the ones most users need: Buy (open long), Sell (open short), Close Position (close current position for an instrument), and Flatten Everything (close all positions and orders across all accounts).
Advanced Actions are available under the "Full Command List" expansion and are grouped by function:
Opening Commands — Flat Place (flatten then place new order), Reverse (invert existing position direction), and Reverse Position (close and place in opposite direction).
Closing Commands — Flatten (close positions with optional filters for account, instrument, or direction) and Close Strategy (close an ATM Strategy by its ID).
Order Management — Cancel Order (cancel by order ID), Cancel Orders (cancel all orders in an account), Cancel All Orders (cancel all orders across all accounts), Cancel Replace (cancel an order and place a new one, only if the cancel succeeds), Change Order (modify qty, limit price, or stop price on a pending order), and Cancel & Bracket (cancel existing orders and place protective TP/SL bracket).
Not all of these require every subsequent step. For example, Flatten Everything doesn't need order details or exit management — the wizard automatically hides irrelevant steps based on your selection.
Step 3: Exit Management
This step controls how positions get closed. It only appears for actions that support exit handling (buy/sell type commands).
Strategy Exit Options
Full Sync — TradingView controls both entries and exits. The wizard adds sync_strategy=true along with market_position and prev_market_position variables so CrossTrade can track what TradingView thinks the position should be. If NinjaTrader and TradingView get out of sync, you choose the behavior: Flatten (close NT8's position to match TV) or Ignore (skip the signal).
ATM Strategy — TradingView handles entries, but NinjaTrader's ATM (Advanced Trade Management) handles exits. You provide the exact name of your NT8 ATM template. The wizard automatically adds flatten_first=true and strategy_exit_block=true so TV exit signals are blocked and your ATM manages the trade.
Manual Brackets — TradingView handles entries, and you define fixed stop loss and take profit levels. Bracket values can be specified as a price level, dollar amount, tick count, or percentage. You can optionally block TradingView exit signals so your brackets handle exits instead.
None — Entries only, no automatic exit management. You can still optionally block TV exit signals if you want to manage exits manually in NinjaTrader.
Indicator Exit Options
Indicators get a simplified version: None, ATM Strategy, or Manual Brackets. Full Sync is not available because it relies on TradingView strategy variables that indicators don't have.
Step 4: Order Details
This is where you configure the specifics of the order itself.
Account(s) — The NinjaTrader account name to send the order to. For multi-account placement, comma-separate the names (e.g., sim101,sim102).
Instrument — The trading instrument (e.g., ES1!, NQ1!, MES1!). In Strategy mode, you can check "Use {{ticker}}" to let TradingView supply the instrument dynamically from the chart.
Quantity — Number of contracts. In Strategy mode, you can use the strategy's quantity variable {{strategy.order.contracts}} or override it with a fixed number.
Order Type — Market (executes immediately), Limit (executes at a specific price or better), Stop Market (triggers at a stop price, then executes at market), or Stop Limit (triggers at a stop price, then places a limit order). Selecting Limit or Stop Limit reveals a Limit Price field; selecting Stop Market or Stop Limit reveals a Stop Price field.
Time in Force — Day (order expires at end of session) or GTC (good til canceled).
For advanced actions, additional fields appear as needed: Order ID (for cancel, change, and cancel-replace commands), Strategy ID (for closing an ATM strategy), Position Filter (for the flatten command — filter by long, short, or all), and Change Fields (new qty/limit/stop values for the change command).
Step 5: Enhancements
All enhancements are optional. Each one has a help icon (?) that opens a detailed explanation with an example command.
Flatten First — Closes any existing position and cancels pending orders for the account and instrument before placing the new order. Useful when your strategy assumes a clean slate on each signal.
Require Market Position — Only executes if your current NinjaTrader position matches a required state. Options: Flat (only open when no position exists), Long, Short, Long or Flat, Short or Flat. Useful for preventing duplicate entries or only allowing scale-ins.
Max Positions — Blocks opening orders that would push your position size beyond a maximum number of contracts. Checked against your live NT8 position.
Trading Window — Restricts execution to specific hours (US/Eastern). Orders outside the window are silently dropped. You can also set a "Closing Only After" cutoff time, which only allows exit orders after that time — useful for preventing new entries near the close while still allowing exits.
Bypass Trade Windows — The opposite of Trading Window. Forces this specific command to execute regardless of any configured trading window. Useful for emergency flatten commands that must run no matter what.
Rate Limiting — Prevents the same signal from firing more than once within a time window. Requires an ID to group related signals (defaults to the instrument name). Useful when TradingView might fire duplicate alerts in rapid succession.
Delay Timer — Waits a specified number of seconds (max 300) before executing. Happens server-side after the alert is received. Useful for avoiding race conditions when multiple signals fire simultaneously, or for staggering entries across accounts. Note: delaying a market order means the fill price may differ.
Cancel After Timeout — Auto-cancels an unfilled limit order after a set number of minutes (1–180). Only works with Limit order type. If you enable this on a non-limit order, the wizard will show a validation error.
Add Notes — Attaches a freeform text note to the order. The note shows in your NinjaTrader Activity Log and in CrossTrade's Alert History for easy identification.
The Preview Panel
The right side of the wizard shows your generated alert message in real time. This is the exact text you copy into TradingView's alert message body.
Validation — Errors (red) block the Copy button and must be fixed. Warnings (amber) are informational — the command will still work but something may not behave as expected.
Copy Alert Message — Copies the generated command to your clipboard. Only enabled when there are no validation errors.
Save to Library — Saves the command with a custom name to your personal command library (max 25 saved commands). You can access saved commands later without rebuilding them.
Pine Script Code — For Strategy automations only. Shows an optional Pine Script snippet that sets strategy.order.alert_message so you can use {{strategy.order.alert_message}} as your TradingView alert message instead of pasting the command directly.
JSON Converter
The "Convert from JSON" button in the preview panel opens a converter that translates JSON payloads from other platforms (like PickMyTrade, TradersPost, or generic JSON formats) into CrossTrade's command format. Paste your existing JSON, click Convert, and the wizard maps recognized fields (action, ticker, quantity, take profit, stop loss, etc.) to the equivalent CrossTrade syntax. Unsupported fields generate warnings explaining what couldn't be mapped.
Tips
Test with a sim account before going live. Use the Manual Trader on the Webhooks page to send test commands without needing TradingView. TradingView variables like {{strategy.order.action}} only resolve when fired from an actual TradingView alert — they won't work from the Manual Trader.
Last updated