Backtesting Strategy "IntraBarOrderGeneration=true"

Questions about MultiCharts and user contributed studies.
mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Backtesting Strategy "IntraBarOrderGeneration=true"

Postby mefTrader » 12 Apr 2012

I am noticing big differences between backtesting a strategy and watching it trade live

(1)I tried to use "Bar Magnifier" with 1 tick resolution over the last 6 months but it was not able to collect all the data - so it turned it off again.

(2)Tried this with different data feeds ( ESignal, DTN IQ for FOREX 1 min data EURUSD). Has anyone been able to backtest successfully with this enabled?

(3)It would be great to be a able to replay a trade sequence tick by tick to help to debug a trade sequence...

Should the same strategy be able to be backtested as well as traded live or should the live strategy should be slightly modified versus the backtested one - am thinking of adding 'barstatus(1)=2' to the live strategy(a copy of the backtested strategy) to match the backtested strategy

i.e. here is the code difference(calculate on the closing tick of a 1 min bar)

Code: Select all

if ((c[0]-c[num_bars_short]>=abs_volatility_short) and ((long_short=0) or (long_short=2)) and barstatus(1)=2 )then
begin
 sellshort...
end

versus tick by tick for the backtested one (have not been able to backtest this with 'bar magnifier enabled and set 1 tick resolution)

Code: Select all

if ((c[0]-c[num_bars_short]>=abs_volatility_short) and ((long_short=0) or (long_short=2))  )then
begin
 sellshort...
end;


User avatar
Henry MultiСharts
Posts: 8383
Joined: 25 Aug 2011
Has thanked: 1200 times
Been thanked: 2679 times

Re: Backtesting Strategy "IntraBarOrderGeneration=true"

Postby Henry MultiСharts » 12 Apr 2012

Hello Meftrader,

I believe all these questions have been already discussed in the following topic.

1) The error message means that bar magnifier is not able to obtain the detailed data from your database or data feed. If your data feed does not provide the requested amount of detailed data-you need to import it to your local database. In other case-you need to narrow the data range to the amount of data you have.

2) Please make sure that in Quote manager->Tools->Data sources->IQFeed->Settings->the option "build minute and daily bars from tick data" is unchecked.
To make this setting come into effect you need to restart MultiCharts and all of its applications.

3) Tick by tick data playback is already available in MultiCharts for a chart with one data series. You need to be able to get the tick data from your data feed or from your local data base. If you have "IOG=On" for your signal-it will be calculated on every tick.

Basically the strategy you are using should not be modified for backtesting or real trading.


Return to “MultiCharts”