By just having the Property (and everything else commented out) I get this error:
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
exposing the wavetrend indicator for strategy builder
Collapse
X
-
Even if I comment out everything but the Property and the AddPlot it still gives the same error so the error had to of came from them. Probably just from having the property.
By just having the Property (and everything else commented out) I get this error:
Strategy 'ExposedStrategy': Error on calling 'OnBarUpdate' method on bar 2: Index was outside the bounds of the array.
-
Hello Nyman,Originally posted by Nyman View PostCan someone please provide sufficient reference on how to use the DivergenceInputsSeries indicator in strategy builder? I want access to the signal when the up and down divergence has occurred and perhaps compare it to some value. I have followed the entire discussion above but no definite solution. I would to make the changes inside of the DivergenceInputsSeries indicator.
Are you referring to this indicator on the User App Share? (As a tip, be sure to include the indicator you are inquiring about)
https://ninjatraderecosystem.com/use...inputseries-2/
Instead of two private bool series declared on lines 29 and 30, change this to plots added with AddPlot() and the Values returned as public Series<double> objects using the XmlIgnore attribute.
Below is a link to example code.
https://ninjatrader.com/support/foru...64#post1182264
Where Signalup[0] / Signaldn[0] was previously set to false, set this to 0 (to represent false), where Signalup[0] / Signaldn[0] was previously set to true, set this to 1 (to represent true).
ezrollin,Originally posted by ezrollin View PostEven if I comment out everything but the Property and the AddPlot it still gives the same error so the error had to of came from them. Probably just from having the property.
By just having the Property (and everything else commented out) I get this error:
I see you are using Values[2]. Have you called AddPlot() 3 times for Values[0], Values[1], and Values[2]?
What do you get for a print of Values.Count()?
Can you provide an export of a reduced test script demonstrating the behavior?
To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:- Click Tools -> Export -> NinjaScript...
- Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
- Click the 'Export' button
- Enter a unique name for the file in the value for 'File name:'
- Choose a save location -> click Save
- Click OK to clear the export location message
- (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
http://ninjatrader.com/support/helpG...-us/export.htm
Once exported, please attach the file as an attachment to your reply.Last edited by NinjaTrader_ChelseaB; 08-31-2022, 03:20 PM.Chelsea B.NinjaTrader Customer Service
Comment
-
-
Hello ezrollin,
So this remains educational for the community, I recommend you create a simplified test script that just adds the plots and the public series properties that returns the values for those plots and a simple value set.
This test script should not contain any custom logic, to help focus on the issue at hand.
In post #4, I have provided a link to a working example.
https://ninjatrader.com/support/foru...64#post1182264
https://ninjatrader.com/support/foru...238#post812238Last edited by NinjaTrader_ChelseaB; 08-31-2022, 03:21 PM.Chelsea B.NinjaTrader Customer Service
Comment
-
ezrollin - Were you ever able to successfully modify the WaveTrendV2 indicator to expose the WTFast and WTSlow plots or fully baked bull and bear crossover signals? I am very interested in using this indicator in strategies as well...Originally posted by NinjaTrader_ChelseaB View PostHello ezrollin,
So this remains educational for the community, I recommend you create a simplified test script that just adds the plots and the public series properties that returns the values for those plots and a simple value set.
This test script should not contain any custom logic, to help focus on the issue at hand.
In post #4, I have provided a link to a working example.
https://ninjatrader.com/support/foru...64#post1182264
https://ninjatrader.com/support/foru...238#post812238
Comment
-
Hey ezrollin - I was able to get the Fast and Slow lines exposed as public plots. Pretty simple, actually. Just add the following under the Properties section at the bottom and compile and you should then have "FastLine" and "SlowLine" available as plots in Strategy Builder and can use them with the "Cross Above" and "Cross Below" conditions to get your trade entries.Originally posted by ezrollin View PostI dont think I was. Any time I've gotten any of the exposing to work, I havent felt confident in it at all. It hasnt worked right.
Its a shame cause it seems like a good indicator
Code:public Series<double> FastLine { get { return Values[0]; } } public Series<double> SlowLine { get { return Values[1]; } }
- Likes 4
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment