NRUNO · TradingView → cTrader

How to automate a Pine Script strategy

Pine Script can define your trading rules, but automation starts when a realtime script event becomes an alert message that an external execution system can understand. automate a Pine Script strategy here means connecting the full technical path from TradingView to execution in a controlled way.

automate Pine ScriptPine Script automated tradingautomate Pine strategyPine Script trading botPine Script webhook

Strategy simulation is not live execution

Pine strategies use TradingView’s broker emulator for historical and realtime strategy calculations. TradingView’s support material distinguishes that from automated trading with a brokerage account. If an external platform should act, you need an alert-based connection.

Choose the right alert event

Depending on the script, alerts can come from alert() calls, alertcondition() in indicators, or strategy/order events. They are not interchangeable. Decide which event represents the moment you genuinely want the instruction to leave TradingView.

Design a machine-readable message

A robust alert should be unambiguous. Typical fields identify action, symbol and size or risk, with optional SL/TP. JSON is useful when the receiver expects structured data. TradingView sends valid JSON webhook messages as application/json.

Understand realtime vs historical behaviour

A Pine script can behave differently on an open realtime bar than after a chart reload. calc_on_every_tick, bar confirmation and higher-timeframe logic can affect when a signal exists. Solve Pine timing before blaming webhook latency.

Connect the alert to cTrader

With NRUNO, the alert points to your personal webhook URL. NRUNO validates and routes the instruction to the connected cBot, which handles the cTrader side. This keeps Pine logic separate from transport and execution.

Official TradingView references: Pine strategy automation · Webhook alerts

Ready to test your TradingView → cTrader workflow?

Start in Paper Mode and verify the entire signal path before switching to Live.

Start 14-day free trial

FAQ

Do I need to rewrite my Pine strategy?

Not necessarily. If it already creates the required alert event and message, changes may be minimal.

Should I use alert() or strategy order events?

It depends on the event that should trigger external execution. Test the timing carefully.

Can Pine send JSON to a webhook?

Yes. TradingView states that valid JSON alert messages are sent with application/json.

NRUNO is technical signal-routing software, not investment advice. It does not generate trading signals or guarantee execution, fills or profits.