Welcome to NexusFi: the best trading community on the planet, with over 200,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Have you fixed it? I cannot believe that they havenīt fixed it yet on TOS. The scanner, columns and studies.. all with the same problem. As if they wanted to have it that way..
I think this happens because of the division by 0 here:
def perct = round((data - lo)*100/ (hi - lo),0);
If there is just one missing day, the hi and the lo will be 0, so there will be a division by zero in the formula and that will break the study.
I think we could solve it if we can ignore the 0. I came up with a logic like this:
def hi = If (vol = 0, [use the highest between 0.1 and the high], else highest(vol,252);
def lo = If (vol = 0, [use the lowest between 0.1 and the low], else lowest(vol,252);
But I donīt know how to code it.
What do you think?
Can anyone help me fix it so that it works even if there are missing days in the IV in the last year?