5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

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

5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby mefTrader » 25 May 2012

I have a 5min strategy with IntraBarOrderGeneration=on and in the back testing setting parameters I have Bar Magnifier set to 1min and I seem to be getting good results with that. Im assuming that the strategy is evaluated 4 times per 1 min bar? is that correct

How could I set up a chart with a multi time frame to accomplish the same? for example Data 2 is 5min and Data 1 is 1min or what timeframe would data1 be?

The reason for this is that 5min with bar magnifier =1 tick seems to be too low a resolution for my strategy but 5min with bar magnifier=1min seems to be okay

Regards

User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby Henry MultiСharts » 25 May 2012

mefTrader wrote:I have a 5min strategy with IntraBarOrderGeneration=on and in the back testing setting parameters I have Bar Magnifier set to 1min and I seem to be getting good results with that. Im assuming that the strategy is evaluated 4 times per 1 min bar? is that correct

In MultiCharts 8.0 beta 2 and lower:
With IOG and Bar Magnifier enabled on historical data the script will be calculated on the close of each bar of the detailed data series selected in bar magnifier + high/low of the main data series. Order is filled only on these detailed close values+high/low of the main data series.

In MultiCharts 8.0 beta 3 and higher:
With IOG and Bar Magnifier enabled on historical data the script will be calculated on the Open value of the main data series, then OHLC of each bar of the detailed data series selected in bar magnifier (Price movement assumption is used), then on the Close of the main data series. Order is filled only on these O (base)-OHLC (detailed)-C (base) values.

mefTrader wrote:How could I set up a chart with a multi time frame to accomplish the same? for example Data 2 is 5min and Data 1 is 1min or what timeframe would data1 be?

You can specify the data series sequence the way you like but it will be rather tricky to imitate the same bar magnifier calculation method on multiple data series.
These users thanked the author Henry MultiСharts for the post:
mefTrader

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby mefTrader » 26 May 2012

Okay it is tricky - but it has been done before?

How does the algo evaluate the High and Low of the main series(5min) ? It is totally asynchronous from the close of bar (1min) detailed series? If so then I can see how it would not be easy to imitate otherwise close of bar 1min should suffice?

Please advise before I invest too much time in this effort - thanks

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby mefTrader » 29 May 2012

Henry is it possible to get lower resolutions with Bar magnifier than 1minute but greater than 1 tick resolution?

Thanks
Morgan

User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby Henry MultiСharts » 30 May 2012

mefTrader wrote:Okay it is tricky - but it has been done before?

How does the algo evaluate the High and Low of the main series(5min) ? It is totally asynchronous from the close of bar (1min) detailed series? If so then I can see how it would not be easy to imitate otherwise close of bar 1min should suffice?

Please advise before I invest too much time in this effort - thanks

In MultiCharts 8.0 beta 2 and lower:
The calculation sequence with IOG and Bar Magnifier enabled is:
1) Open of the main data series bar;
2) Close of the first detailed series bar;
3) Close of the next detailed series bar;

n) Close of the main data series bar;

If the next bar of the detailed data series contains an extreme (High(Detailed) = High(Base) or Low(Detailed) = Low(Base)) of the main data series, then extreme value will be calculated prior to Close (Base) value.

If the next bar of the detailed data series contains both extremes (High and Low) then the extreme values will be calculated according to the most possible price movement defined by the following algorithm:
- If High-Open < Open – Low, then High is calculated first, then Low, then Close of this bar.
- If High-Open >= Open – Low, then Low is calculated first, then High, then Close of this bar.

mefTrader wrote:Henry is it possible to get lower resolutions with Bar magnifier than 1minute but greater than 1 tick resolution?

Thanks
Morgan

You can set any N tick resolution (for ex. 145 tick) for Bar Magnifier.

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby mefTrader » 31 May 2012

okay how do traders execute a backtest with BM=1min with IOG=on where they get good results but at BM=1 tick there are bad results...

What's the setup to execute something like this ? Is it possible ?

Has anybody tried this before?

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby mefTrader » 31 May 2012

In MultiCharts 8.0 beta 2 and lower:
The calculation sequence with IOG and Bar Magnifier enabled is:
1) Open of the main data series bar;
2) Close of the first detailed series bar;
3) Close of the next detailed series bar;

n) Close of the main data series bar;

If the next bar of the detailed data series contains an extreme (High(Detailed) = High(Base) or Low(Detailed) = Low(Base)) of the main data series, then extreme value will be calculated prior to Close (Base) value.

If the next bar of the detailed data series contains both extremes (High and Low) then the extreme values will be calculated according to the most possible price movement defined by the following algorithm:
- If High-Open < Open – Low, then High is calculated first, then Low, then Close of this bar.
- If High-Open >= Open – Low, then Low is calculated first, then High, then Close of this bar.


Okay taking this sequentially

The calculation sequence with IOG and Bar Magnifier enabled is:
t1 - Open of the main data series bar(say 5min bar);
t2 - Close of the first detailed series bar(say 1min bar);
at t2 , High(Detailed-1min) = High(Base-5min) , but it occured anywhere between t1 and t2? how is it evaluated - at what timepoint
t3 ..
t4..
t5 .. close of 1min and close of 5min

User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby Henry MultiСharts » 31 May 2012

mefTrader wrote:okay how do traders execute a backtest with BM=1min with IOG=on where they get good results but at BM=1 tick there are bad results...
What's the setup to execute something like this ? Is it possible ?
Has anybody tried this before?

If you want to make the calculation in real time similar to backtesting calculation with bar magnifier you will need to enable IOG and refer to the closing values of the subchart detailed bars in your code.

User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby Henry MultiСharts » 31 May 2012

mefTrader wrote:Okay taking this sequentially

The calculation sequence with IOG and Bar Magnifier enabled is:
t1 - Open of the main data series bar(say 5min bar);
t2 - Close of the first detailed series bar(say 1min bar);
at t2 , High(Detailed-1min) = High(Base-5min) , but it occured anywhere between t1 and t2? how is it evaluated - at what timepoint
t3 ..
t4..
t5 .. close of 1min and close of 5min

See post #2
Order is filled only on these detailed close values+high/low of the main data series.

User avatar
JoshM
Posts: 2089
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1525 times
Been thanked: 1485 times
Contact:

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby JoshM » 03 Jun 2012

Speaking of the Bar Magnifier, will the Bar Magnifier for the Portfolio Backtester someday be implemented?

That would make the Portfolio Backtester significantly more useful (I don't use it now because of this), and with 64-bit the previous memory limitation is erased.


User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby Henry MultiСharts » 06 Jun 2012

JoshM wrote:Speaking of the Bar Magnifier, will the Bar Magnifier for the Portfolio Backtester someday be implemented?

That would make the Portfolio Backtester significantly more useful (I don't use it now because of this), and with 64-bit the previous memory limitation is erased.


Hello Josh,

We are considering this feature for future implementation. There is no ETA at the moment.

evdl
Posts: 400
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 84 times
Been thanked: 123 times

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby evdl » 13 Aug 2012

Last week, after 5 days of unnecessary debugging, I found out that the outcome of backtesting between main MC program (on chart) and portfoliobacktester is different because of the portfoliobacktester not supporting IOG. I didn't know that.

I assume that if barmagnifier is added to the portfoliobacktester, also IOG will be supported. Although barmagnifier is a bit different than IOG. I only use IOG strategies and therefore I can not test a portfolio of symbols. Which is the purpose of the portfolio backtester.

By this post I want to let people know what can cause difference between the two backtesting tools, to avoid a lot of timeconsuming probably unnecessary debugging.

Would be great if the portfoliobacktester will support barmagnifier and IOG in the near future. I voted for MC-787. Please vote for this, if you have IOG strategies and want to test a portfolio of symbols.

Thanks
Edwin

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

Re: 5min Strategy with Bar Mag = 1min - equivalent Data 1/2?

Postby Katrin Yanenko » 14 Aug 2012

Dear Edwin,

Thank you for your suggestion.
We are considering this feature for future implementation.

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


Return to “MultiCharts”