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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
70 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
152 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
100 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
288 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment