Zero divide error and risk % of balance (Volume size depending on Stop-Loss)
-
-
It seems the EA fails to create SL in some cases - when SL is 0, error errror
-
Yeah, but why zero?, the SL is calculated using ATR multiplier so i don't see how it may return a 0, the only problem i have seen myself is that sometimes the formula for volume size tries to return a value less than 0.01 lots.
-
I'm of course aware of this error, but the problem is always in the SL size. Why it is 0, this is the question? (the link above doesn't work)
-
Here it is:
https://fxdreema.com/shared/Wi6Slhlge
I think this happens when the formula tries to return a value that is less than 0.01, but not sure.
-
I hope one day this problem will be solved in the block code.
-
For those who still have the issue - there is something I realized: As this app runs in the cloud, sometime there might be hickups... like the connection is not stable enough and so on... this could lead to issues whilst the creation of some blocks. I had the same zero-divide issue and therefore I re-created the buy and sell blocks, afterwards they worked as supposed. of course the SL cannot be 0, but I was looking for the lowest or highes candle of 10 after an EMA cross, hence I knew that the SL was never 0. It could also have been an issue with the highest/lowest function, that provided maybe a 0 as SL - but this function was also part of the buy / sell block. So again, I deleted them and re-created them, and all of a sudded the EA worked as supposed - no zero-divide anymore. No functionallity was changed... sometimes that happens - was not the first time that it took me hours to find an issues and the last solutions was to re-create the block, just to find that it could have worked just fine. I blame it on the connections losses that appear sometimes and I make mayself aware of the blocks that I was creating during that time. ... maybe that solves your issues as well.