A green backtest in TradingView's Strategy Tester tells you that your rules, applied to the chart data you tested on, would have produced the orders you see. It does not tell you that a broker would have filled them, that your alerts are wired correctly, or that a MetaTrader 5 terminal will be awake to receive them. Between "the backtest looks right" and "a demo order appeared on the intended account" sit six more links, and every one of them can fail on its own.
This guide walks that chain in order: what the backtest actually proves, then each thing you must configure and, more importantly, how to confirm it did what you expected. It is written for a trader with a Pine Script strategy who wants their first verified demo trade on MT5 through a webhook connector. If your strategy is not yet written, or you plan to rewrite it in MQL5 and run it inside MT5 instead, see rewrite it in MQL5, or route the alerts? first. Nothing here makes a strategy profitable; the aim is narrower and more useful: that the trade which reaches your demo account is the trade your script intended.
What a backtest does and does not tell you
TradingView's strategy engine simulates orders with what its documentation calls the broker emulator. The Pine Script docs are explicit about the simplification: "Unlike brokers in real-world trading, the broker emulator fills a strategy's orders using only the available chart data by default", and "it executes orders on historical bars after a bar closes".[1] Where a bar has no finer data, the emulator "makes default assumptions about intrabar price movement when filling orders on historical bars".[1] Commission and slippage are inputs you set, listed in the Strategy Report's Properties tab alongside "initial capital, account currency, order size, leverage, pyramiding".[1] They are your estimates, not measurements from your broker.
So a backtest establishes three things: your entry and exit logic fires when you think it does, your position sizing arithmetic is what you intended, and the strategy behaves sensibly on standard chart types. TradingView itself warns that running a strategy on non-standard charts "typically produces unrealistic results" and recommends "using standard chart types when testing strategies".[1]
What a backtest cannot establish is anything downstream of TradingView: whether your alert carries the right message, whether the connector parses it, whether the terminal is running, or how your broker fills. Historical results are also not a forecast. Treat the backtest as a unit test of your logic and move on to the wiring.

