Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alligator and Gator Oscillator

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

    Alligator and Gator Oscillator

    Alligator and Gator Oscillator by Bill Williams


    Usage: http://www.metaquotes.net/techanalys...ors/alligator/

    Syntax
    Code:
    Alligator()
    Gator()
    To get the value of the various Alligator lines:
    Code:
    Alligator().Jaw[int barsAgo]
    Alligator().Teeth[int barsAgo]
    Alligator().Lips[int barsAgo]
    To get the Gator bar values:
    Code:
    Gator().JawTeeth[int barsAgo]
    Gator().LipsTeeth[int barsAgo]
    Also included in the package is an indicator for SMMA (Smoothed Moving Average).
    In the middle of http://www.adblue.de/cqg/movings.htm discusses the calculations of the SMMA.

    As always, please let me know if you see any bugs/miscalculations or have suggestions/comments. Thank you.

    Bug Fix: Fixed an error on SMMA when used with CalculateOnBarClose = false.
    Attached Files
    Last edited by NinjaTrader_JoshP; 03-28-2008, 04:03 PM.
    Josh P.NinjaTrader Customer Service

    #2
    Uacvx, this is awesome stuff, your efforts are really appreciated.

    Comment


      #3
      Thank you! I Love it!

      Originally posted by rally View Post
      Uacvx, this is awesome stuff, your efforts are really appreciated.
      Love the indicator and the alligator explanation. THank you so much for sharing!

      Comment


        #4
        There has been a bug fix to this indicator. If you are using it please update.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thank you so much Josh, I do use the alligator!

          Comment


            #6
            Hi everyone,

            I found an issue with the Gator Oscillator...most histo bars were green when this was running in real-time. If you've experienced this problem, I've attached the fix to this post.

            Enjoy!
            Ben
            Attached Files

            Comment


              #7
              Thanks for the fix Ben.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Are offsets correct? Difference between Sierra Charts and NT...

                Hello there,

                I am considering switching over to NT from Sierra Charts and have played around with the Alligator indicators on both platforms. There appears to be a discrepancy in the way the indicators are plotted and I am wondering whether or not it could be due to the offsets in the code.

                Attached are JPEGS of the indicators working on both platforms -- as you can see, the shapes of the lines are almost identical. However, the vertical offset seems to be different --> but which chart is correct? Is it possible that different sums are being used as well?

                I have checked with SC and they are using the following formula:
                +++++++++++++++++++++++
                Smooth:

                A Smoothed Moving Average is similar to a simple moving average. However, in a smoothed moving average, rather than subtracting the oldest value the previous smoothed average value is subtracted.

                For the following example the PERIOD equals 3.

                The first value for a Smoothed Moving Average is determined by the formula SMOOTH. It is plotted on the chart at the third bar from the left side of the screen.

                SMOOTH =(PRICE 1 + PRICE 2 + PRICE 3)/PERIOD

                The next value would be plotted at the fourth bar from the left side of the screen.

                SMOOTH2 = (PREVIOUS SUM - PREVIOUS AVG + PRICE 4)/PERIOD

                For the second calculation of SMOOTH, PREVIOUS SUM is the sum of PRICE 1 + PRICE 2 + PRICE 3; and PREVIOUS AVG is the initial value of SMOOTH.

                The next value would be plotted at the fifth bar from the left side of the screen. SMOOTH = (PREVIOUS SUM - PREVIOUS AVG + PRICE 5)/PERIOD. Subsequent values would be determined by subtracting the PREVIOUS AVG from the PREVIOUS SUM, adding the next more recent PRICE, then dividing by the PERIOD.
                ++++++++++++++++++++++++

                Thanks.
                Warmest regards,
                Andrew
                Attached Files

                Comment


                  #9
                  Hi achung,

                  From the screenshots you may be using an older version of the indicator which had a bug in regards to converging plots in live data. Please try updating and seeing if that helps. Other than that, the SMMA implementation should be the same as you described.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Import NinjaScript Archive File (.zip) Warning

                    I tried importing but got the following message:
                    ----------------
                    "You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive file. "
                    -------------

                    I also now get this message if I try to Export.

                    QUESTION: How do a resolve custom NinjaScript files?

                    Comment


                      #11
                      Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.

                      Open NinjaTrader
                      From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
                      Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
                      A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
                      At the bottom of the window a new section will appear where you can find the error locations.
                      From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.
                      If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.

                      To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

                      We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums - http://www.ninjatrader.com/support/f...ead.php?t=4678
                      MatthewNinjaTrader Product Management

                      Comment


                        #12
                        Error log

                        Hi, I'm using Ninjatrader 7
                        I have tried to compile the gator and the alligator indicators...
                        Here is a print screen with an error log of the gator, can you help me to solve it?
                        Thank you
                        Attached Files

                        Comment


                          #13
                          The arguments for NT7's DrawHorizontalLine method have changed:



                          This should work:

                          Code:
                          DrawHorizontalLine("Zero line", 0, Color.Black);
                          MatthewNinjaTrader Product Management

                          Comment


                            #14
                            Thank you very much

                            Comment


                              #15
                              Is this available for NT 8?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Lumbeezl, 01-11-2022, 06:50 PM
                              31 responses
                              816 views
                              1 like
                              Last Post NinjaTrader_Adrian  
                              Started by xiinteractive, 04-09-2024, 08:08 AM
                              5 responses
                              13 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by swestendorf, Today, 11:14 AM
                              2 responses
                              6 views
                              0 likes
                              Last Post NinjaTrader_Kimberly  
                              Started by Mupulen, Today, 11:26 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post Mupulen
                              by Mupulen
                               
                              Started by Sparkyboy, Today, 10:57 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X