Learn to modify the code yourself, or pay someone. No slaves here.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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,
this is question for changing of way Moving Average EA of Metaquotes closing current position and open new one.
Now this EA closing current position and open new one, but at different bars.
........
if(OrderType()==OP_SELL)
{
if(Open[1]<ma && Close[1]>ma)
...........
//---- buy conditions
if(Open[1]<ma && Close[1]>ma)
First closing order at bar open, then wait another bar open and if signal exist open new position.
Can someone or maybe Metaquotes themselves change this EA to close old position and open new one with same signal at same bar?
Thank you.