Expert Advisor Moving Average by Metaquotes Change?

 

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.

 
Learn to modify the code yourself, or pay someone. No slaves here.