Need help calculate the lot size relative to my stoploss.

 

I've been learning MQL5 for the last 3 days and no video online has shown me how to set a stop loss with correct risk management.

I've seen a few posts with this topic but most of them wasn't really addressing the issue. I want it so the SAR Value is the stop loss and the lot size is equivalent to that.

Please let me know what approaches have you guys taken on this, many thanks.

   //For Risk Management
   double StoplossInPips = TakeProfit;
   TakeProfit = Latest_Price.bid + TakeProfit;
   
   //Risk Management
   
   
   //double Equity = AccountInfoDouble(ACCOUNT_EQUITY);
   //double TickValue = MarketInfo(_Symbol, MODE_TICKVALUE);

  
   Trade.Sell(LotsSize,NULL,0,SARValue,TakeProfit,NULL);                                                 
   AllowedShort = false;