Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ParabolicSAR method syntax

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

    ParabolicSAR method syntax

    In the help manual, ParabolicSar method has the syntax as
    ParabolicSAR(acceleration, accelerationStep, accelerationMax)

    But in the NT indicator editor, the tool tip for ParabolicSar
    is
    ParabolicSAR(acceleration, accelerationMax, accelerationStep)

    And the parameter section of the code for ParabolicSar lists the parameters in
    the order of accleration, acceleration step, acceleration max.

    Which one is correct ?

    #2
    Hello redbank199,

    The syntax in the Help Guide is correct.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Incorrect PB-SAR in Strategy

      Top of the Evening ...

      I have not been able to retrieve the correct ParabolicSAR figure in my strategy. Any assistance or hints would be greatly appreciated.

      When I compare the output window to the indicator on my 5 min bar chart they are very different. My NinjaTrader version is @ the most current release level.

      Here is my attempt to get this to work.

      void Initialize()
      CalculateOnBarClose = true;


      void OnBarUpdate()
      double value = ParabolicSAR(0.02, 0.02, 0.20)[0];
      Print(
      "The current PbSAR is " + value.ToString());

      The Indicator Parm configs on the Chart are as follows:
      0.02 Initial Acceleration Factor
      0.20 Maximum Acceleration
      0.02 Acceleration Step Factor


      Thanks for your consideration with regard to my problem

      Comment


        #4
        Welcome to our support forums! Please doublecheck your NinjaTrader version under Help > About in the software and ensure you attempt running this code on 6.5.1000.11 - thanks!
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Top of the Morning ...

          Yes - As stated in my previous post - I am running the latest release - 6.5.1000.11.

          Comment


            #6
            Thanks - please try this snippet for the ParabolicSAR call -

            double value = ParabolicSAR(0.02, 0.2, 0.02)[0];

            This is the correct parameter sequencing aligned with your charted indicator.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Top of the Day ...

              THANK YOU SO Much.
              Your advice was greatly appreciated and right on the Money!

              L. Itter.

              Comment


                #8
                Well, I think we have not really answered my question about the correct ParabolicSAR
                method syntax yet ...

                According to Jason's reply, the syntax in Help Guide is correct, i. e.,
                ParabolicSAR(acceleration, acceleartionStep, acceleartionMax)
                acceleartionMax is the last parameter ...

                Since Litter wanted 0.2 (the usual default value every NT like package uses for Max)
                as accelerationMax, so per Jason, the call should be
                ParabolicSAR(0.02, 0.02, 0.2)

                Now Bertrand suggested that correct call is
                ParabolicSAR(0.02, 0.2, 0.02)
                So Bertrand's syntax is ParabolicSAR(acceleration, accelerationMax, accelerationStep),
                accelerationMax is the second parameter ...

                Before I posted my question here, I sent an email to NT support about this question,
                and the answer I got back was the syntax from the Editor's tool tip is correct,
                i. e, ParabolicSAR(accleration, accelerationMax, accelerationStep)
                acclerationMax is the second parameter.

                ParabolicSAR is a very IMPORTANT indicator for me. I like to get to the bottom of this
                issue and get a definitive answer from NT. Can Jason, Bertrand, and Ben Nachtrieb who
                answered my email support question get together and post an OFFICIAL reply to this
                question and state that "the syntax in the Help Guide is wrong and correct syntax
                is ParabolicSAR(acceleration, acclerationMax, accelerationStep)" ?

                One more thing that may contribute to this confusion is the code for ParabolicSAR indicator
                itself lists accelerationMax as the last parameter in the Properties section. I am not
                a C# programmer, so I can not say for sure that the order of parameters in the
                indicator's Properties section must be the same as the order in the method call.
                If they do not need to be in agreement, then when ParabolicSAR method is called
                and executed, how does it know which parameter is for which ? Is ParabolicSAR a separate
                C# method that has nothing to do with the ParabolicSAR indicator code ?


                Peter

                Comment


                  #9
                  redbank199,

                  Not sure what you are asking for. The syntax is as stated by both Bertrand and Jason. You fill in whatever parameter values you want.

                  The parameters are as listed in the Intellisense. I suggest you just add the indicator onto a chart and change the settings to 1, 2, and 3 respectively. Then you will instantly know exactly which one goes to which parameter listing.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Bertrand's parameter setting was correct. The listing in the guide appears to be incorrect. I was using the default settings to that I had an easy measurement for the comparison. (and not to confuse the issue)

                    Comment


                      #11
                      The NT7 help guide will remove any inconsistencies in this regard. Thank you.
                      Josh P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by RideMe, 04-07-2024, 04:54 PM
                      5 responses
                      28 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by f.saeidi, Today, 08:13 AM
                      1 response
                      4 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by DavidHP, Today, 07:56 AM
                      1 response
                      6 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Started by kujista, Today, 06:23 AM
                      3 responses
                      10 views
                      0 likes
                      Last Post kujista
                      by kujista
                       
                      Started by Mindset, Yesterday, 02:04 AM
                      2 responses
                      18 views
                      0 likes
                      Last Post NinjaTrader_RyanS  
                      Working...
                      X