The configuration chain, link by link
1. Turn strategy orders into alerts
A strategy's simulated fills are what Pine calls order fill events: "any event generated by the broker emulator which causes a simulated order to be executed".[2] To send an instruction when one happens, your script sets the message with the alert_message parameter on its order functions, and you, in the chart UI, must "include the {{strategy.order.alert_message}} placeholder in the 'Create Alert' dialog box's 'Message' field when creating script alerts on order fill events".[2] If the placeholder is missing, the alert fires but the message that reaches the connector is not your instruction.
One more property of alerts trips people up later. "When an alert is created in the charts UI, TradingView saves a mirror image of the script and its inputs, along with the chart's main symbol and timeframe", and "subsequent changes to your script's inputs or the chart will thus not affect running alerts previously created from them".[2] Every time you edit the strategy, you must recreate the alert. Otherwise your demo trades are coming from an older version of your rules.
Confirm it: open the alert's log in TradingView after a fill event and read the message it sent. It should be the exact instruction line you expect, not the placeholder text.
2. Point the alert at a webhook
TradingView delivers the message by HTTP POST to the URL you enter. Three constraints from TradingView's own documentation matter here. "If a remote server takes longer than three seconds to process a request, the request will be cancelled." "Only ports 80 and 443 are accepted." And "Webhooks may occasionally fail to reach the specified URL. You can monitor their delivery by checking the 'Webhook status' column in the alert log."[3] Finally, "Ensure that you don't include sensitive information such as login credentials or passwords in the webhook body."[3] Your broker login never belongs in an alert.
Confirm it: the Webhook status column in the TradingView alert log shows a successful delivery for the specific alert you are testing.
3. Write an instruction the connector can parse
With PineConnector, the message is a single comma-separated line. The syntax documentation defines it as "LicenseID,Command,Symbol,Parameters" and states that "the sequence (License ID, then Command, then Symbol, then any Other parameters) is mandatory".[4] A complete example from the docs is:
LicenseID,buy,EURUSD,vol_lots=0.1
Two rules decide whether a demo order can exist at all. "You must select one volume parameter for every entry command", and if you size by dollar or percentage risk, a stop loss is required: "You must include sl_pips=, sl_price=, or sl_pct= for this to work."[4] A backtest that sized positions by percentage of equity will need the matching volume parameter and a stop, or the instruction is rejected before the broker ever sees it.
The symbol is the other silent failure. PineConnector's test-alert page warns: "Your broker may have different symbol names configured in MetaTrader. The symbol name might be EURUSD.i or EURUSD.mini for example", and "It's important to use the exact symbol name as listed by your broker, taking into account case sensitivity. Using the wrong symbol is a common reason for trades not executing."[5] Your TradingView chart symbol and your broker's MT5 symbol are two different strings; the instruction must carry the broker's.
Confirm it: send one manual test alert with the same line and check the portal's Signals Log, which records "timestamps indicating when our server received the signal and when the PineConnector EA processed it".[5] Received but not processed points at the terminal; processed but no trade points at the instruction or the broker.
4. Have a terminal running to receive it
MetaTrader 5 Expert Advisors only work while the terminal is open and the EA is attached to a chart. MetaQuotes lists what stops an EA, including "turn off the trading platform" and "close the chart the Expert Advisor is running on".[6] A laptop that sleeps overnight is, from the EA's point of view, a platform that was turned off. You have two ways to satisfy this link.
- Self-hosted. You install MT5 and the PineConnector EA on a Windows machine you keep running, enable Algo Trading and DLL imports, attach the EA and enter your licence ID. The complete setup guide covers the nine steps. Whether that machine is your PC or a rented VPS is a separate decision; do you need a VPS? walks it through.
- Hosted with PineConnector Edge. PineConnector's managed MT5 hosting runs the terminal for you: "We host and maintain MT5 and the PineConnector EA, so you do not need to keep your own computer or VPS running."[7] It is included in every plan, currently in early access, MT5 only, and runs PineConnector's own component only, so "third-party Expert Advisors cannot run on a hosted instance".[8] Two early-access limits matter for this checklist: "EA settings currently use a fixed default configuration and cannot be edited", and "trading account data, including account balance, and the Experts and Journal logs are not yet available on the Edge page".[7] Customising settings is planned. If your verification depends on reading the Experts tab, self-host for now.
Confirm it: self-hosted, the EA's smiley or status shows on the chart and the Experts tab logs the alert. On Edge, the portal shows the instance running and the Signals Log shows the processed timestamp.
5. Use a demo account at your broker
The first verified trade should never be on a live account, and PineConnector says so for its hosted route too: "We recommend using a demo account for your first setup and test trade."[7] Open an MT5 demo account at the broker you intend to use, not a generic MetaQuotes demo, because symbol names, minimum volumes and trading hours are broker-specific and the whole point of this step is to meet them.
Confirm it: the account number and server name in the terminal, or entered in the Edge portal, are the demo account's, not a live account you also hold.
6. Verify the fill, not the alert
An alert that fired and a webhook that delivered are not a trade. PineConnector's test-alert page tells you where the evidence is: "In your MetaTrader terminal, check the 'Trade' tab (usually at the bottom) to confirm that a buy position for EURUSD (at 1 lot, if using default settings) has been opened."[5] Check five things against what the backtest showed for the same signal: the symbol, the direction, the volume, the stop and target if you sent them, and that exactly one order exists. A second order for the same signal means something upstream sent the message twice; TradingView can resend a webhook after certain server errors, and how any connector handles a repeat is a question to ask the provider, PineConnector included, rather than assume.
Once one signal has passed all five checks on demo, let the strategy run on demo for enough signals to see a rejection, a partial fill or a market-closed response. The deeper set of failure tests, from repeat deliveries to a terminal restart mid-signal, is in the nine tests to run before going live. If a signal arrives but nothing happens, the stage-by-stage diagnosis follows the same chain in reverse.
The chain as a checklist
| Step | What to configure | How to confirm |
|---|---|---|
| Backtest | Standard chart type; commission and slippage set to your broker's figures; sizing rule you can express as a connector parameter | Strategy Report properties match what you intend to send |
| Strategy alert | alert_message in order functions; {{strategy.order.alert_message}} in the alert dialog; recreate after every script edit | Alert log shows your exact instruction line |
| Webhook | Connector URL on port 443; no credentials in the body | Webhook status column shows delivered |
| Instruction | LicenseID,Command,Symbol,Parameters; exact broker symbol; one volume parameter; stop loss if sizing by risk | Signals Log shows received and processed |
| Terminal | Self-hosted MT5 with EA attached and Algo Trading on, or an Edge instance running | EA status on chart, or portal instance status |
| Demo account | Broker's own MT5 demo; correct server name | Account number in terminal or portal is the demo |
| Verify | Nothing to configure | Trade tab: right symbol, direction, volume, stops; exactly one order |
Where PineConnector Edge fits, and where it does not
Of the seven links, PineConnector Edge takes over one: keeping the MT5 terminal and the EA running. The product page states the boundary plainly: "PineConnector Edge is managed infrastructure, not managed execution. PineConnector is responsible for the machine your terminal runs on. You remain responsible for what that terminal is told to do."[8] Your backtest assumptions, your alert placeholder, your instruction syntax, your broker symbol and your demo login are yours on either route. Plans are Core at $59 a month with one connection and one hosted MT5 instance, Plus at $129 with three, and Pro at $199 with five; hosted instances run in New York, with London coming soon for Plus and Pro.[8] Traders who need third-party EAs, MT4, or editable EA settings today should self-host.
Frequently asked questions
My backtest is profitable. Does that mean the demo trades will be?
No. The backtest shows what your rules would have done on past chart data under the emulator's fill assumptions. Demo trades test whether your wiring carries the intended order to a broker. Neither predicts live results, and this article makes no claim that they do.
Why did my alert fire but the instruction was rejected?
The commonest causes are in link 3: a missing volume parameter, a risk-based volume without a stop loss, or a symbol that does not match your broker's exact MT5 symbol name. Check the Signals Log entry for the rejection reason.
I changed my strategy and the trades still follow the old rules. Why?
Alerts keep a snapshot of the script at creation. Delete the old alert and create a new one after any edit.
Can I read the MT5 Experts log if I use Edge?
Not yet. The Edge Guide states the Experts and Journal logs are not yet available on the Edge page. Use the portal's Signals Log and the broker's trade history instead, or self-host if you need the terminal logs during testing.
Next step
If you have not connected TradingView to MT5 yet, start with the complete setup guide, which covers both the self-hosted and the hosted route. If you already have a terminal and a strategy, run the seven-step table above on a demo account and do not move to a live account until every row confirms.
Reviewed 10 September 2026. Facts and prices were checked against the linked sources on that date.
Sources
- TradingView – Pine Script User Manual: Strategies (broker emulator, strategy report, non-standard charts), accessed 10 September 2026.
- TradingView – Pine Script User Manual: Alerts (order fill events, alert_message, alert snapshot), accessed 10 September 2026.
- TradingView – How to configure webhook alerts, accessed 10 September 2026.
- PineConnector Docs – Syntax, accessed 10 September 2026.
- PineConnector Docs – Test Alert, accessed 10 September 2026.
- MetaQuotes – MetaTrader 5 Help: Algorithmic Trading (Expert Advisors), accessed 10 September 2026.
- PineConnector Docs – Edge Guide (Early Access), accessed 10 September 2026.
- PineConnector – PineConnector Edge: Managed MT5 Hosting, accessed 10 September 2026.
PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.