A useful TradingView backtest records its assumptions before you judge its results. Enter costs, check how simulated orders fill, reserve data you have not used to tune the rules, and compare the frozen strategy with new realtime observations. The strategy report describes a simulation on chart data, not orders filled by your broker.[1]
Automation executes rules. It does not create an edge or turn a historical result into a forecast. Use this guide to assemble evidence about the rules and their assumptions before moving to the separate demo-execution check.

Part 6 of 8 in From discretionary to automated trading. Previous: Choose your implementation path. Next: Verify the path on an MT5 demo account.
What does the strategy report actually test?
TradingView's broker emulator applies your strategy to the available chart data and its fill assumptions. With default calculation and execution settings, a strategy calculates at bar close; a new market order can fill at the next available tick, commonly the next bar's open. The condition, the order being created and the simulated fill are distinct events.[1]
The interface is called the strategy report, formerly the Strategy Tester. TradingView's July 2026 release notes also renamed several settings. Record the actual settings alongside the script version rather than relying on an old screenshot.[3]
Use standard price charts when assessing executable price rules. Synthetic chart prices, such as those on Renko or Heikin Ashi charts, can produce unrealistic simulations. A standard-price fill option does not automatically make every calculation on a synthetic chart equivalent to a standard chart.[1]
How do you budget costs before reading the results?
Start with the broker's contract specification and charges for the exact account and symbol. Record the units, whether each charge is per side or round trip, and the hours to which your spread observations apply. Commission applies to both entries and exits in TradingView; slippage is entered in ticks, not pips.[2]
Illustrative example, not a recommendation: the series follows a EURUSD H1 London pullback rule. The cost budget below is normalised to one entry and one exit of 1.00 lot on an illustrative USD account. It is arithmetic, not measured trading data or a strategy result.
| Round-trip component | Illustrative assumption | Cost in pips |
|---|---|---|
| Spread | 1.0 pip total | 1.0 |
| Commission | US$7 per round-turn lot; US$10 per pip per lot | 7 ÷ 10 = 0.7 |
| Slippage | 0.3 pip on each of two fills | 2 × 0.3 = 0.6 |
| Total | 1.0 + 0.7 + 0.6 | 2.3 |
Against an illustrative 15-pip stop, the budget is 2.3 ÷ 15 = 0.1533R, approximately 0.15R. Here 1R means the planned loss from the entry reference to the stop before costs. The ratio assumes the same volume and pip value for each component; it is not a maximum loss.
The running specification uses vol_dollar=100 with an explicit stop, meaning a planned loss of about US$100 at that stop on a USD account. Broker volume constraints, execution and costs can change the actual amount. The 1.00-lot cost budget above is a unit of comparison, not the volume this message necessarily requests.[6]

