• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatic Trend Line Detection and Alert

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

    Automatic Trend Line Detection and Alert

    This is an indicator I published for the September 07 issue of S&C. This indicator is provided on an "as-is" basis.

    To import:

    - Download the file contained in this thread to your desktop
    - From the Control Center window select the menu File > Utilities > Import NinjaScript
    - Select the downloaded file
    Attached Files
    RayNinjaTrader Customer Service

    #2
    Thanks Ray,

    I did modify the alert, any wave file you want can be created here

    http://public.research.att.com/~ttsweb/tts/demo.php

    Comment


      #3
      Trend Line Question

      Hello,

      You auto trend line is GREAT! I love it.

      Have a question for you. How hard would it be
      to devise a indicator that works the same type of
      way but works with divergence?

      Ie - plots the divergence between price action
      and say macd or stoch or both :-)

      Thanks,

      Colin

      Comment


        #4
        Thanks Ray for the auto trendline indicator.

        When I tried to install it is trying to overwrite the default "swing"indicator, is this expected? Does it change swing indicator in anyway?

        What does the "strength" field indicate? Does it indicate number of swing pivots needed for drawing the trendline?

        Did you test whats the optimum strength field for ES 3 min chart. Appreciate your time on this.

        Thanks
        RK

        Comment


          #5
          The reason it is trying to overwrite the Swing indicator is because the way the export NinjaScript is designed is to allow the export file to work on its own. You can safely overwrite your Swing indicator as it is the same file. There will be no changes done.
          JoshNinjaTrader Customer Service

          Comment


            #6
            Strength represents the number of bars left and right of a pivot required to form a pivot. I have not done any optimization to determine best values on any time frame.
            RayNinjaTrader Customer Service

            Comment


              #7
              Thanks Josh. I appreciate it.

              Do you know what the "strength" field indicates? Does it indicate number of swing pivots needed for drawing the trendline?

              Did you test whats the optimum strength field for ES 3 min chart. Appreciate your time on this.

              Thanks
              RK

              Comment


                #8
                Hi

                Any active users of this auto trendline indicator, did you experiment with what "strength" property value you are getting good results? I tried 5 and not sure if it is good.

                Also when does it give the signal. Does it wait for atleast one bar to close below the current trendline?

                Josh thanks for good indicator. I am not a Ninja programming expert, trying to learn the indicator programming. Is it possible you can modify the indicator to include a property field "the number of bars to close below trendline to give signal"

                Also I would like to request if you are considering enhancements to make the trendline a little below the swing lows with a "displacement". For example in an uptrend the trendline is joining the swing low pivots. I am finding that if the trendline is a bit conservative and like a few ticks below the swing lows, it is holding well. For example, if the swing lows in ES uptrend are like 1531.50, 1535.50, 1540.50, then a line joining 1531.25 ,1535.25,1540.25 with 0.25 displacement to downside is holding really well and when it breaks, it gives a very strong signal and doesn't give false signals. May be this can be enhanced by adding a "displacement field" to properties.

                I appreciate your time and any active users opinion on this.

                Thanks
                RK

                Comment


                  #9
                  Unfortunately I cannot provide assistance on this indicator RK_trader. It wasn't me who programmed this one and so I do not know what the parameters do or mean.
                  JoshNinjaTrader Customer Service

                  Comment


                    #10
                    Thanks Josh for the quick reply. No problem.

                    I would appreciate opinions/comments on people who are actively using this indicator. Any volunteers who can modify the code to get the enhancements/options.

                    Thanks
                    RK

                    Comment


                      #11
                      The indicator waits for the first value lower or higher than a uptrend or downtrend line. If the indicator's "Calculate on bar close" is set to true, it will wait for a close of the bar otherwise just the first tick.

                      Unfortunately I will not be ammending the code to provide extra user defineable parameters however, anyone can take this open source code and modify it as they wish.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        Thanks Ray. I am still in learning phase of Ninja programming.

                        I see "calculateonbarclose" on line 42 in Initialize() and it is set to true

                        And the other place I see it is on line 298 which says as below:

                        indicator.CalculateOnBarClose = CalculateOnBarClose;

                        Can you please clarify as to in which line, I need to change the value to true, so that it waits for a a bar to close below the trendline to give the alert.

                        Appreciate your time on this.

                        Thanks
                        RK

                        Comment


                          #13
                          Line 42 should be set to 'true'.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            Hi Ray,

                            In line 42, it is already set to true.

                            Thanks
                            RK

                            Comment


                              #15
                              If it is set tof alse the calcs are on incoming tick basis.
                              Probably can change it in the indicator prop window.
                              Pat

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by supermht, Today, 07:59 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post supermht  
                              Started by mohdhm, Today, 05:13 PM
                              1 response
                              12 views
                              0 likes
                              Last Post nkhoi
                              by nkhoi
                               
                              Started by 3lliot, Today, 05:55 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post 3lliot
                              by 3lliot
                               
                              Started by Fargo, Today, 04:57 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post Fargo
                              by Fargo
                               
                              Started by Johnny Santiago, Today, 03:57 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post Johnny Santiago  
                              Working...
                              X