Thank's Frank
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Second Chart for Multi Instrument
Collapse
X
-
Hello,
Thank you for the question.
While it is not directly possible to display the secondary series directly in a new panel, you can cause an indicator to plot prices or other values in a second panel.
Using AddChartIndicator you can add a secondary indicator to perform plotting in another panel, we have a strategy example that demonstrates this concept: https://ninjatrader.com/support/foru...ead.php?t=6651
Using the dummy indicator, the strategy could tell it to plot things as you need them like markers for executions or plots etc..
I look forward to being of further assistance.
-
Thank's Jesse!
I tried the sampleStrategyPlot. Can You help me with the syntax of OverlayPlot and PanelPlot. I want them to plot my secondary data series ^NDX.
else if (State == State.Configure)
{
AddDataSeries("^NDX", BarsPeriodType.Day, 1);
OverlayPlot = ???
PanelPlot = ???
Frank
Comment
-
Hello,
You could see the following document which explains how to access data in a multi-series script:
The first example ( Accessing the Price Data in a Multi-Bars NinjaScript) demonstrates the general syntax needed to reference your secondary series.
You could use Closes[1][0] as one option to plot the Close price.
I look forward to being of further assistance.
Comment
-
That works :-)
AddDataSeries("^NDX", BarsPeriodType.Day, 1);
OverlayPlot = new Series<double>(this);
PanelPlot = new Series<double>(this);
//Create an indicator which is set to overlayplot. The indicator will use this strategies references OverlayPlot series to plot.
SampleOverlayPlot sampleOverlayPlot = SampleOverlayPlot();
sampleOverlayPlot.Strategy = this;
AddChartIndicator(sampleOverlayPlot);
//Create an indicator which is set for a panel plot. The indicator will use this strategies references PanelPlot series to plot.
SamplePanelPlot samplePanelPlot = SamplePanelPlot();
samplePanelPlot.Strategy = this;
AddChartIndicator(samplePanelPlot);
}
}
protected override void OnBarUpdate()
{
//Set your plots here.
OverlayPlot[0] = Closes[1][0];
PanelPlot[0] = Closes[1][0];
}
[Browsable(false)]
[XmlIgnore()]
public Series<double> OverlayPlot;
[Browsable(false)]
[XmlIgnore()]
public Series<double> PanelPlot;
}
}
Thank's Frank
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment