Reflex and Trendflex Indicator from Ehlers

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #116429 quote
    Loop
    Participant
    Senior

    Dear All,

    I just noticed two new indicators from Ehlers on the last issue of Stock & Commodities: Reflex and Trendlex Indicators.

    I would be greatfull if you code them from easylanguage to prt. I attach the 2 codes.

    Best regards

    ML

    {     Reflex Indicator     (C) 2019   John F. Ehlers }
    Inputs: Length(20);
     
    Vars: Slope(0), sum(0), count(0), a1(0), b1(0), c1(0), c2(0), c3(0), Filt(0), MS(0), Reflex(0);
     
    //Gently smooth the data in a SuperSmoother a1 = expvalue(-1.414*3.14159 / (.5*Length)); b1 = 2*a1*Cosine(1.414*180 / (.5*Length)); c2 = b1; c3 = -a1*a1; c1 = 1 - c2 - c3; Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2];
    //Length is assumed cycle period Slope = (Filt[Length] - Filt) / Length;
    //Sum the differences Sum = 0; For count = 1 to Length Begin Sum = Sum + (Filt + count*Slope) - Filt[count]; End;
    Sum = Sum / Length;
    //Normalize in terms of Standard Deviations MS = .04*Sum*Sum + .96*MS[1]; If MS <> 0 Then Reflex = Sum / SquareRoot(MS);
    Plot1(Reflex); Plot2(0);
    
    {     Trendflex Indicator     (C) 2019   John F. Ehlers }
    Inputs: Length(20);
     
    Vars: sum(0), count(0), a1(0), b1(0), c1(0), c2(0), c3(0), Filt(0), MS(0), Trendflex(0);
     
    //Gently smooth the data in a SuperSmoother a1 = expvalue(-1.414*3.14159 / (.5*Length)); b1 = 2*a1*Cosine(1.414*180 / (.5*Length)); c2 = b1; c3 = -a1*a1; c1 = 1 - c2 - c3; Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2];
    //Sum the differences Sum = 0; For count = 1 to Length Begin Sum = Sum + Filt - Filt[count]; End;
    Sum = Sum / Length;
    //Normalize in terms of Standard Deviations MS = .04*Sum*Sum + .96*MS[1]; If MS <> 0 Then Trendflex = Sum / SquareRoot(MS);
    Plot1(Trendflex); Plot2(0);
    
    #116743 quote
    Nicolas
    Keymaster
    Master

    Here is the Reflex indicator by John F Ehlers:

    //reflex indicator 
    Length=20
    
    if barindex>Length then 
    //Gently smooth the data in a SuperSmoother 
    a1 = exp(-1.414*3.14159 / (.5*Length))
    b1 = 2*a1*Cos(1.414*180 / (.5*Length))
    c2 = b1
    c3 = -a1*a1
    c1 = 1 - c2 - c3
    Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2]
    
    //Length is assumed cycle period 
    Slope = (Filt[Length] - Filt) / Length
    
    //Sum the differences 
    Sum = 0
    For count = 1 to Length 
    Sum = Sum + (Filt + count*Slope) - Filt[count]
    next
    Sum = Sum / Length
    
    //Normalize in terms of Standard Deviations 
    MS = .04*Sum*Sum + .96*MS[1]
    If MS <> 0 Then 
    Reflex = Sum / SQRT(MS)
    endif
    endif
    
    return Reflex
    reflex-ehlers-indicator.png reflex-ehlers-indicator.png
    #116749 quote
    Nicolas
    Keymaster
    Master

    Both indicators have been translated to Prorealtime from this easylanguage version, you can find them on our code library here: Reflex and Trendflex indicators from John F. Ehlers

    #116752 quote
    Loop
    Participant
    Senior

    Awesome jobs Nicolas!

    Thanks a lot!

    ML

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Reflex and Trendflex Indicator from Ehlers


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Loop @loop Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Loop
6 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/11/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...