NexusFi: Find Your Edge


Home Menu

 





price oscillator bands (works on some charts, but not on others)


Discussion in NinjaTrader

Updated
    1. trending_up 2,596 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 5 attachments




 
Search this Thread

price oscillator bands (works on some charts, but not on others)

  #1 (permalink)
 khmodel 
Mountain Lakes NJ
 
Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker: Mirus/Zen-Fire
Trading: ES
Posts: 10 since May 2010
Thanks Given: 46
Thanks Received: 7

I recently added new plots to an older pre-existing ninjascript that can be found here in post #3 (ElliotOscillator1.2.zip):
https://ninjatrader.com/support/f...ead.php?t=2681

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.

Attached Thumbnails
Click image for larger version

Name:	1111207a_test_01.jpg
Views:	320
Size:	99.4 KB
ID:	56894  
Attached Files
Elite Membership required to download: ElliotOscBands.zip
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
Quant vue
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #3 (permalink)
 khmodel 
Mountain Lakes NJ
 
Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker: Mirus/Zen-Fire
Trading: ES
Posts: 10 since May 2010
Thanks Given: 46
Thanks Received: 7


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."

Attached Files
Elite Membership required to download: test_eOscBands_1.zip
Elite Membership required to download: test_eOscBands_2.zip
Elite Membership required to download: log.20111209.zip
Started this thread Reply With Quote




Last Updated on December 9, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts