Hi,
I want your help to get part of my code. I would like to start a new Long trade with 0.02lots once if the price falls about 50 pips, So I want to place ExistPositions0.02lots() FALSE first and place it TRUE when the new order with 0.02lots is opened.
How can I change this ExistPositions0.02lots() ? )
Bool ExistPositions0.02lots()
for (int I=0; ilt;OrdersTotal(); I )
if (OrderSelect(I, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol()==Symbol() OrderLots()==0.02)
return(True);
return(False);
void DoublePositionBuy(int Perte1)
if (ExistPositions() ! ExistPositions0.02lots())
for (int I=0; ilt;OrdersTotal(); I )
if (OrderSelect(I, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol()==Symbol())
if (OrderType()==OP_BUY)
if (OrderOpenPrice() - Ask gt; Point * Perte1)
OpenBuyDouble();
THANKS A LOT.