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
How to draw on indicator's pannel (DrawOnPricePanel = false not working)
Collapse
X
-
How to draw on indicator's pannel (DrawOnPricePanel = false not working)
hi, some help please - I'd like to draw (from a strategy) on both price and indicator's panels. When I add a plot with AddPlot() from State.SetDefaults it adds it to the Price Panel, and setting DrawOnPricePanel = false from State.Configure does not seem to help? How do I set DrawOnPricePanel = true/false properly? (from which state?)Tags: None
-
Hello momchi,
Thank you for the post.
I believe in this case you would actually want to use the strategy plotting example we have in the following link: https://ninjatrader.com/support/help..._a_ninjasc.htm
In this sample we use two dummy indicators to retrieve values from a strategy and plot them in two panels. This would be the only way to split plotting from a strategy to a second panel in addition to the primary.
DrawOnPricePanel only controls drawing objects so that will not help in this case, the IsOverlay setting changes the panel from the primary. IsOverlay is used in the above sample to control the indicators.
I look forward to being of further assistance.
JesseNinjaTrader Customer Service
- Likes 1
-
Jesse, thank you for responding so quickly - appreciate it very, very much!
Will review the example and comment/ask if needed.
But, before I let you go , is my understanding of "a panel" correct? Are the Price and Indicator plot areas on a window considered "separate panels"?
Comment
-
Hello momchi,
In a chart you have the main panel where your bars are at and that would be the Price Panel, any panel below that such as an indicator would be a separate panel. You can also apply indicators to the price panel so to correctly answer your question, yes if the indicator is below your main panel that is a separate panel.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
- Likes 1
Comment
-
Jesse, thank you again -
I am actually quite amazed of the level of service you guys provide and the knowledge that could be found under this forum!
Looked at the code, and think that I understand it --
except for these two statements:
double dummyValueOne = samplePanelPlot[0]; // used to call indicators OBU historically
double dummyValueTwo = sampleOverlayPlot[0]; // used to call indicators OBU historically
could you please elaborate a bit more? Is accessing the values of the object will trigger re-evaluation? I commented out these, and still worked...
Thanks!
Comment
-
Originally posted by momchi View PostJesse, thank you again -
double dummyValueOne = samplePanelPlot[0]; // used to call indicators OBU historically
double dummyValueTwo = sampleOverlayPlot[0]; // used to call indicators OBU historically
Thanks!
Comment
-
Hello momchi,
Thank you for the reply.
The lines you have highlighted are used to call the indicator historically, without these lines the indicator would only be evaluated going forward in realtime. This is part of how the hosting system works for indicators and can be used logically. A small note about this can be found in the documentation for AddChartIndicator as that is normally where you would see this come up.
https://ninjatrader.com/support/help...htsub=addchart
Tip: If you are adding an indicator which is dependent on the correct State of the indicator, you will need to ensure that you are also calling the indicator from the strategy in OnBarUpdate(), otherwise your indicator will only process in State.RealTime for performance optimizations.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ninza33, Today, 07:16 AM
|
3 responses
13 views
0 likes
|
Last Post
by ninza33
Today, 09:01 AM
|
||
Started by foxtrott21, Today, 08:27 AM
|
0 responses
1 view
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:25 AM
|
0 responses
6 views
0 likes
|
Last Post
by jaypelle3
Today, 08:25 AM
|
Comment