Is there a bug in CheckOpenShort of CMoneyFixedRisk library ?

 

I,


I think i've found a bug in CMoneyFixedRisk Library.


I wrote an EA i try in strategy tester. but on a precise candle my EA stop with this critical error :

"2020.04.17 01:17:00   zero divide in 'MoneyFixedRisk.mqh' (97,50)"


I've opened 'MoneyFixedRisk.mqh' file and at line 90, char 50 it's the position of 'loss' variable (this var is calculated by this Library).

I think the probability to have exactly a 0.0000000 loss is very very smal, but it's happen for me and this case isn't managed by this library.


I haven't found any where to post this bug so I post here.

Is someone else have this strange error ?

 
I actively use both 'MoneyFixedMargin.mqh' and 'MoneyFixedRisk.mqh' for risk calculations. Never hit the 'division by zero' error.
 
fabienlege:

I,


I think i've found a bug in CMoneyFixedRisk Library.


I wrote an EA i try in strategy tester. but on a precise candle my EA stop with this critical error :

"2020.04.17 01:17:00   zero divide in 'MoneyFixedRisk.mqh' (97,50)"


I've opened 'MoneyFixedRisk.mqh' file and at line 90, char 50 it's the position of 'loss' variable (this var is calculated by this Library).

I think the probability to have exactly a 0.0000000 loss is very very smal, but it's happen for me and this case isn't managed by this library.


I haven't found any where to post this bug so I post here.

Is someone else have this strange error ?

Any input outside the allowed range

Reason: