Command Builder

How to use the Command Builder

Overview

The Command Builder 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.

How the Command Builder works

The builder walks you through creating commands with these main sections:

  1. Basic Configuration

    • Command Type: Choose between opening or closing positions

    • Account: Specify trading accounts (e.g., sim101,sim102)

    • Instrument: Enter the instrument in NT8 format (e.g., ES 03-25, ES MAR25)

  2. Order Details (for PLACE commands)

    • Action: Buy or Sell (includes TradingView strategy entry option)

    • Quantity: Number of contracts

    • Order Type: Market or Limit

    • Time in Force: DAY or GTC

    • Limit Price (when Limit order type is selected)

  3. Trade Management Two approaches available:

    • ATM Strategy

      • Use existing NT8 ATM templates

      • Must match NT8 strategy name exactly

    • Manual Stop/Target

      • Numerical, Tick-based, or Percentage-based values

      • Take Profit and Stop Loss settings

      • Advanced Stop Loss option for stop limit or stop loss stop orders

  4. Enhancements Optional features to customize command behavior:

    • Flatten First: Close existing positions before placing new order

    • Require Position: Execute only if account position matches criteria

    • Trading Window: Set specific trading hours

    • Rate Limiting: Control order frequency

    • Delay Timer: Add execution delay

Using the Command Builder

Step 1: Select Command Type

  1. Choose between "Open a Position" or "Close a Position"

  2. For Close Position, only Account and Instrument fields are required

Step 2: Enter Basic Information

  1. Specify the account(s)

  2. Enter the instrument using NT8 format

  3. For PLACE commands, complete the order details

Step 3: Configure Trade Management (Optional)

  1. Select ATM Strategy or Manual Stop/Target

  2. For ATM: Enter exact strategy name from NT8

  3. For Manual:

    • Choose stop/target calculation method

    • Enter take profit and stop loss values

    • Configure advanced stop loss if needed

Step 4: Add Enhancements (Optional)

Enable and configure desired enhancements:

  • Flatten First: Check to close existing positions

  • Require Position: Select required market position

  • Trading Window: Set start and end times

  • Rate Limiting: Specify minimum seconds between orders

  • Delay Timer: Add execution delay in seconds

Step 5: Generate and Test

  1. Click "Generate Command" to create the command

  2. Command appears in Manual Trader tab

  3. Test the command using "Send to NT8"

  4. Copy command and webhook URL for TradingView

Best Practices

  1. Testing

    • Always test new commands in the Manual Trader

    • Verify behavior with small quantities first

    • Test during market hours for accurate results

  2. ATM Strategies

    • Double-check ATM strategy names

    • Ensure strategies are properly configured in NT8

    • Test ATM execution before live trading

  3. Risk Management

    • Verify stop loss and take profit values

    • Test advanced stop loss configurations

    • Confirm position sizing is appropriate

  4. Trading Hours

    • Set appropriate trading windows for your market

    • Account for market holidays and closures

    • Consider time zone differences

Troubleshooting

Common issues and solutions:

  1. Command Not Executing

    • Verify NT8 Add-On connection

    • Check account names match exactly

    • Confirm instrument format is correct

    • Verify trading window settings

  2. ATM Strategy Issues

    • Confirm strategy exists in NT8

    • Check strategy name spelling/case

    • Verify strategy is properly configured

Last updated