//+------------------------------------------------------------------+ //| Ситников Валерий Яковлевич valerasva@mail.ru | //+------------------------------------------------------------------+ extern double Lot = 0.1; extern double TrSt = 300; extern double Slippage = 50; extern double Risk = 0.1; extern bool Отображение = true; extern bool Звук = false; extern double MAGICMA = 11; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { double line=0; double line1=0; double Lots=(NormalizeDouble(AccountFreeMargin()*Risk/1000.0,1)); if(Lotsline1-Slippage*Point && Bidline && Bidline-Slippage*Point) { if(Отображение==false) OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Ask+TrSt*Point,0,"",MAGICMA); if(Отображение==true) OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Ask+TrSt*Point,0,"",MAGICMA,0,Red); if(Звук) PlaySound("alert.wav"); } } //+----------------------------------------------------------------- for(int cnt=0;cntline-Slippage*Point) { if(Отображение==false) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage); if(Отображение==true) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Violet); } if(OrderStopLoss()<(Bid-Point*TrSt) && (Bid-OrderOpenPrice())>Point*TrSt) { OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrSt,OrderTakeProfit(),0); } } else { if(Bid>line && Bid(Ask+Point*TrSt) && (OrderOpenPrice()-Ask)>Point*TrSt) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrSt,OrderTakeProfit(),0); } } } } } return(0); } // the end.