Script of sell/buy stop order not working

 

I'm writing a script to learn more about mql5, this is a simple buy/sell stop order script, but it isn't workin.

I used PRINT function to test the if condition, the PRINT works, so trade.BuyStop is running, but nothing happens when I use the script.

Am I using the trade.BuyStop and trade.SellStop wrong?

#include<Trade\Trade.mqh>;
#property version   "1.00"
#property script_show_inputs
//--- input parameters
input double   Price=72200;
input double   StopLoss=100;
input double   TakeProfit=200;
input double   Lot=1;
input int      Type=1;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+

CTrade trade;
void OnStart()
  {
//---
      if (Type==1)
      {
         trade.BuyStop(Lot,Price*_Point,_Symbol,Price-StopLoss*_Point,Price+TakeProfit*_Point,ORDER_TIME_GTC,0,0);
               Print("print if the code gets here");
      }
      else
         trade.SellStop(Lot,Price*_Point,_Symbol,Price+StopLoss*_Point,Price-TakeProfit*_Point,ORDER_TIME_GTC,0,0);

   }
  
  
//+------------------------------------------------------------------+
 


Marcus Dantas

You should enter symbol() before lot in buy and sell stop code