Hi guys, How make OrderSend () act just one time..this is my code, but it buys/sell multiple times when conditions are right.
Inserted Code
int res; double Poin = Point; if ((Point == 0.00001) || (Point == 0.001)) Poin *= 10; double BuyEntry = NormalizeDouble(Open[0]+25*Poin,Digits); double SellEntry = NormalizeDouble(Open[0]-25*Poin,Digits); //--- buy conditions for (int i=0;i<NumberOfOrders;i++) { OrderSend(Symbol(),OP_BUY,LotsOptimized(),BuyEntry,3,NormalizeDouble(Ask-SL*Poin,Digits),NormalizeDouble(Ask+TP*Poin,Digits),"",MagicNum,0,clrRoyalBlue); } //--- sell conditions for (int j=0;j<NumberOfOrders;j++) { res=OrderSend(Symbol(),OP_SELL,LotsOptimized(),SellEntry,3,NormalizeDouble(Bid+SL*Poin,Digits),NormalizeDouble(Bid-TP*Poin,Digits),"",MagicNum,0,clrOrangeRed); }