I have problem with my code,
How to make this open sell code only open one order at a time until it close by hit TP or SL then will continue to open another order.
extern double StopLoss = 200; // StopLoss
extern double TakeProfit = 100; //Takeprofit
extern double LotSize = 0.1; //LotSize
extern int Slippage = 3;
double SL = Bid + (StopLoss*Point);
double TP = Bid - (TakeProfit*Point);
double Lot = LotSize;
int ticket = OrderSend (Symbol(),OP_SELL,Lot,Bid,Slippage,SL,TP,NULL,0,0);
Count opened orders.
if(OrdersTotal()==0 && ---aditional conditions if any---)
ticket = OrderSend (Symbol(),OP_SELL,Lot,Bid,Slippage,SL,TP,NULL,0,0);
Even those if opening more then one trades erase return . Best of luck.