Announcement
Collapse
No announcement yet.
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 Files
-
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.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
646 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
367 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment