Two backtests can use the same five-minute bars, entry signals, stop-loss distances and profit targets, yet report different exit results. When both protective exits fall inside one historical bar, the difference may come from the sequence of prices assumed by the simulation rather than the quality of the strategy. MultiCharts classic offers two distinct tools for investigating this problem: Intra-Bar Order Generation (IOG) and Bar Magnifier.

Before optimizing the stop or target, establish which execution assumptions your research actually uses. Otherwise, an apparently profitable parameter combination may simply benefit from an optimistic model of intrabar price movement.

One candle, two possible trade outcomes

Assume one long contract was already filled at 100 before the five-minute bar begins. Its stop at 98 and profit target at 104 are both active from the start of the bar. The hypothetical bar has Open = 100, High = 105, Low = 97 and Close = 102. Neither the open nor the close reveals the sequence of the two extremes.

How IOG and Bar Magnifier Affect Same-Bar Stop and Target Backtests
Figure 1. Two hypothetical paths with identical OHLC. The colored marker indicates the first exit level touched; subsequent prices are shown in gray because the position has already exited in the simplified example.
Scenario First exit level reached Gross result
A: target first 104 +4 points
B: stop first 98 −2 points

For a hypothetical contract with BigPointValue of $50, the two modeled outcomes are +$200 and −$100 before commissions and slippage. The difference is $300 on one trade, despite identical OHLC. This assumes fills exactly at the specified prices, no further entry and effective cancellation of the remaining exit. Real stop execution can be worse than its trigger price, and touching a limit price does not guarantee a fill. These paths are examples of ambiguity, not claims about which path MultiCharts will choose for this particular bar.

IOG changes when the signal can calculate

Without IOG, ordinary PowerLanguage signal calculations on regular time-based charts normally occur at the end of the bar. The strategy can issue orders according to its order instructions, but that does not mean every exit waits until the next closing price. The backtesting engine can evaluate working orders separately, and built-in protective exit functions have special intrabar behavior.

With IOG enabled, historical signal evaluation can occur at multiple points within the bar, and real-time evaluation can occur on incoming ticks when the relevant signal settings permit it. MultiCharts 15 and later offer additional intrabar event choices; inspect the actual Format Signal settings instead of assuming that checking the IOG box alone enables every-tick calculation. Moving an existing entry rule to IOG can change when it becomes true, whether it remains true at the close and how often orders are generated.

Bar Magnifier changes the historical price detail

Bar Magnifier adds lower-resolution historical information inside a higher-timeframe bar, such as one-minute bars within a five-minute chart or individual ticks where available. If the first minute contains the target and a later minute contains the stop, the sequence is more informative than the main bar's OHLC alone. But if both prices are reached inside the same one-minute bar, uncertainty may remain within that smaller interval.

Configuration Ordinary signal evaluation in historical testing Price information used
IOG off / Magnifier off Main bar close Main OHLC and intrabar assumptions
IOG on / Magnifier off Main bar OHLC evaluations in the every-tick mode Main OHLC and intrabar assumptions
IOG off / Magnifier on Main bar close Finer historical data for order simulation
IOG on / Magnifier on Main and finer-bar evaluation points in the every-tick mode Finer historical data for simulation and calculation

This comparison follows the documented behavior for regular charts; built-in stop and target functions, order types, intrabar event selections and nonstandard chart types require their own checks. Turning on IOG alone does not create missing tick history. Turning on Bar Magnifier alone does not convert a close-based entry signal into an every-tick entry rule.

PowerLanguage exit configuration: points versus money

For an existing classic MultiCharts Signal, the following illustrative excerpt expresses the two-point stop and four-point target on a per-contract monetary basis. It deliberately contains no entry conditions and is not a complete executable strategy.

Inputs: StopPoints(2), TargetPoints(4);

{ Attach to an existing entry signal. }
SetStopContract;
SetStopLoss(StopPoints * BigPointValue);
SetProfitTarget(TargetPoints * BigPointValue);

SetStopContract establishes the per-contract basis; SetStopLoss and SetProfitTarget accept monetary amounts. BigPointValue converts a full price point into its monetary value for the configured instrument. Verify the symbol definition, tick increment and contract value; do not confuse a point with a tick. Under the example's $50 point value, the amounts are $100 and $200 per contract. Both exit functions can act intrabar, including the entry bar. Do not place them behind a bar-close-only condition merely because the entry rule uses closed bars. If other signals on the same chart select a different stop basis, the last effective basis selection may control the built-in exits. Review all signals together.

The excerpt uses documented classic PowerLanguage keywords, not PowerLanguage .NET syntax. It has not been compiled or tested on a MultiCharts installation. Confirm the exact order activation timing and actual broker-side protection for your setup.

A controlled four-run backtest

  1. Save the current strategy and chart configuration. Freeze symbol, contract mapping, session template, test dates, position sizing, entry logic, commissions, slippage and limit-fill assumptions.
  2. Run the baseline with IOG and Bar Magnifier disabled. Export the trade list and note every trade whose active stop and target were both inside a single main bar.
  3. Repeat with Bar Magnifier enabled at one-minute resolution while leaving IOG off. Inspect changes to those specific exits, not just aggregate net profit.
  4. Repeat with IOG enabled and Magnifier disabled, then with both enabled. Check whether the entry list changed as well as the exit list. If it did, do not attribute all performance changes to exit sequencing.
  5. Where your data provider supports it, repeat with tick detail. Record the covered dates and verify that the detailed history actually exists throughout the sample.

For a diagnostic comparison, an entry intended to occur only on a completed bar must remain close-gated when IOG is enabled; add appropriate closed-bar checks and per-signal order controls. Review the IOG entry/exit frequency settings and prevent an accidental second entry after an exit on the same bar. Separate testing of entry timing from testing of protective orders is often more informative than optimizing everything together.

How to evaluate the differences

Track the number of ambiguous main bars, changed exit outcomes, trade count, gross profit, commissions, maximum drawdown and net performance across configurations. For an independent stress test, recalculate outcomes on a fixed list of ambiguous trades under both target-first and stop-first assumptions. Ten identical hypothetical trades from the example would differ by $3,000 between the two extremes before costs. This is a sensitivity illustration, not a performance prediction or a substitute for rerunning the actual strategy with correct data.

If profitability collapses when finer data is introduced, investigate whether the original result depended on the coarse fill assumptions. If results change because the IOG entry rule produces additional trades, isolate that change before comparing stop/target parameters. Use an untouched out-of-sample period after selecting the configuration, rather than choosing whichever intrabar setting gives the best historical profit.

Before deploying live

MultiCharts notes that missing detailed historical data can be emulated from OHLC, so enabling Bar Magnifier does not prove that genuine ticks exist throughout the test. More detailed history also increases resource use. Data Playback and ordinary historical backtesting have different calculation and execution models, and Bar Magnifier is not used simultaneously with Data Playback. Use playback and a controlled simulation account as additional validation, not as a guarantee of equivalent live fills.

Check the broker connection's stop routing, limit-order assumptions, OCO behavior, partial fills and actual strategy-versus-broker position synchronization. A more precise simulation cannot recreate queue position, liquidity, latency or every trading interruption. Automated strategies remain exposed to losses, including losses beyond intended stops.

Official MultiCharts references: IOG settings, Bar Magnifier, Signal calculations, SetStopLoss, and SetProfitTarget.

If you need to audit or adapt the intrabar execution logic of an existing PowerLanguage signal, our Custom Trading Software Development Services can assist with strategy design and validation.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.