Afshin
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
Plot removal
Collapse
X
-
Plot removal
I need to remove part of the past indicator plot and redraw it differently in code. How can I remove only a portion of a plot 2 bars ago?
AfshinTags: None
-
I am using .Set with BarsAgo and it works as expected. what I need is to remove what .Set has plotted during the previous bar and redraw it. I need something equivalent to RemoveDrawObject() but for .Set - Is this possible?
Comment
-
There is not a method equivalent to ReoveDrawObject() for the plots. If it works for your indicator, you could switch to drawing objects and then use RemoveDrawObject()
If you must use a Plot(), you can look at the Swing indicator which replots based off of a specific condition:
Code:if (High[0] > High[strength] && swingHighSwings[strength] > 0.0) { swingHighSwings.Set(strength, 0.0); for (int i=0; i<=strength; i++) SwingHighPlot.Reset(i); currentSwingHigh = 0.0; } else if (High[0] > High[strength] && currentSwingHigh != 0.0) { SwingHighPlot.Reset(); currentSwingHigh = 0.0; }
MatthewNinjaTrader Product Management
Comment
-
Originally posted by afshinmoshrefi View PostI am using .Set with BarsAgo and it works as expected. what I need is to remove what .Set has plotted during the previous bar and redraw it. I need something equivalent to RemoveDrawObject() but for .Set - Is this possible?Code:PlotName.Reset(barsAgo);
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, 05-13-2024, 06:53 PM
|
4 responses
28 views
0 likes
|
Last Post
by algospoke
Today, 06:16 PM
|
||
Started by dtl-saw, 12-29-2022, 09:12 AM
|
46 responses
3,182 views
1 like
|
Last Post
by sonia0101
Today, 05:48 PM
|
||
Started by AlphaOptions, 06-18-2013, 08:24 AM
|
7 responses
2,186 views
0 likes
|
Last Post Today, 05:47 PM | ||
Started by FAQtrader, 04-25-2024, 12:00 PM
|
14 responses
215 views
0 likes
|
Last Post
by sonia0101
Today, 05:44 PM
|
||
Started by bsbisme, Today, 05:08 PM
|
0 responses
10 views
0 likes
|
Last Post
by bsbisme
Today, 05:08 PM
|
Comment