Forum

Why are these stop loss not stopping the loss and why take profits are not taking profit. They even calculate the stop loss and take profit properly but do not take any action.

// Input variables input double TradeVolume= 0.1 ; input int StopLoss= 1000 ; input int TakeProfit= 1000 ; input int MAPeriod= 10 ; // Global variables bool glBuyPlaced, glSellPlaced; // OnTick() event handler void OnTick () { // Trade structures MqlTradeRequest request; MqlTradeResult result;