iHigh returns 0 in Higher Timeframe at Backtest - page 2

 

But he also said the result will be 0 for about 16hours(if I use 1M in the function).

If we take 20 hours back then the 1Minute data is 0

Print("Index = ", Index, " iHigh M1 = ",iHigh(NULL, PERIOD_M1,1200+Index), " iLow M5 = ",iLow(NULL, PERIOD_M5,1200+Index));

The Result of this is 20 hours = 20* 60 minutes =1200 bars

2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 19 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 18 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 17 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 16 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 15 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 14 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 13 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 12 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 11 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 10 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 9 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 8 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 7 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 6 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 5 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 4 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 3 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 2 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 1 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 0 iHigh M1 = 0 iLow M5 = 0
2012.04.16 16:32:09 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: TestLowerTFData 1.0 launched.
2012.04.16 16:32:09 TestLowerTFData test started

I think now it is limited in the count of numer of bars each TF

 
deVries:

But he also said the result will be 0 for about 16hours(if I use 1M in the function).

If we take 20 hours back then the 1Minute data is 0


I think now it is limited in the count of numer of bars each TF

Yep, I agree . . .

You said " how many bars back did you wanna have the value ? " and the reply was " I tryed 20 to see, if that is the cause of the problem. " I assumed 20 was in the timeframe of the data he was trying to get the High of, M1 . . .

 
@deVries: But that would be 16hours in the Past. I was talking about the Present, where it takes 16H of backtesting to get me a result. I need to double check if there is a gap in my History-Data, because that sounds like the only reasonable explanation to my Problem.
 

2012.04.16 17:17:15 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 1001 iHigh M1 = 0 iLow M5 = 0
2012.04.16 17:17:15 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 1000 iHigh M1 = 1.3336 iLow M5 = 1.3242
2012.04.16 17:17:15 2011.12.01 00:00 TestLowerTFData EURUSDmicro,H1: Index = 999 iHigh M1 = 1.3339 iLow M5 = 1.3241

limited to 1000 bars maximal for each Timeframe in the test

It could be @tak88js a gap in your History-Data but the good thing of this is that I now see that We have data for backtesting lower Timeframe then backtest for only 1000 bars maximal lower timeframe and for uppertimeframe the test goes to maximal the time of testingframe * 1000 minutes.....

Makes you realize that testing on 1M timeframe DailyHistory can't be done directly at start daily value bar 2 will be zero

 
RaptorUK:
Do you actually have the M1 data you are looking for ? can you open a chart and set it to M1 and go looking for the data you wanted to check it is there, or check in the History Center.


You've been right, the Problem was about the missing data in the history center.

I thought, once I run the EA in M1 it saves the Data of that Timeframe at the Time's the EA is running through.

Reason: