iHighest backtesting problem

 

Anyone that knows what the problem might be?


I want the M30 highest value, but backtest strategy using 1H timeframe

double =High[iHighest(NULL,30,MODE_HIGH,20,1)];

Are not giving the correct value when backtesting on 1H timeframe.


But correct when backtesting on M30

 
pontuso:

Anyone that knows what the problem might be?


I want the M30 highest value, but backtest strategy using 1H timeframe

Are not giving the correct value when backtesting on 1H timeframe.


But correct when backtesting on M30

It is correct . . . what is held in the array High[] ?
 
RaptorUK:
It is correct . . . what is held in the array High[] ?


Sry dont understand what you mean?
 
pontuso:

Sry dont understand what you mean?
What does High[] get you ? what value ? the high of the bar obviously, but which bar ?
 
pontuso:

Anyone that knows what the problem might be?


I want the M30 highest value, but backtest strategy using 1H timeframe

Are not giving the correct value when backtesting on 1H timeframe.


But correct when backtesting on M30


Are you expecting to see the high of the last 20 complete H1 bars?

On M30 chart it will show the high of the last 20

H1, the last 10

M15, the last 40

I just noticed Raptor's meaning, easy to miss the missing i

 
pontuso: Anyone that knows what the problem might be?
double =High[iHighest(NULL,30,MODE_HIGH,20,1)];
You are mixing apples and oranges
 
GumRai:


Are you expecting to see the high of the last 20 complete H1 bars?

On M30 chart it will show the high of the last 20

H1, the last 10

M15, the last 40

I just noticed Raptor's meaning, easy to miss the missing i


Yes that correct.

But the last 10 compelte H1 bars is not the same as the last 20 complete bars M30, it will miss 30 minutes, when time is for example 10:00, 11:00, 12;00 etc.

 
RaptorUK:
What does High[] get you ? what value ? the high of the bar obviously, but which bar ?


The highest value between 1 - 20 bars back, but it shall be calculated om m30 timeframe
 
WHRoeder:
You are mixing apples and oranges

So i cant use this code för the highest value. Is there any difference between backtesting and live?
 
pontuso:

So i cant use this code för the highest value. Is there any difference between backtesting and live?


what is the difference using iHigh and High[]

why is Time bar 20 on timeframe 1H

not the Time bar 20 on timeframe M30

 
pontuso:

The highest value between 1 - 20 bars back, but it shall be calculated om m30 timeframe
Not if you are running on H1 . . .
Reason: