The strategy tester allows for "Model: Open prices only" in MT4/MT5, however its baked into the tester. I need this added to my EA's such that after my rules are met, then each buy/sell order is opened at/with the next new candle open, such that with each order is submitted for execution starting exactly with the open of the next new candle (for all current timeframes, etc.) automatically. Would anyone know how to code this in MQL4 &/or MQL5, and kindly share or message me?
Example: at the moment of the birth of a new bar, a position of 1.0 lot is opened
- 2020.09.17
- www.mql5.com
So filter your ticks by new bar — what's the problem?
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.04.04
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.05.06
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The strategy tester allows for "Model: Open prices only" in MT4/MT5, however its baked into the tester. I need this added to my EA's such that after my rules are met, then each buy/sell order is opened at/with the next new candle open, such that with each order is submitted for execution starting exactly with the open of the next new candle (for all current timeframes, etc.) automatically. Would anyone know how to code this in MQL4 &/or MQL5, and kindly share or message me?