Copy this cost-budget worksheet
- Account and instrument: account currency ___; broker symbol ___; contract size ___; lot step ___; pip value per 1.00 lot ___; source and date ___.
- Trading window: session and timezone ___; spread observations collected during that window ___; typical and adverse spread assumptions ___; why those observations represent the intended conditions ___.
- Commission: broker charge ___; per side or round turn ___; charged per lot, order or transaction value ___; conversion into the report's currency and quantity units ___.
- Slippage: entry assumption ___; exit assumption ___; chart tick size ___; pip-to-tick calculation ___; order types to which the setting applies ___.
- Other costs: holding or financing charges that can apply ___; where they are modelled or deducted separately ___; costs excluded from this budget ___.
- Check and stress: base round-trip total ___; adverse total ___; stop distance ___; cost divided by stop distance ___; conditions under which the model no longer represents the intended trade ___.
If you cannot explain a conversion, leave the result unapproved until you obtain the contract specification or resolve the model. A zero entered because the cost is unknown is an assumption of zero cost.
Translate the budget without double-counting
- Commission: TradingView supports percentage of transaction value, cash per contract and cash per order. A fixed 1.00-lot entry and one full exit with US$7 round-turn commission could use US$3.50 cash per order in a USD report. That constant is unsuitable when volume changes or an exit is split into several orders. Do not equate a chart contract with an MT5 lot without verifying the quantity mapping.[2]
- Slippage: if the chosen EURUSD chart's tick size is 0.00001, a 0.0001 pip contains 10 ticks. The illustrative 0.3 pip per fill therefore becomes 3 ticks. Check the actual tick size in the report's Symbol info; the example does not establish your feed's precision.[1]
- Spread approximation: TradingView's documented properties have no separate spread input. Its Help Center says slippage can account for spread on market and stop orders. One modelling choice is to allocate the 1.0-pip round-trip spread across two market fills: 0.5 + 0.3 = 0.8 pip, or 8 ticks per fill on that illustrative feed. Do not also deduct the same spread elsewhere.[2]
That symmetric two-market-fill approximation does not describe every exit. The running rule has a target that may be modelled as a limit order, and the Help Center scopes its slippage setting to market and stop orders. Account separately for costs missing from the simulated order types and document the approximation. A constant spread or slippage input cannot reproduce changing quotes and liquidity.
Which fill and calculation settings need an explicit decision?
| Setting | What it changes | Record before testing |
|---|---|---|
| Bar detalization | High uses available lower-timeframe data for historical fills. | Selected detail and data coverage. |
| Order execution delay | Whether orders can fill on the creating bar's closing tick. | Timing assumed for each order type. |
| Limit order execution | Whether price must move beyond a limit before a simulated fill. | Assumption in ticks. |
| Script execution | Calculations at realtime ticks, historical ticks or order fills. | Each enabled option and reason. |
| Capital, size and leverage | Simulated quantity, funding and margin behaviour. | Currency, sizing method and leverage. |
Bar detalization: High and On history bar tick are documented for TradingView Premium and Ultimate; the latter requires a standard chart. Lower-timeframe history increases detail where available, but is not a recording of every broker tick. Historical tick execution can reduce some historical/realtime differences; it does not remove all repainting.[1][3]
On order fill allows extra calculations after simulated fills and can expose information unavailable at that point in realtime. On realtime bar tick can make reloaded historical results differ from what happened while bars formed. Choose calculation behaviour that matches the rule; do not switch options solely because a report improves.[1]
Limit-fill verification remains a model: even when price must cross beyond the limit, the emulator fills at the limit's specified price. It does not establish a place in a broker's queue. Also record the report's actual date range and whether older trades were trimmed: the standard strategy report retains individual information for up to the latest 9,000 trades.[1]
How do you check repainting and look-ahead?
Ask what information was available when the decision was made. A closed chart bar removes that bar's changing close, but not future data leaking through a higher-timeframe request, a pivot plotted backwards after confirmation, or revised source data.[4]
- Input availability: identify when each price, higher-timeframe value and pivot becomes known. Never assign a later-confirmed fact to an earlier decision.
- Historical versus realtime behaviour: retain a timestamped observation of each realtime condition and alert. Compare it with the same bar after reload. Investigate missing or moved signals instead of assuming the refreshed chart is the original record.
- Version control: record script version, inputs, chart symbol, timeframe and calculation settings. Change one factor at a time so a mismatch has a traceable cause.
A realtime discrepancy is evidence to investigate, not automatic proof of one particular bug. TradingView documents both script-driven repainting and changes in underlying data. Forward observation can expose defects a historical report conceals.[4]
How do you keep out-of-sample data genuinely separate?
Use in-sample data to develop the rule, then freeze it before opening the out-of-sample period. TradingView describes testing the optimised configuration outside its development sample without further fine-tuning. If you inspect that period and change the rule to suit it, that period has become development evidence.[1]

