Backtesting using IOG and Barstatus

Questions about MultiCharts and user contributed studies.
Posts: 1
Joined: 15 Feb 2012

Backtesting using IOG and Barstatus

Postby gisforgringo » 09 Mar 2012

When using Portfolio Backtester and when using MC backtester in backtesting mode = classic I have developed a profitable startegy.

When backtesting in extended mode with using Bar Magnifier with tick-by-tick data, the strategy turns into a loser.

I tried including the code:

[IntrabarOrderGeneration = False];

if barstatus = 2 then begin

//buy sell logic......


then re-ran the backtesting with Bar Magnifier using tick-by-tick data with no change in results.

How do I change my strategy to ensure that the strategy runs without making intra-bar trading decisions and instead only trades on bar close?/


User avatar
Katrin Yanenko
Posts: 55
Joined: 28 Nov 2011
Has thanked: 18 times
Been thanked: 22 times

Re: Backtesting using IOG and Barstatus

Postby Katrin Yanenko » 11 Mar 2012

Hi Chris,

When you turn on Bar Magnifier it presents a replay of the way a bar was formed. Tick-by-tick replay is the most precise.

Bar Magnifier is helpful when both the profit target and stop loss occurred on the same bar. In this situation, it is unclear whether the profit target or the stop loss occurred first. With Bar Magnifier, MultiCharts is able to see how the bar was formed to determine whether the profit target or the stop loss occurred first.

That is why your strategy performs different results. But the result with Bar Magnifier on is closer to real-time calculation. Without Bar Magnifier you get more optimistic results and with Bar Magnifier turned on you get more realistic results.

Bar Magnifier doesn’t make intra-bar generation of orders. It just showing you the real moving of the price because without Bar Magnifier you have only OHLC values.

Best Regards,
Katrin Yanenko
These users thanked the author Katrin Yanenko for the post:

Return to “MultiCharts”