أحصل على ربح غير مرغوب عند تشغيل وقف الخسارة المتحرك لأن الرمز لا يمثل عمولة ومبادلة ،
جربت ما لا يعمل
بحاجة الى مساعدة ، شكرا!
Void LongTrailingStop ()
int lcnt
int ltotal = OrdersTotal ()؛
dual BuyProfit؛
لـ (lcnt = ltotal-1؛ lcnt gt؛ = 0؛ lcnt--)
OrderSelect (lcnt، SELECT_BY_POS، MODE_TRADES)؛
if (OrderType () lt؛ = OP_SELL OrderSymbol () == Symbol ())
إذا بدأ (LongType () == OP_BUY)/long position
إذا (TrailingStopgt، 0)
إذا (المزايدة-OrderOpenPrice () GT؛ (نقطة * TrailingStop))
إذا (OrderStopLoss () لتر، Bid- (نقطة * TrailingStop))
BuyProfit = (OrderProfit () OrderCommission () OrderSwap ())؛
OrderModify (OrderTicket ()، OrderOpenPrice ()، Bid- (نقطة * TrailingStop BuyProfit)، OrderTakeProfit ()، 0، أخضر)؛
عودة (0)؛