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 NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment