If you have the time when they crossed you can use iBarShift. It will give you the index of the bar at certain time.
If you don't then you need to count bars in a loop from 0 upwards until ema cross.
irusoh1 wrote:
If you have the time when they crossed you can use iBarShift. It will give you
the index of the bar at certain time.
If you don't then you need to count bars in a loop from 0 upwards until ema cross.
thanks, do you have an example of code that loop from 0 upwards until ema cross
?
What to use, iBarShift ? and how ?