#property copyright "mokuro89" #property link "http://www.forexfactory.com/mokuro89" //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { //---- int digits = MarketInfo(Symbol(),MODE_DIGITS); double value = NormalizeDouble(WindowPriceOnDropped(),digits); for(int i=OrdersTotal()-1;i>=0;i--) { if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue; if(OrderSymbol()!=Symbol()) continue; RefreshRates(); if(OrderType()==OP_BUY) { if(valueAsk) OrderModify(OrderTicket(),OrderOpenPrice(),value,OrderTakeProfit(),OrderExpiration(),White); } if((OrderType()==OP_BUYSTOP) || (OrderType()==OP_BUYLIMIT)) { if(valueOrderOpenPrice()) OrderModify(OrderTicket(),OrderOpenPrice(),value,OrderTakeProfit(),OrderExpiration(),White); } } return(0); } //+------------------------------------------------------------------+