how to get the index of bar ? - page 2

 
It should compile and work in mql4 as well.
 
kypa:
It should compile and work in mql4 as well.

Hey, you are right! I just changed the extension to .mq4 and it compiled.

 
Yep. And not just compile, but should also work (because there are mql5 things that will compile in mql4 but won't work on the chart, like PLOT_ARROW_SHIFT for example).