Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.