if (Bid - OrderOpenPrice() > Point * TrailingStop&&OrderStopLoss() < Bid - Point * TrailingStop)
{
if (stochastic_248 < 50.0 && macd_572 > macd_580) price_36 = OrderTakeProfit() + TrailingPips * Point;
OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, Blue);
return (0);
}
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Could someone please take look at this code and tell me why it is moving the stoploss in both directions??? Could you also tell me how to correct this problem? I really appreciate your help!
if (Bid - OrderOpenPrice() <= Point * TrailingStop) continue;
if (OrderStopLoss >= Bid - Point * TrailingStop) continue;
RefreshRates();
OrderStopLoss = Bid - Point * TrailingStop;
if (stochastic_248 < 50.0 && macd_572 > macd_580) price_36 = OrderTakeProfit() + TrailingPips * Point;
OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss, OrderTakeProfit, 0, Blue);
return (0);
Or...
Could this be the problem???
if (StopLoss > 0.0) OrderStopLoss = Ask - StopLoss * Point;