Is it possible?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can Indicator add another Indicator to show on Chart?
Collapse
X
-
Can Indicator add another Indicator to show on Chart?
I have developed and Indicator that call several other Indicators. For display purposes, the other Indicators (such as SMA & MACD), are needed to be added to the Chart. Since all of the parameters for all of the other Indicator, are included in my Indicator, it would be great, if there was a way to add these indicators to the Chart from my Indicator.
Is it possible?Tags: None
-
You will have to create new Plots and assign the Plots the values of the indicators.Originally posted by Shai Samuel View PostI have developed and Indicator that call several other Indicators. For display purposes, the other Indicators (such as SMA & MACD), are needed to be added to the Chart. Since all of the parameters for all of the other Indicator, are included in my Indicator, it would be great, if there was a way to add these indicators to the Chart from my Indicator.
Is it possible?
Comment
-
-
-
Sorry for resurrecting this old thread, but ...
Many times in NT7 I have wished for this exact feature.
I want the ability for an indicator to Add() another indicator to
the chart (naturally the added indicator plots/displays on the chart)
and I want to access that added indicator object the same as I might
do inside strategy code.
I see that NT8 has AddChartIndicator() but this looks to be a method
reserved for use by strategies -- in fact, it's looks like nothing more
than the old Add() method renamed to AddChartIndicator().
Does NT8's NinjaScript support a method for an indicator to add
another indicator to the chart?
Ie, what's the current status of this thread's request with regards to NT8?
Comment
-
Hi,
Thank you ShawnB, for following up. G, this is a post from 2 years ago, when I had little experience, and so many water move under the bridge since...
Anyway, the reply I got from koganam, was sufficient.
The only addition I can think of, which is relevant in any case, with, our without additional indicators, is to choose a plot to show on a different panel, since plots might be of totally different value range (for example: one plot can be of value range of 1..-1, and another can be price range.
I understand this might be complicated, for the UI.
Comment
-
Sure. Inside Initialize() of an NT7 Strategy I can do,Originally posted by NinjaTrader_ShawnB View PostCould you please elaborate on your request? Please be thorough so I can write a feature request for you.
which adds the EMA indicator to the chart, along with some custom settings I may wish to make. If desired, I could also do,Code:EMA ind = EMA(20); ind.CalculateOnBarClose = this.CalculateOnBarClose; ind.PaintPriceMarkers = false; ind.Plots[0].Pen.Color = Color.Red; ind.Plots[0].Pen.DashStyle = DashStyle.Dash; ind.Plots[0].Pen.Width = 1; ind.Name = string.Empty; Add(ind);
But all this code is illegal in an NT7 Indicator, since an indicator's Initialize() cannot use Add() to add another indicator to the chart.Code:Add(EMA(20)); Add(EMA(Median, 34));
In other words, in NT7, the Indicator class did not support an overload for the Add() method that allowed other indicators to be programmatically added to a chart. The Strategy class in NT7 supports this, but the Indicator class in NT7 did not.
So, the question is, does NT8 allow an indicator's Initialize() to Add() another indicator?
Granted the method names "Initialize" and "Add" may have changed in NT8, but I presume you get my point.
Simple question.
Comment
-
Hello bltdavid,
The ability to add an indicator to your chart from a script is also limited to strategies in NT 8.
Use the AddChartIndicator() to add an indicator to the strategy only for the purpose of displaying it on a chart
I have included the ChartIndicators and AddChartIndicator() Help Guides to assist you further.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
116 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
61 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
40 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
82 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment