Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ehlers Instantaneous Trendline

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

    Ehlers Instantaneous Trendline

    Hi,

    Has anyone coded the 'Instantaneous Trendline' indicator developed by John Ehlers for NT? If so, could you please share.

    Here is a post about the Instantaneous Trendline:


    Thanks!

    Erin

    #2
    what i find weird about the original TS code for this in ehlers book is that the Smooth variable is not used anywhere in the code after it is defined

    see :

    ///// EHLERS INSTANTANEOUS TREND INDICATOR /////
    Inputs: Price ((H+L)/2), alpha(.07);
    Vars: Smooth(0), // Smooth defined here but never used afterwards
    iTrend(0),
    Trigger(0);
    iTrend = (alpha- alpha*alpha/4)*price
    + .5* alpha * alpha * Price[1] -
    (alpha - .75 * alpha*alpha) * Price[2] + 2
    *(1 - alpha) * iTrend[1] -(1 - alpha)
    *(1-alpha)*iTrend[2];
    If currentBar < 7 then iTrend = Price + 2*price[1]
    + Price[2]/4;


    Trigger = 2*iTrend - iTrend[2];
    // trigger different than in NT indicator code


    plot1 (iTrend,"iTrend",blue);
    plot2 (Trigger, "Trig",green);
    Last edited by qewcool; 02-15-2010, 06:14 PM.

    Comment


      #3
      the code in the NT indicator archive for this seems to be different and it defines the Smooth variable.

      Also the Trigger variable is different than the original TS code.

      If anyone understand why this had been done like this, I would like to hear the explanation.

      See NT code:

      protected override void OnBarUpdate()
      {


      if (CurrentBar==0)
      {
      smooth.Set(0);
      trigger.Set(0);
      trend.Set(0);
      TrendPlot.Set(0);
      TriggerPlot.Set(0);

      return;
      }

      int Per1=PeriodsP;
      int Per2=PeriodsP;


      if(CurrentBar <= 7)
      return;

      double SmoothTemp = (Median[0] + 2* Median[1] + 2* Median[2] + Median[3])/6; // here Smooth is defined

      smooth.Set(SmoothTemp);


      double ItrendTemp = (alpha - alpha*alpha/4)* smooth[0]+0.5*alpha*alpha*smooth[1]-(alpha-0.75*alpha*alpha)*smooth[2]+2*(1-alpha)*trend[1]-(1-alpha)*(1-alpha)*trend[2]; // smooth is used here

      trend.Set(ItrendTemp);

      trigger.Set(trend[1]); // trigger is defined here ...

      TrendPlot.Set(trend[0]);
      TriggerPlot.Set(trigger[0]);

      }

      Comment


        #4
        qewcool,

        It would probably be more useful for users to know exactly which indicator you are using and where to get it. That way they can play with it too to help you understand what is being used. Thanks.

        Also, you may want to try contacting the original author directly as they would probably be the best source to question why they coded it a certain way.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          the indicator is in NT indicator archive at



          its called Instantaneous trendline indicator (itrend) ( second from the top of the search results).

          For the TS code, Its in Ehlers book "cybernetic analysis for stock and futures" at p.24 but you can find it on the web too just search "ehlers and itrend"

          Comment


            #6
            qewcool,

            This code is a 3rd party customer provided code authored by Elliott Wave. Your best bet may be to try and contact him directly.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            577 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X