protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
// irrelevant code...
BandTypez1 = My.Common.BandTypez1.Envelope;
MATypez1 = My.Common.MATypez1.EMA;
Periodz1 = 8;
Offsetz1 = 1.25;
DualColour = true;
UpColour = Brushes.Aqua;
DownColour = Brushes.Red;
emaExit = EmaExit.EMA2;
AddPlot(Brushes.Olive, "HA Close");
AddPlot(Brushes.Firebrick, "Upper");
AddPlot(new Stroke(Brushes.SeaGreen, 2), PlotStyle.Line, "Middle");
AddPlot(Brushes.DarkGreen, "Lower");
}
else if (State == State.DataLoaded)
{
if (showOutput) PrintSettings();
EMA1 = EMA(emaPeriod1);
EMA2 = EMA(emaPeriod2);
EMA3 = EMA(emaPeriod3);
ATR1 = ATR(atrPeriod);
stdDev = StdDev(Periodz1);
atr = ATR(Periodz1);
vwap = VWAP8(Close);
VOL1 = VOL();
VOLMA1 = VOLMA(volumePeriod);
AddChartIndicator(EMA1);
AddChartIndicator(EMA2);
AddChartIndicator(EMA3);
AddChartIndicator(vwap);
AddChartIndicator(VOL1);
AddChartIndicator(VOLMA1);
ChartIndicators[0].Plots[0].Brush = Brushes.Blue; // EMA1
ChartIndicators[1].Plots[0].Brush = Brushes.Orange; // EMA2
ChartIndicators[2].Plots[0].Brush = Brushes.Purple; // EMA3
ChartIndicators[3].Plots[0].Brush = Brushes.Purple; // VWAP
ChartIndicators[4].Plots[0].Brush = Brushes.DodgerBlue; // VOL
ChartIndicators[5].Plots[0].Brush = Brushes.DarkOrange; // VOLMA
ChartIndicators[0].Panel = 1; // EMA1
ChartIndicators[1].Panel = 1; // EMA2
ChartIndicators[2].Panel = 1; // EMA3
ChartIndicators[3].Panel = 1; // VWAP
ChartIndicators[4].Panel = 2; // VOL
ChartIndicators[5].Panel = 2; // VOLMA
}
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Neeed a little help with panels
Collapse
X
-
Neeed a little help with panels
I'm trying to have most of my indicators display in the primary panel and my VOL and VOLMA display in a second panel but its not working they way I have it configured. Any suggestions?
Code:Tags: None
-
Hello Conceptzx,
As a tip, to export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:- Click Tools -> Export -> NinjaScript Add-on...
- Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
- Click the 'Export' button
- Enter the script name in the value for 'File name:'
- Choose a save location -> click Save
- Click OK to clear the export location message
- (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
http://ninjatrader.com/support/helpG...nt8/export.htm
That said, it looks like you are setting the stdDev (ChartIndicators[4]) and atr (ChartIndicators[5]) indicators to panel 2.
However, the VOL1 (ChartIndicators[7]) and VOLMA1 (ChartIndicators[8]) are not being assigned any panel.Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
41 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
66 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment