Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots

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

    Pivots

    I am trying to call the Pivots indicator from within another indicator I am building to use the pivot points for some calculations, but I am having difficulty calling the indicator.

    I tried "Pivots(Data.PivotRange.Daily,20);" to no avail. It is telling me it cannot convert "NinjaTrader.Data.PivotRange" to "NinjaTrader.Data.IDataSeries". What is the IDataSeries value I can put in there in order for this to work? Thank you.
    Josh P.NinjaTrader Customer Service

    #2
    Please check out the methods signature provided by Intellisense:
    Pivots(Data.IDataSeries input, int width)

    This means you need to code something like:
    Pivots(Input, 20).PivotRangeType = PivotRange.Daily; // extra code to change pivots type to daily
    double val = Pivots(Input, 20).PP[0];

    Note: the PivotRangeType is not supported yet as a parameter on the Pivots() method, that's why you'll need to the extra code line. We'll look into it and likely support it codewise by fall time frame

    Comment


      #3
      Fabulous. Exactly what I was looking for. It works great thanks.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        This method doesn't seem to work when you try to set two variables to two different range types.

        Pivots(Input, 20).PivotRangeType = PivotRange.Daily; // extra code to change pivots type to daily
        double val = Pivots(Input, 20).PP[0];
        Pivots(Input, 20).PivotRangeType = PivotRange.Weekly;
        double val2 = Pivots(Input, 20).PP[0];

        I was playing around with various Print() throughout to see where it messes up and this is what I've found. The indicator does acknowledge the change in PivotRangeTypes, but it does not recognize that you are calling Pivots twice. Once with the first PivotRangeType and once with the second. It seems to ignore the second PivotRangeType change completely. It takes the Daily and just does both val and val2 on Daily.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Right, this will not work (unfortunately). We will address this issue with 6.5.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          578 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X