error invalid volume when i try to run function to calculate lotsize it on boom and crash indices MQL5

 
Hello  every one need help  i created  a function to calculate lotsize  and to risk a certain percentage of account balance i have tested the the function on currency pairs and it works perfectly but when i try to use it on boom and crash indices  it fail to calculate lot size  and i get an error in the journal of invalid volume.i have attached the a png file below and the code.if anyone can help me fix  this error
#include <Trade/Trade.mqh>
CTrade trade;
int  OnInit()
  {
     
     //s ort the  arrays from the current candle downwards 
   


   //trade.SetExpertMagicNumber(MagicNumber);

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+

void OnTick(){
double entry = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
 entry= NormalizeDouble(entry,_Digits);

double sl = entry-200*_Point;
sl= NormalizeDouble(sl,_Digits);

double lotz=Calculate_lotsize(20.0,0.00200);
trade.Sell(lotz,Symbol(),entry,sl,0,"Trial_sell1");

}
  //---  Lotsize
  double Calculate_lotsize(double Riskpercent,double slDistance)
  {
   double ticksize=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE);
   double tickvalue=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE);
   double lotstep =SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);
  // Print(ticksize,"ticksize ", tickvalue," tickvalue ",lotstep,"lotstep");
   if(ticksize==0 || tickvalue==0 || lotstep==0)
     {
      Print(__FUNCTION__,"< Lotsize cannot be calculated....");
      return 0;
     }
     
   double riskMoney =AccountInfoDouble(ACCOUNT_EQUITY)*Riskpercent/100;
   double Moneylotstep=(slDistance/ticksize)*tickvalue*lotstep;
   if(Moneylotstep==0)
     {
      Print(__FUNCTION__,"< Moneylotstep cannot be calculated....");
      return 0;
     }
   double lots =MathFloor(riskMoney/Moneylotstep)*lotstep;
//Print("riskmoney ",riskMoney);
   return lots;
  }

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Account Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Files:
lotsize_.PNG  31 kb