TradingView Backtesting

TradingView Bar Magnifier: Which Exit Fills First?

TradingView Bar Magnifier uses lower-timeframe OHLC data to refine simulated historical fills. It can change which exit fills when a stop and target both lie inside one chart candle. Current documentation calls the control Bar detalization, with a High option. The result still depends on available price data and active orders; it is not a record of actual broker executions.

Analyze a Trade CSV

One hourly candle, two possible exit outcomes

This invented example isolates order sequence. A long position of 10 units already exists at a cost basis of 100. Its target at 104 and stop at 97 are active before the hour opens. The first filled exit closes the entire position and cancels the other. Assume a point value of 1, no gaps, fees, slippage, re-entry, or order changes. The six rows below are consecutive 10-minute bars, not market observations.

Minutes into hourOpenHighLowClose
00 to 101001029697
10 to 209710194100
20 to 3010010599104
30 to 40104105102103
40 to 50103104101102
50 to 60102104100103
Combined hourly candle10010594103

Trace the first active exit, not the candle color

For the default chart-bar path, the emulator compares the open with the extremes. Here the high is 5 points away and the low is 6 points away, so the inferred sequence is 100 → 105 → 94 → 103. With the supplied lower-timeframe rows, the first 10-minute bar reaches 97 without reaching 104. Both paths fit the same hourly OHLC, yet the exit differs.

  • The hourly close is above the open in both cases. Candle color cannot establish which exit came first.
  • If both levels were inside the same 10-minute bar, its OHLC alone would still leave an intrabar path to simulate.
  • If the bracket was created only at the hourly close, neither earlier crossing could fill it. Order activation is part of the test.
Detail usedFirst exitIllustrative gross P/L
Hourly OHLC onlyTarget at 104 before the later low(104 - 100) × 10 × 1 = +40
Six 10-minute OHLC barsStop at 97 in the first row(97 - 100) × 10 × 1 = -30
Difference: finer minus defaultA different exit, not an extra trade-30 - 40 = -70

Find the current setting and check access

TradingView currently documents High historical bar detail for Premium and Ultimate plans. Open the strategy Settings / Properties and locate Bar detalization, or use the strategy report control. Compare Default with High. Older instructions describe a Bar Magnifier checkbox; Pine retains the use_bar_magnifier parameter. Record the actual label and entitlement shown in your account. Sources were checked on October 17, 2026.

  • Save the baseline properties before changing the detail level.
  • Leave all Script execution options and order execution delay unchanged for the first comparison.
  • If High is unavailable, record the access limitation instead of treating the default run as a magnified test.

Use the mapped intrabar interval and check coverage

The current Help Center mapping uses different intrabar intervals for different chart intervals. These selected rows show exact chart intervals; consult the linked official table for other intervals. Do not assume Bar Magnifier always uses one-minute data.

  • TradingView documents a maximum request of 200,000 lower-timeframe bars. Older chart bars can lack magnified coverage.
  • Illustrative ceiling: six 10-minute bars per full hourly bar gives 200,000 / 6 ≈ 33,333 hourly bars. This is a bar-count estimate, not a promise of calendar history.
  • Actual coverage depends on available data and the number of intrabars per chart bar. Missing intervals and session boundaries invalidate a fixed-ratio date estimate.
Chart intervalIntrabar interval
1 minute10 seconds
5 minutes30 seconds
15 minutes2 minutes
60 minutes10 minutes
240 minutes30 minutes
1 day60 minutes
1 week1 day

Separate fill detail from script calculation frequency

Bar detail controls the historical price sequence used by the simulation. Script execution settings control when strategy logic runs and can submit or replace orders. The current execution model includes a separate historical-tick option, so the claim that strategies can only calculate at historical bar closes is too broad.

  • High detail can provide more simulated historical ticks for an execution setting to use. It does not establish exchange tick history, queue priority, or executable liquidity.
  • If you later change execution settings, label that as a separate experiment. It can change the orders themselves, not only their fill sequence.
ControlRole in the comparison
Bar detalization / use_bar_magnifierChanges available historical price detail. Keep calculation choices fixed when isolating fills.
On realtime bar tick / calc_on_every_tickRuns logic on live updates; it does not recover a historical live-tick recording.
On order fill / calc_on_order_fillsAdds executions after fills. Changed exits can then cause further order changes.
On history bar tick / calc_on_every_history_tickRuns logic on available simulated historical ticks. This separate option requires Premium or Ultimate and a standard chart.
Order execution delay / process_orders_on_closeChanges whether orders created at the close can fill on that closing tick.

Run a comparison you can explain trade by trade

Use this procedure on your own strategy. The tables above provide a worked arithmetic example; they do not claim that TradingView was run against an uploaded synthetic dataset. Choose actual trades near both exit levels and keep the exported files with their settings.

  • Use entry time, direction, and order identifiers where available to match trades. Row numbers can drift after the first changed exit.
  • A later trade may disappear because the previous position stayed open longer. Trace from the first divergence before treating later rows as independent discrepancies.
  • Keep missing coverage and unexplained fills in the comparison notes. Do not select the run merely because it has the larger profit.
StepRecordDecision
1. Freeze the setupScript version, inputs, symbol/exchange, session, dates, timeframe, costs, and every execution option.Can the same setup be rerun?
2. Save DefaultTrade CSV and settings snapshot, named with Default and the run date.Which trades reach both exit levels in one chart bar?
3. Save HighSecond trade CSV and settings snapshot, with only historical detail changed.Which exits, prices, or trade counts differ?
4. Inspect the first differenceOrder activation time, bracket levels, mapped lower interval, and available prices.Does the finer sequence explain the changed exit?
5. Compare the reportsAnalyze each trade CSV separately in Backtest Deep Report and retain both outputs.Does the aggregate change reconcile with the affected trades?

Interpret an unchanged or worse result

No difference is inconclusive: the active orders may have had the same outcome under both paths, or the relevant bars may lack finer data. A worse result means the strategy is sensitive to this simulation assumption; it does not prove that the new number equals live performance.

  • Check a recent candidate trade with available lower-timeframe data before investigating older history.
  • Check whether the exits were pending during the disputed movement, rather than submitted afterward.
  • Reconcile broker fills separately using actual order and fill records. A trade CSV cannot reconstruct missing intrabar prices.
Where Pineify fits

Backtest Deep Report

Analyze the two exported TradingView trade CSVs separately, then compare the reports with your saved settings. The report analyzes trade records; it does not rerun the broker emulator or supply missing intrabars.

Also useful: Pine Script AI Coding Agent. Ask for help making order activation, bracket cancellation, costs, and execution settings explicit in strategy code. Validate changes and rerun the controlled comparison.

Analyze a Trade CSV

Frequently asked questions

Educational information, not investment advice. All example prices and outcomes are hypothetical. Simulated fills and past results do not guarantee live execution or future returns.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.