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)
price oscillator bands (works on some charts, but not on others)
My modified version of the above indicator is attached here in this post for reference purposes.
In the attached picture, one can identify the two new plots which I added by looking for the yellow colored lines in the subgraph.
For testing purposes, I added an input which allows the user to enable or disable the new plots which I added.
When the input called "OSC_strengthband_show" is set to false, the code always works and is identical to the older original version from the link above.
When the input called "OSC_strengthband_show" is set to true, I have observed that the indicator only works on certain combinations of instrument, resolution, and session but not on others. I suspect that the code is throwing an exception due to a null value or a NaN or something similar which is being generated within the code changes which I added.
My lack of deep experience with ninjascript programming should be noted. If anyone here can offer any ideas on how to fix the attached code, it would be greatly appreciated.
I have uploaded two sample workspaces and a log. These should make it easy to replicate the problem that I described earlier.
The first workspace should not have any problems, it is called "test_eOscBands_1".
The second workspace called "test_eOscBands_2" simply changes resolution from 6 point to 12 point, and the indicator stops working as described previously.
After loading the second workspace called "test_eOscBands_2", the log reports:
"12/9/2011 1:05:51 PM|3|4|Error on calling 'OnBarUpdate' method for indicator 'ElliotOscBands' on bar 559: Index was outside the bounds of the array."