I wanted to confirm this so I made a test indicator that demonstrates this issue which I hope you can replicate. I am attaching here a copy of my test indicator (MultipleCurrencyPairsTest ). This indicator simply calls 7 currency pairs on initialization. On update, the indicator plots the Close price of the current chart on a separate chart window. It doesn't even touch the values of the currency pairs it calls and there are absolutely no fancy calculations involved but it is surprising that it still manages to freeze the platform. (or at least, my platform) Please find the ninjascript attached. Many thanks once again for testing.
Also below is the main part of my test indicator:
// global variables private BarsPeriodType p; private int units; protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Test indicator for adding multiple curreny pairs"; Name = "MultipleCurrencyPairsTest"; Calculate = Calculate.OnEachTick; IsOverlay = false; DisplayInDataBox = true; DrawOnPricePanel = false; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; AddPlot(Brushes.Red, "Plot1"); AddPlot(Brushes.Orange, "Plot2"); AddPlot(Brushes.Yellow, "Plot3"); AddPlot(Brushes.Green, "Plot4"); AddPlot(Brushes.Blue, "Plot5"); AddPlot(Brushes.Purple, "Plot6"); AddPlot(Brushes.Gray, "Plot7"); } else if (State == State.Configure) { p = BarsPeriod.BarsPeriodType; units = BarsPeriod.Value; AddDataSeries("EURUSD", p, units); AddDataSeries("GBPUSD", p, units); AddDataSeries("USDCHF", p, units); AddDataSeries("USDJPY", p, units); AddDataSeries("USDCAD", p, units); AddDataSeries("AUDUSD", p, units); AddDataSeries("NZDUSD", p, units); } } protected override void OnBarUpdate() { //Add your custom indicator logic here. /* Plot1[0] = RSI(Closes[1], 14, 1)[0]; Plot2[0] = RSI(Closes[2], 14, 1)[0]; Plot3[0] = RSI(Closes[3], 14, 1)[0]; Plot4[0] = RSI(Closes[4], 14, 1)[0]; Plot5[0] = RSI(Closes[5], 14, 1)[0]; Plot6[0] = RSI(Closes[6], 14, 1)[0]; Plot7[0] = RSI(Closes[7], 14, 1)[0]; */ Plot1[0] = Close[0] + 1; Plot2[0] = Close[0] + 2; Plot3[0] = Close[0] + 3; Plot4[0] = Close[0] + 4; Plot5[0] = Close[0] + 5; Plot6[0] = Close[0] + 6; Plot7[0] = Close[0] + 7; }
Comment