//+——————————————————————+ //| | //+——————————————————————+ void TrailingStep(double trailingStepStartPips, double _trailingStepPips, double initialStopLossInPips=0, bool useSymbol=false, bool useMagicNumber=false, int _magicNumber=0, bool initialStopLossWillBeDone=true) { for(int i=OrdersTotal()-1; i>=0; i–) { if(OrderSelect(i,SELECT_BY_POS)) { bool magic = (useMagicNumber) ? (OrderMagicNumber()==_magicNumber) : true; bool symbol = (useSymbol) ? (OrderSymbol()==Symbol()) : true; if(!magic || !symbol) continue; if(OrderType() == OP_BUY) { if(OrderStopLoss() >= NormalizeDouble(OrderOpenPrice() + initialStopLossInPips*_Point*10,_Digits) …
Read more