Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pairs Suite Indicator

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

    Pairs Suite Indicator

    First of all my compliment for this indicator, it is a great tool. I am not going into details, because it is open code and can be easily adapted or modified.

    I had one problem though, when I applied the Pairs indicator to an ES single data series chart first:

    (1) NT got internally locked on loading data (control center status bar).
    (2) The indicator dialogue panel was frozen.
    (3) Because of the open indicator dialogue box, I could not abort the data loading and had to shut down NinjaTrader by force. This is the error message from the trace file. It is very similar to the error message I got when I had the IB data throttling problem on my standard chart. However, this time there was no data throttling.

    2010-04-13 17:00:30:578 (Interactive Brokers) IB.HistoricalDataRequest.Process: itemCount=6592 instrument='YM 06-10' from='2010-04-13' to='2010-04-13' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0
    2010-04-13 17:00:30:671 ERROR: Error on calculating indicator min/max value for indicator 'Pairs'. Please check the 'GetMinMaxValues' method: Der Index war außerhalb des Arraybereichs.
    2010-04-13 17:00:30:687 in OnUnhandledThreadException
    2010-04-13 17:00:30:703 ********* exception trapped *********
    2010-04-13 17:00:30:703 Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
    Parametername: index
    2010-04-13 17:00:30:703 bei System.Collections.ArrayList.get_Item(Int32 index)
    bei NinjaTrader.Gui.Chart.ChartPanel.get_PanelData()
    bei NinjaTrader.Gui.Chart.ChartPanel.CalculateMinMax(S caleJustification scaleJustification)
    bei NinjaTrader.Gui.Chart.ChartControl.CalculateMinMax AndMargins(Graphics graphics)
    bei NinjaTrader.Gui.Chart.ChartControl.OnPaint(Object sender, PaintEventArgs e)
    bei System.Windows.Forms.Control.OnPaint(PaintEventArg s e)
    bei System.Windows.Forms.Control.PaintWithErrorHandlin g(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
    bei System.Windows.Forms.Control.WmPaint(Message& m)
    bei System.Windows.Forms.Control.WndProc(Message& m)
    bei System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
    bei System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    bei System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    When I tried to load the Pairs indicator again it worked, so as with the data throttling issue this deadlock sometimes happens and sometomes does not.

    #2
    Hi Harry,

    Thanks for the update, I'm currently working through any bugs so the feedback is very helpful.

    I made a recent update to automatically include the YM and ES for the starting pairs, in order to avoid any null values etc.

    Please let me know if you encounter any other errors by sending an email to [email protected] with ATTN: Tim in the subject line.
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks Tim,

      have a number of further remarks, so I will come back to you via mail.

      Comment


        #4
        Hi Harry,

        Great. I look forward to it.
        TimNinjaTrader Customer Service

        Comment


          #5
          Great indicators, Tim.
          One question - how do I reference TickSize for each of the instruments.

          Comment


            #6
            Outlier, you can access the TickSize inside OnBarUpdate() in the appropriate BarsInProgress context like this:
            Code:
            OnBarUpdate()
            {
              if (BarsInProgress == 0)
                 primaryTickSize = TickSize;
              else if (BarsInProgress == 1)
                 secondaryTickSize = TickSize;
            }
            AustinNinjaTrader Customer Service

            Comment


              #7
              It does not seem to recognise BarsInProgress == 1.
              Is this something to do with the ADD being used for each instrument.
              Add(FirstInstrument, BarsPeriods[0].Id, BarsPeriods[0].Value);
              Add(SecondInstrument, BarsPeriods[0].Id, BarsPeriods[0].Value);

              Comment


                #8
                Outlier, how are you determining it does not recognize BarsInProgress == 1? You should be able to add instruments with the Add() method and then reference each additional data series with the appropriate BarsInProgress property.

                Are you sure the instruments are being added correctly? Can you please try with the values hardcoded in, like this:
                Code:
                Add("ES 09-10", PeriodType.Minute, 1);
                AustinNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                626 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                359 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                562 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                567 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X