rogue1:
Is there a simple way to get an EA to only open one trade per bar?
I keep coming across looping problems, especially when I open a trade based on the current ask (rather than a candle close). If the exit conditions occur in the same bar it will open and close continuously.
I would like to know if anyone has a simple solution to this problem...
I found a good solution for you - https://www.mql5.com/en/forum/5762/page3#comment_13056672

How to detect a new bar
- 2017.07.16
- www.mql5.com
Hi All, I'm a complete newbie to MQL5 but I've done a fair bit of coding for other platforms...
Kenneth Parling:
Thank you...
I found a good solution for you - https://www.mql5.com/en/forum/5762/page3#comment_13056672

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
Is there a simple way to get an EA to only open one trade per bar?
I keep coming across looping problems, especially when I open a trade based on the current ask (rather than a candle close). If the exit conditions occur in the same bar it will open and close continuously.
I would like to know if anyone has a simple solution to this problem...