Any help on how to add a plot for the high and low for the attached indicator will be appreciated.
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
Add new plot to existing indicator
Collapse
X
-
Add new plot to existing indicator
I want to add a plot for the high and low for the following indicator. I tried using Values[0].Set array as suggested on another site, but when the indicator is loaded it does not display anything. It looks like the indicator is trying to load, but disappears very quickly.
Any help on how to add a plot for the high and low for the attached indicator will be appreciated.Tags: None
-
I tried creating a data series for the high and low plots (see attachment) and nothing displays. Obviously, I am doing something wrong, please help. I am a newbie at coding so this is probably a very simple problem, but I am out of ideas to try.Attached Files
-
I fixed the disappearing plots issue by do as NinjaTrader_ZacharyG suggested in the following thread: http://ninjatrader.com/support/forum...81&postcount=7
Originally posted by NinjaTrader_ZacharyG View PostHello TzunTzai,
Upon further investigation, it looks like the error was occurring within the Plot() override method's for loop that's looping over the seriesCount.
There wasn't enough brushes within the brushes collection. You will need to add additional brushes within the brushes collection within the Variables region.
More about the "index was outside the bounds of the array" error can be found at this DotNetPetls link: http://www.dotnetperls.com/indexoutofrangeexception
Now I repeatedly get the following error messages as they appear in the Log tab of the Control Center. How do I fix these errors? Attached is the new version with the additional brushes.
Failed to set property 'Open' for indicator '': Object of type 'NinjaTrader.Indicator.DataSeriesHelper' cannot be converted to type 'System.Double'.
Failed to set property 'Low' for indicator '': Object of type 'NinjaTrader.Indicator.DataSeriesHelper' cannot be converted to type 'System.Double'.
Failed to set property 'High' for indicator '': Object of type 'NinjaTrader.Indicator.DataSeriesHelper' cannot be converted to type 'System.Double'.Attached Files
Comment
-
Originally posted by ActiveTrader09 View PostI fixed the disappearing plots issue by do as NinjaTrader_ZacharyG suggested in the following thread: http://ninjatrader.com/support/forum...81&postcount=7
Now I repeatedly get the following error messages as they appear in the Log tab of the Control Center. How do I fix these errors? Attached is the new version with the additional brushes.
Failed to set property 'Open' for indicator '': Object of type 'NinjaTrader.Indicator.DataSeriesHelper' cannot be converted to type 'System.Double'.
Failed to set property 'Low' for indicator '': Object of type 'NinjaTrader.Indicator.DataSeriesHelper' cannot be converted to type 'System.Double'.
Failed to set property 'High' for indicator '': Object of type 'NinjaTrader.Indicator.DataSeriesHelper' cannot be converted to type 'System.Double'.
Now I am trying to use drawtext for the plot labels.
I get the following error message in the Log tab of the Control Center when using drawtext in the attached code.
Error on calling 'OnBarUpdate' method for indicator 'FloorPivotsWeeklyV5' on bar 0: Index was outside the bounds of the array.
How do I fix this error?Attached Files
Comment
-
Hello ActiveTrader09,
Thank you for your patience.
If you comment out the if (midpoint) section of your code the error does not return. I would recommend printing the values of the doubles you are setting in if (midpoint).
For information on debugging your code please visit the following link:http://ninjatrader.com/support/forum...ead.php?t=3418
Comment
-
Originally posted by NinjaTrader_PatrickH View PostHello ActiveTrader09,
Thank you for your patience.
If you comment out the if (midpoint) section of your code the error does not return. I would recommend printing the values of the doubles you are setting in if (midpoint).
For information on debugging your code please visit the following link:http://ninjatrader.com/support/forum...ead.php?t=3418
Comment
-
Originally posted by ActiveTrader09 View PostI placed the // before if(midpoint) and compiled. When I load the indicator I get the same error message. l would do the print command I do not understand how to implement it with my code.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by spottysallrite, Today, 11:31 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 11:31 AM | ||
Started by johnMoss, 03-04-2024, 01:53 PM
|
2 responses
31 views
0 likes
|
Last Post
by Overnhou
Today, 11:21 AM
|
||
Started by Padan, Today, 02:02 AM
|
5 responses
16 views
0 likes
|
Last Post Today, 11:14 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
8 responses
28 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
||
Started by kramnor2001, Yesterday, 02:30 PM
|
4 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 10:44 AM
|
Comment