Copy this split plan before the next run
- Dataset: feed and symbol ___; standard chart type ___; timeframe ___; timezone ___; full available range ___; missing data or warm-up exclusions ___.
- Development window: in-sample start/end ___; parameters allowed to change ___; reason for that window ___.
- Holdout window: untouched out-of-sample start/end ___; date the split was fixed ___; confirmation that this period has not influenced the rule ___.
- Frozen configuration: rule version ___; settings and cost budget ___; freeze date ___; file or screenshot reference ___.
- Decision criteria: what would reject the rule ___; what would require more evidence ___; what would justify proceeding to demo ___; criteria written before viewing the holdout ___.
- Realtime observation: start date ___; situations to observe ___; mismatch log location ___; next review date ___.
There is no universal split ratio or number of weeks that certifies a strategy. The chosen windows must address the question and include relevant conditions. Record unfavourable runs too; selecting only convenient markets or dates adds selection bias.[1]
Keep an attempt log, including discarded variants
| Attempt | Changed and why | Evidence and decision |
|---|---|---|
| Version ___; date ___ | Parameter ___; prior reason ___ | Data viewed ___; keep/reject ___ |
| Holdout run ___ | Frozen configuration ___ | Prewritten criterion ___; met? ___ |
| Revision after holdout ___ | What the result changed ___ | Holdout now used; next untouched data ___ |
If you implement the rule as a native MT5 Expert Advisor, test that implementation in MT5 as well. MetaQuotes documents a historical Forward split, modelling modes, commission settings and execution-delay simulation. MT5's historical forward period is different from TradingView's realtime forward testing, and it does not validate a TradingView webhook path.[8]
What can the backtest still not tell you?
| Outside the simulation | Evidence needed elsewhere |
|---|---|
| Correct running alert version | Recreated alert plus the actual triggered message. |
| Webhook arrival and processing | TradingView delivery status and PineConnector's matching log. |
| Receiving-account spread filter | Entry-filter decision using the broker quote at arrival. |
| Actual broker size, fill and protection | Orders, deals, positions and broker-side SL/TP. |
| Broker exposure after a missed exit | Account reconciliation; Pine's simulated position is insufficient. |
For the running example, spread=2 checks the receiving account's spread at arrival in PineConnector pips; passing it does not confirm an order. A filter can exclude a broker entry while the simulated strategy still enters. Broker-side stops can also close a position independently of the strategy's simulated exit.[6][7]
strategy.position_size describes the simulation. It cannot establish that your MT5 account is flat. Likewise, a simulated stop is not evidence of a protective stop at the broker. Specify and verify those requests separately using Part 4's rule worksheet.
What should be ready before you test execution?
- Costs documented? Every material cost is modelled or explicitly accounted for outside the report, with units and evidence.
- Fill assumptions saved? Chart type, tick size, calculation behaviour, quantity mapping and execution settings are recorded.
- Holdout kept separate? The version was frozen and the decision criteria existed before the holdout was inspected.
- Realtime behaviour checked? Observations are retained, and unexplained historical/realtime differences remain a reason to stop.
- Execution specification complete? Messages, receiving account, broker protection and failure handling are written down.
A “no” means fix or investigate that item before using the backtest as support for the next stage. TradingView's historical markers do not replay as newly sent alerts, so the demo step needs new realtime events.[5]
Next step: verify a demo trade and reconcile the run
Use Part 7's connection test, demo-order procedure and per-signal worksheet. A clean backtest and a clean demo run answer different questions; neither establishes future trading results.
Reviewed 23 September 2026 against the linked primary documentation, including refreshed product, strategy and MT5 references. No trading account was tested and no Pine Script or MQL5 code was compiled.
Related reading
- From discretionary to automated trading: series guide
- Write the complete strategy specification
- Choose alerts, Pine Script or an MT5 Expert Advisor
- From backtest to a verified MT5 demo trade
Sources
- TradingView – Pine Script Strategies, accessed 23 September 2026.
- TradingView – Strategy properties, accessed 23 September 2026.
- TradingView – Pine Script release notes, July 2026 strategy improvements, accessed 23 September 2026.
- TradingView – Repainting, accessed 23 September 2026.
- PineConnector Docs – Recommendations, accessed 23 September 2026.
- PineConnector Docs – PineConnector Syntax, accessed 23 September 2026.
- PineConnector Docs – Pine Script Converter, accessed 23 September 2026.
- MetaQuotes – Strategy Testing, accessed 23 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.