Help Needed: Invalid Stops
// Place order with calculated stop loss if (isLong) { trade.Buy(lotSize, symbol, price, slippage,stopLoss, "Trade executed by EA"); } else { trade.Sell(lotSize, symbol, price, slippage,2.0, "Trade executed by EA"); }
Here you're making a mistake with the params, there is no slippage parameter. This "slippage" is where the stopLoss parameter should be. That's why you're seeing SL = 10.0 which is wrong (slippage is 10).
it should be:
trade.Sell(lotSize, symbol, price, stopLoss, takeProfit, "");
trade.Buy(lotSize, symbol, price, stopLoss, takeProfit, "");
does anybody know how to fix this?
thank you. 🙏