Could someone please show me how I detect and only execute something at the beginning of a new bar please.
I know how to do it in an EA but this is the first indicator I've written.
Thanks in advance.
Please do some search before asking, there is a lot of resource on this site on this subject, for example :
It's perfectly relevant.
What is the results of your own researches ?