Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Parabolic SAR

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

    Parabolic SAR

    I'm new here to NT and am a bit lost. I am very fluent with TS easylanguage but am still trying to navigate around NT for a bit.

    Here's my problem

    1) I don't know how to look at code for anything on NT. Can someone point out how I do this? I'm on NT7

    2) the Parabolic SAR that comes with NT doesn't allow you to put a very small AFLimit value in and I like to use mine with settings much smaller than .01 Is there anyone that has written a Parabolic SAR indicator that will allow a smaller value? can you make it available for me to use?

    Thanks for the help

    #2
    Hello SinatraFan,

    Yes you can view source code for all system indicators. Click Tools > Edit NinjaScript > Indicator to view this.

    You can modify ParabolicSAR by first opening it in the editor, then Right Click > Save as and provide a new name.

    The modification for the public input would take place in the section noted below. You can change the .02 to something smaller or remove the Math.Max() method completely if you like.

    [Description("The maximum acceleration")]
    [GridCategory("Parameters")]
    [Gui.Design.DisplayNameAttribute("Acceleration max")]
    public double AccelerationMax
    {
    get { return accelerationMax; }
    set { accelerationMax = Math.Max(0.02, value); }
    }
    #endregion
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      OK, I just saved the existing Par as a "Par2" And changed the value as you suggested... then saved it. Does it need to be verified? I went to my chart and tried to insert it, but it doesn't show up in the list but it does show up when I go to edit ninjascript. What am I doing wrong? Thanks

      Comment


        #4
        After making any changes you need to compile your indicator. Right Click > Compile within the editor.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          I tried what you suggested but I am not getting the results I was looking for. Is there someone that could modify the existing code and post it on this thread for me to copy? I simply want to be able to put in smaller entries in where NT has limits set on them. Thanks

          NOTE: My big challenge is that I want the PAR-Sar to output similar to TradeStation as I am seriously looking to make the change over to NT, but need to make sure all my indicators are showing the same way.
          Last edited by SinatraFan; 01-31-2011, 12:55 PM.

          Comment


            #6
            Originally posted by NinjaTrader_RyanM View Post
            Hello SinatraFan,

            The modification for the public input would take place in the section noted below. You can change the .02 to something smaller or remove the Math.Max() method completely if you like.
            I tried doing this and it wouldn't verify. So what am I doing wrong?

            I would like to remove the min parameters all together or perhaps make the minimum zero or .00000000001 if zero is not an option.

            Comment


              #7
              Here is that line without Math.Max() applied.

              set { accelerationMax = 0.02; }
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                I did as you said Ryan, and it confirmed OK... But... now everytime I go to put in a value into the settings after putting it on the chart... it resorts back to the default.

                What am I doing wrong now?

                Comment


                  #9
                  It's working OK here. I would make sure you have compiled and that the indicator you're attempting to change is the modified one and not the system indicator.

                  I have attached the file I used to verify this here. As a disclaimer: This custom indicator is not supported or maintained by NinjaTrader. It's provided only to illustrate the concepts we've been discussing.
                  Attached Files
                  Ryan M.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Haiasi, Today, 06:53 PM
                  1 response
                  4 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by ScottWalsh, Today, 06:52 PM
                  1 response
                  15 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by ScottW, Today, 06:09 PM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by ftsc2022, 10-25-2022, 12:03 PM
                  5 responses
                  256 views
                  0 likes
                  Last Post KeyonMatthews  
                  Started by Board game geek, 10-29-2023, 12:00 PM
                  14 responses
                  244 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Working...
                  X