Welcome to NexusFi: the best trading community on the planet, with over 150,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 -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
****************************************************
Problem is I get a floating point invalid operation error when I apply this code. Can anyone help?
TIA!
David
Can you help answer these questions from other members on NexusFi?
1) what are you passing in for length?
2) is/could the denominator be calculating as 0? (causing a divide by zero error; need to prevent that from happening if so)
3) have you taken a look at the Kaufman Efficiency Ratio indicator code in the D/L section?
1. My coding ability is fairly rudimentary and as such I don't understand what "passing in for length" means. :/
2. Looks like it is a divide by zero error because I added the alternative:
the solution @SMCJB provided should fix the error. In general you might want to add a similar check to every division you do within any EasyLanguage code, to ensure the divisor is not 0 (it's enough to trigger this error in case it's 0 once on the very first call).