Ghost Automation

TradingView Alerts to NinjaTrader 8: Ghost Setup Guide

How to send TradingView alerts to NinjaTrader 8 for automated futures trading: a free NinjaScript AddOn queues, polls, and executes natively with OCO brackets.

What You Need Before You Start

NinjaTrader 8 installed and running - Ghost cannot reach a desktop app on its own: orders only execute while NinjaTrader 8 is open and the AddOn is polling.
The free QC Connector AddOn - A NinjaScript AddOn you install inside your own NinjaTrader via Tools > Import > NinjaScript. No cost, no separate account.
A paid TradingView plan - Webhooks are not available on the free Basic plan. Essential, their entry paid tier, is the minimum required.
Two-factor authentication on TradingView - TradingView only allows webhook alerts when 2FA is enabled on the account. Without it the alert never sends, so nothing reaches Ghost and the AddOn has nothing to pick up.
Ghost subscription - A QuantCrawler Elite or Ghost-only subscription. Your NinjaTrader ticker needs to be configured in Ghost.

Step 1 - Install and Connect the QC Connector AddOn

1

In Ghost Dashboard > Broker Connections > NinjaTrader 8, click "Connect NinjaTrader" to generate your one-time API key. Copy it immediately, Ghost only shows it once.

2

Install the QC Connector AddOn inside NinjaTrader via Tools > Import > NinjaScript Add-On.

3

Open the AddOn's configuration inside NinjaTrader and paste your API key. This is not OAuth and there is no login screen.

4

The AddOn starts polling Ghost roughly every 2 seconds. Add each NinjaTrader account you want to trade by typing its exact Account Name (case-sensitive, found under Control Center > Accounts) into Ghost.

Step 2 - Find Your Webhook URL

1

Go to Ghost Dashboard > Tickers.

2

Find the ticker you want to automate (e.g. MNQ, MGC) or create a new one.

3

Copy the Webhook URL. It looks like: https://quantcrawler.com/api/ghost/webhook/{your-ticker-id}?secret={your-secret}

4

Keep this URL private: the secret in the URL is what authenticates your alerts.

Step 3 - Set Up Your TradingView Alert

Paste this payload into the TradingView alert message field. Replace sl and tp with your actual levels.

{ "action": "buy", "entry": {{close}}, "sl": 19800.00, "tp": 20200.00 }
1

In TradingView, right-click on your chart or use the Alerts tab > Create Alert.

2

Set your condition (indicator cross, price level, or use a Pine Script strategy).

3

In the "Notifications" tab, enable "Webhook URL" and paste your Ghost webhook URL.

4

In the "Message" field, paste the JSON payload above (replacing sl and tp with your actual levels).

5

For Pine Script strategies, use {{strategy.order.action}} as the action value. TradingView fills it in automatically.

How the NinjaTrader Connection Actually Works

Queue and poll, not push

Ghost cannot reach into your computer: NinjaTrader has no cloud API. Ghost writes each command to a queue, and the AddOn running inside your own NinjaTrader calls in and asks "anything for me?" roughly every 2 seconds.

Native execution inside NinjaTrader

Once the AddOn picks up a command, it submits the order with NinjaTrader's own Account.Submit and native OCO bracket orders for SL/TP, the same execution path a manual trade takes, not a third-party bolt-on.

Fills and closes report back

The AddOn reports the entry fill back to Ghost, and reports the close whenever the position flattens, whether that's a Ghost-issued close, a native OCO stop/target hit, or you manually flattening. That report is how Ghost learns the real exit price and P&L.

Only runs while NinjaTrader is running

No NinjaTrader open means no AddOn polling means no execution. Queued entries expire rather than firing late if the AddOn is offline; close commands stay valid for 15 minutes and execute if you reconnect within that window. Offline longer than that and the close expires, so flatten manually in NinjaTrader.

Supported Tickers on NinjaTrader 8

Ghost connects to NinjaTrader 8 itself, not to any one prop firm: whatever account is set up inside your NinjaTrader, Ghost can trade it. The firms below are examples of prop firms whose accounts commonly run through NinjaTrader; they are examples, not an exhaustive list.

TickerFull NameExample Firms (via NinjaTrader)
MNQMicro E-mini Nasdaq-100Topstep, Tradeify, My Funded Futures, Alpha Futures, Lucid Trading
MESMicro E-mini S&P 500Topstep, Tradeify, My Funded Futures, Alpha Futures, Lucid Trading
MGCMicro GoldTopstep, Tradeify, My Funded Futures, Alpha Futures, Lucid Trading
MCLMicro Crude OilTopstep, Tradeify, My Funded Futures, Alpha Futures, Lucid Trading
M2KMicro Russell 2000Topstep, Tradeify, My Funded Futures, Alpha Futures, Lucid Trading
NQE-mini Nasdaq-100Larger accounts, firm-dependent
ESE-mini S&P 500Larger accounts, firm-dependent

Frequently Asked Questions

Does NinjaTrader sync with TradingView?

Not natively. NinjaTrader and TradingView do not talk to each other out of the box. Ghost bridges them: your TradingView alert fires a webhook, Ghost queues the order, and the free QC Connector AddOn running inside your own NinjaTrader 8 installation picks it up and executes it natively.

Can you automate NinjaTrader?

Yes, with the free QC Connector AddOn, a NinjaScript AddOn you install through Tools > Import > NinjaScript, then activate with a Ghost-issued connection key. It polls Ghost roughly every 2 seconds and submits orders with NinjaTrader's own Account.Submit.

Does Ghost's NinjaTrader connection use OAuth?

No. There is no OAuth flow and no cloud API on NinjaTrader's side. NinjaTrader is a desktop app, not a hosted service. Ghost issues a single API key when you create the connection, and you paste that key into the AddOn's settings inside NinjaTrader.

Do I need NinjaTrader open for trades to execute?

Yes. Orders only execute while NinjaTrader is running and the AddOn is actively polling. If NinjaTrader is closed, queued entries expire rather than firing late; close commands stay valid for 15 minutes and execute if the AddOn reconnects within that window. If the AddOn is offline longer than 15 minutes, the close expires, so flatten the position manually in NinjaTrader.

Does this work with prop firm NinjaTrader accounts?

Yes. Any account visible inside your NinjaTrader 8 installation, including funded or evaluation accounts from prop firms that support NinjaTrader, can be added by typing its exact NinjaTrader Account Name into Ghost.

Is there a cost for the QC Connector AddOn?

No, it is free. It is a NinjaScript AddOn distributed by QuantCrawler, installed directly inside your own NinjaTrader 8, not a paid product from NinjaTrader's add-on marketplace.

The AddOn says connected but no orders arrive. What else should I check?

Check whether the TradingView alert expired. Alerts on the Essential and Plus tiers run on an expiry timer; Premium is the first tier where an alert can run indefinitely. An expired alert sends no webhook, so Ghost queues nothing and the AddOn correctly finds nothing waiting on every poll. The AddOn is working exactly as designed. Restart the alert in TradingView.

Continue Learning

Risk Disclosure: Trading involves substantial risk of loss and is not suitable for all investors. This content is for educational purposes only and does not constitute financial advice.

Last updated: November 2026

© 2026 QuantCrawler. Not financial advice. Trading involves substantial risk of loss.