FoxGuy:
I posted a little code snippet that might help . . . https://www.mql5.com/en/forum/134827
Thanks;
I take it I am wrong in thinking there is a function that does this. Oh well.
Bars is unreliable (won't change when you reach max bars in chart.) Volume is unreliable (you can miss ticks) Always use time.
int start(){ static datetime Time0; bool newBar = (Time0 != Time[0]); Time0 = Time[0];
I don't use a function here because it can only be called once per tick, (subsequent calls will always return false.) Alternatively:
int start(){ static datetime Time0; if (Time0 == Time[0]) return; Time0 = Time[0];
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I new to MT4.
I think I remember reading somewhere in the dictionary a way to determine if the tick that's being processed is the 1st tick of a new bar, but I can't find it now.
Can anyone help?