By just having the Property (and everything else commented out) I get this error:
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.
-
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).
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
-
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
-
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 3
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by nandhumca, Yesterday, 03:41 PM
|
1 response
12 views
0 likes
|
Last Post Today, 06:27 AM | ||
Started by The_Sec, Yesterday, 03:37 PM
|
1 response
11 views
0 likes
|
Last Post Today, 06:17 AM | ||
Started by vecnopus, Today, 06:15 AM
|
0 responses
1 view
0 likes
|
Last Post
by vecnopus
Today, 06:15 AM
|
||
Started by Aviram Y, Today, 05:29 AM
|
0 responses
5 views
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
27 views
0 likes
|
Last Post Today, 05:23 AM |
Comment