xard777 wrote: Sat Sep 10, 2022 7:30 pm
Update XU v39-Setup
This version should be easier to trade.
It is designed for Indices but should work on currencies and commodities.
I have added my latest version of "The Art of Compounding" spreadsheet which now includes sheets for Feb, Mar, and Apr trading months.
Enjoy!
Xard777
Hi XARD,
I've been using XU v6 version because most of the later versions give me a "Zero divide" error. Could you please help look at the code? I understand that only a few people are getting this error but it will be nice if you can add a zero divide constraint to the codes. It seems "XU v39-XARD UNIVERSE" and perhaps the Clock might be the culprits. I recall Mladen suggesting the code snippet below as a possible fix;
"Mladen Rakic 2009.09.18 17:09 #7
...
Zero divide error is exclusively a coding error. Metatrader does not provide a trap (or rather, that message is the trap, and since by definition divide by zero yields to undefined, they chose the terminate the code execution in such cases) for such errors, so if not dealt with within the code it will happen, sooner or later
Find in the code every occurrence of division and add before every division a zero condition checking
Something like this :"
Code: Select all
if (divisor!=0)
result = dividend/divisor;
else result = 0; // or whatever result you prefer here since the result
// of division by 0 by definition is undefined
XARD: Thanks I will give it a try when I am sober