Hello,
I have this High/Low trailing function on which I'm getting an Error 1 while running. I know this error is not very significant but I can't understand why it's coming up.
the strangest part is that I wrote
which is now actually checking twice that prevsl is different than newsl (cause I'm going crazy), but the the algorithm still goes through, even though when I print the two values, they are the same!
Because that's double, your way to compare prices is not correct. Check the forum they are plenty of topics on that.
newsl=1.2500000000000002
prevsl=1.25000
As double they are different, but as price ?
Because that's double, your way to compare prices is not correct. Check the forum they are plenty of topics on that.
newsl=1.2500000000000002
prevsl=1.25000
As double they are different, but as price ?
I'm already using WHRoeder's NormalizePrice() function to normalize the newsl, shouldn't that solve the "1.2500000000000002" issue?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have this High/Low trailing function on which I'm getting an Error 1 while running. I know this error is not very significant but I can't understand why it's coming up.
the strangest part is that I wrote
which is now actually checking twice that prevsl is different than newsl (cause I'm going crazy), but the the algorithm still goes through, even though when I print the two values, they are the same!