I created an ea that is doing really good except for one thing. Sometime it executes trades at the same order price as a current open trade. I have come up with a way to fix it, but can seem to find a way to code it correctly. How I would like the logic of the coding to execute is: if ask price is higher than current open position(s) price by 10 pips execute short position or bid price is higher than current open position(s) price by 10 pips execute long position. I can NOT find the coding for open position price. I need some help.
- Flexible MetaTrader 5 trading system with all order types
- MetaTrader 5 for your employees
- MetaEditor - Professional editor of trading applications
how many open positions max?

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