How to calculate bar distance beyond timeseries array range?

 

Hi,


I have trendline on D1 chart with time1=2009.12.03 and time2=2010.04.15. This gives 1598 bars between time1 and time2.

For M1 chart for the same symbol I have history only to 04.10.2010, so in this compression time1 is outside the timeseries array.


When I find the time2 point on M1 chart and try to move it with mouse, then MT4 shows that a distance between time2 and time1 is 131324.


Is there any way to calculate this distance from MQL?


Thanks,

Lukasz

Reason: