How to get Lot size if i have fixed target size($) and fixed target range(TP in points)? MQL5

 
Hello I want to calculate Lot size for bitcoin trading.
double TP_To_Lot(double TP_Money, double TP_Distance)
{
   double TickSize   = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
   double TickValue  = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);  
   double TickTotal  = TP_Distance / TickSize;
   double Lot        = TP_Money / (TickTotal * TickValue);

return(Lot);
}

this function have input for how much TP_Money must it win in some TP_Distance.

please give me suggestions about it.

thank you in advance.

Reason: