add global variable,
when new candle the global variable reset to zero
when global variable is zero a position can be opened and global variable set to one
when global variable is one a new position will be probhited
good idea !
thanks.
Hello,
Please look at the Notes in the end of https://www.mql5.com/en/forum/124521/page7.
Regards,
Airat
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
Hello,
I try to write some code for a EA that allows me to not take a position on a candle if an order has already been executed on this candle.
Example (UT = 1 hour):
12:00 => Ea launches a purchase order
12:43 => The stop loss is hit
12:51 => Ea launches a new purchase order. It is this order that I would ban because it is the second on a single candle.
Someone has an idea?
In advance, thank you.
Taad