datetime difference between two points
Subtract one time from the other. That is the difference in seconds.
Divide by 60 to get the difference in minutes.
I can take the time from an indicator simply by declaring it the code:
double time1= icustom ()
double time2= icustom ()
(time1-time2) /60
thanks for the answers, give me a tremendous help. But I have a doubt, I use:
iTime (Symbol(), PERIOD_CURRENT,i)
but do not understand how to take the time on:
iCustom(Symbol(), PERIOD_CURRENT, "::Indicators\\myindicator.ex4", 0, i)
Thanks for your help
- iTime(Symbol(), PERIOD_CURRENT, i) is the same as Time[i].
- There is no time with iCustom. You have the "i" use Time[i].
Ok thanks WHRoeder, a small step understand the code. With this formula, I should have found the solution
double A= (Time[1+i] - Time[2+i]) /60; //Minutes between Candle1 and Candle2
Correct?!?
But I still have a problem, I can not understand how to read a time of an out buffer, with Time[i]
But I still have a problem, I can not understand how to read a time of an out buffer, with Time[i]
If I have two points with two different times can I know the time difference in minutes?