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 plot a horizontal line in panel 2 from a strategy
Collapse
X
-
Hello Rugosoft,
Thanks for your question.
If you have a strategy that adds indicators with AddChartIndicator and those indicators have additional panels added, you can use that indicator as the base NinjaScript to draw to that panel.
I have attached an example. The same approach can be taken with Draw.HorizontalLine().
I look forward to assiting.Attached FilesJimNinjaTrader Customer Service
-
Thanks Jim,
I understand the example, but when the strategy does not define the second panel (like in your example)how then to draw a line on that panel from the strategy. I have an indicator configured on the chart that is not controlled from the strategy and I would like to draw a horizontal line in that panel when a certain condition is met. The status of that logic is determined in the strategy and not by the indicator.
Thanks for your help,
Comment
-
Hello Rugosoft,
The strategy will need to instantiate the indicators and also add them with AddChartIndicator. The strategy will not have knowledge of the other indicators on the chart, so they would have to be added following the example I provided if you would like to draw to those panels from the strategy.
We look forward to assisting.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,266 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
13 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment