Help me to fix this EA code for Order Request

 

Here is the code block that doesn't works. If the condition is true, I need to place a order for the price I specified. 
I've checked the code block using comment(); and  playsound();. the code block pass when the specified conditions are met. 

The SellSignal() custom function is an example. inside the EA the original code block returns true when the conditions are met. (because when the block returns true, the   comment(); and  playsound(); was worked).

I did check all the parameters (lot size, SL etc.) using comment();. there is no issue with them,

but there is no order placed as I required. I appreciate your support regarding this code block. what kind a modification should I do?

double low5 = iLow(_Symbol,PERIOD_M5,5);
double Stop_Loss = 50;
double Lots_Size = 0.5;
long Magic_Number = 100245;
string com2 = "Buy Trade";

void OnTick()
{
      if(SellSignal() == true)
        { 
         double SL = low5 + (Stop_Loss *Point()); // Calculate the stop loss price for the SELL order
         
         MqlTradeRequest request {};
         MqlTradeResult results {};


         request.action = TRADE_ACTION_PENDING;
         request.comment = com2;
         request.magic = Magic_Number;
         request.sl = SL;
         request.stoplimit = low5;
         request.symbol = Symbol();
         request.type = ORDER_TYPE_SELL_STOP;
         request.volume = Lots_Size;
         
         //Comment("Code Executed this far");
         //PlaySound("ok.wav");
         
         bool processed = OrderSend(request,results);
        }
        
}

bool SellSignal ()
{
if (true)
{
  return true;
}

return false;
}
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes
  • www.mql5.com
All requests to execute trade operations are sent as a structure of a trade request MqlTradeRequest using function OrderSend() . The function...
 
First check the error code after OrderSend(..)!
Second check what is written n the logs!!
 

stoplimit is not correct => use price.

request.price = low5; ==> correct
request.stoplimit = low5; ==> incorrect