-
Don't post pictures of code, they are too hard to read.
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Use new bar code.
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart), volume is unreliable (miss ticks), Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
New candle - MQL4 programming forum #3 (2014)I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
Running EA once at the start of each bar - MQL4 programming forum (2011)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use