Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8.B6: Multi-instrument indicator with multiple plots freezes the platform

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT8.B6: Multi-instrument indicator with multiple plots freezes the platform

    I am currently developing an indicator that requires me to add 7 instruments (currency pairs) and plot 7 lines in a separate indicator window. The indicator runs just fine when it is added to a single chart window (not tab) but if you bring up a second, or third one and attach the indicator to them the platform freezes with no error messages whatsoever. You have to terminate it using the Task Manager in order to continue.

    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:

    Code:
    // 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;
    		}
    Attached Files
    Last edited by karlomacariola; 11-05-2015, 02:21 AM.

    #2
    Hello,

    Thank you for sharing the issue and the accompanying script. I'm not seeing the freezing when I apply the indicator to three charts on my end, although there is a clear performance impact. Are you running Tick Replay on any or all of your charts, by chance? Are you running any other custom scripts at the same time? Can you think of anything else unique in your situation which could come into play?
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Thank you for testing my indicator. I had the Vendor License script installed and went ahead and removed it. Other than that I don't have any scripts installed. My Tick Replay is also globally disabled and I am testing on Forex charts for the record (because the indicator I am developing is for Forex). After checking all these things I then tested this indicator and saw if there are any improvements. Here is a detailed list of what I did:

      1. Open NinjaTrader 8 and connected to my Kinetick data feed. (the charts should be live)
      2. I clicked New > Chart then chose EURUSD on 1M.
      3. I added the indicator MultiCurrencyPairsTest to EURUSD, 1M.
      4. I clicked New > Chart then chose AUDUSD on 1M.
      5. I added the indicator MultiCurrencyPairsTest to AUDUSD,1M.
      6. I opened again a new chart window with the same manner as above but this time it's USDJPY on 1M.
      7. I also added the indicator to USDJPY, 1M.

      By the time I added the indicator to USDJPY which had already instances in the other two chart windows, my platform froze. Please note that I did not open another tab to open a chart but created a new window. If I add the indicator to different tabs, my platform never freezes. The platform does not freeze also if there is no connected data feed and I am running the indicator in three different chart windows.

      Sometimes it would only take 2 chart windows with the indicator on for the platform to freeze. Sometimes 3 or 4. I asked one of my colleagues (in the other side of the world) to test with this sequence of actions and his platform also froze. Kindly confirm if you had made the same sequence of actions when you performed your test or if not I would be grateful if you get the same outcome. Many thanks once again.

      Comment


        #4
        Thank you for providing your steps. That was exactly what I needed to reproduce on my end, although sometimes I need to build up to five charts. I will go ahead and report this to our team, and post back here with any updates. (NTEIGHT-9070)
        Last edited by NinjaTrader_DaveI; 11-05-2015, 04:37 PM.
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Any news on this?

          Comment


            #6
            Hello,

            I checked into this, currently this is on developments plate for review but unfortunately there are no more details that I can see to provide to you at this time.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hi. Thank you for releasing the new NT8 version 7. Some of the issues that we were having with our indicators in the previous versions have been resolved.

              I just wanted to inquire if there's anything new on the issue we described in this thread with code NTEIGHT-9070. Many thanks once again for your good work on this new platform. Best wishes.

              Karlo
              Last edited by karlomacariola; 12-04-2015, 02:37 AM.

              Comment


                #8
                Hello,

                Thank you for the question.

                Currently all I can see is that development is reviewing this item, unfortunately I would not have any kind of ETA or end result at this time, once Development has further reviewed this item I can provide more details.

                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by frslvr, 04-11-2024, 07:26 AM
                5 responses
                96 views
                1 like
                Last Post caryc123  
                Started by algospoke, 04-17-2024, 06:40 PM
                6 responses
                49 views
                0 likes
                Last Post algospoke  
                Started by arvidvanstaey, Today, 02:19 PM
                4 responses
                11 views
                0 likes
                Last Post arvidvanstaey  
                Started by samish18, 04-17-2024, 08:57 AM
                16 responses
                61 views
                0 likes
                Last Post samish18  
                Started by jordanq2, Today, 03:10 PM
                2 responses
                11 views
                0 likes
                Last Post jordanq2  
                Working...
                X