Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivot Function

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

    Pivot Function

    I ran into problems when I tried copying and pasting this sample script for the Pivots() function into the OnBarUpdate() portion of a basic ninjascript :

    // Prints the current pivot point value
    double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).PP[0];
    Print(
    "The current Pivots pivot value is " + value.ToString());


    The error message said, "No overload method for 'Pivots' takes '3' argument. I have no idea what an overload method is.


    Thanks
    Last edited by Gennaker; 10-08-2011, 10:14 PM. Reason: clarification

    #2
    Originally posted by Gennaker View Post
    I ran into problems when I tried copying and pasting this sample script for the Pivots() function into the OnBarUpdate() portion of a basic ninjascript :

    // Prints the current pivot point value
    double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).PP[0];
    Print(
    "The current Pivots pivot value is " + value.ToString());


    The error message said, "No overload method for 'Pivots' takes '3' argument. I have no idea what an overload method is.


    Thanks
    When you call an indicator class from another class, you must provide all the required inputs. Intellisense will tell you what they are, or you can look in the indicator, to see all the elements that are listed under "Parameters". Intellisense, unfortunately, in this case can often provide overrides that turn out to be invalid.

    Comment


      #3
      Koganam,

      I'm a noob and am trying to figure out how to actually call out an indicator class. I tried adding these lines to the variables:

      private Data.PivotRange pivotRangeType = PivotRange.Daily;
      private HLCCalculationMode priorDayHLC = HLCCalculationMode.DailyBars;
      privatedouble pp = 0;

      and these lines to the Property section:

      public Data.HLCCalculationMode PriorDayHLC
      {
      get { return priorDayHLC; }
      set { priorDayHLC = value; }
      }

      public Data.PivotRange PivotRangeType
      {
      get { return pivotRangeType; }
      set { pivotRangeType = value; }
      }
      public DataSeries PP
      {
      get { return Values[0]; }
      }

      But it wasn't classy enough. Still getting the overload messge.

      Comment


        #4
        Gennaker,

        I'm not certain but you may be using the NT V6.5 documentations for the Piviots. NT V7 requires a few more arguments, specifically the user defined OHLC values (leave 0 if not using);

        double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];

        Please see our Help Guide for more information on this Indicator method.: http://www.ninjatrader.com/support/h...tml?pivots.htm
        MatthewNinjaTrader Product Management

        Comment


          #5
          Matthew,

          Yes, that was the problem. I needed 3 more arguments....hey, no big deal...I'm married!

          Thanks,

          Comment


            #6
            Is there a similar Pivots() function in Ninjatrader for Camarilla pivots?

            Comment


              #7
              Gennaker,

              I am happy to assist.

              You could try this link, though it looks like they are for NT 6.5. However, one of the indicators seems to have a work-around to get it to work in NT 7.

              Adam P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              605 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              351 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
              560 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              561 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X