Can anyone code the John Ehlers Recursive Median Filter & Oscillator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #64691 quote
    Bard
    Participant
    Master

    Hi,

    John Ehlers (see: Rocket Science for Traders) introduced two indicators last year:

    The recursive median filter (RMF) and the recursive median oscillator (RMO).

    Is there anyone that can code these specifically as I am unable to progress with the Variables part of the conversion?

     

    Thanks in advance,

    Best
    Bard

    //Recursive Median Filter (c) 2017 John F. Ehlers
    
    //Inputs:
    LPPeriod(12);
    
    //Vars:
    alpha1(0),
    RM(0);
    
    //Set EMA constant from LPPeriod input
    alpha1 = (Cos(360 / LPPeriod) + Sin(360 / LPPeriod) - 1) / Cos(360 / LPPeriod);
    
    //Recursive Median (EMA of a 5 bar Median filter)
    RM = alpha1*MedianPrice[5] + (1 - alpha1)*RM[1];
    
    Return RM as "Recursive Median Filter"
    
    --------------------------------------------------------
    
    //Recursive Median Oscillator (c) 2017 John F. Ehlers}
    
    //Inputs:
    LPPeriod(12),
    HPPeriod(30);
    
    //Vars:
    alpha1(0),
    alpha2(0),
    RM(0),
    RMO(0);
    
    //Set EMA constant from LPPeriod input
    alpha1 = (Cos(360 / LPPeriod) + Sin(360 / LPPeriod) - 1) / Cos(360 / LPPeriod);
    
    //Recursive Median (EMA of a 5 bar Median filter)
    RM = alpha1*MedianPrice[5] + (1 - alpha1)*RM[1];
    
    //Highpass filter cyclic components whose periods are shorter than HPPeriod to //make an oscillator
    Alpha2 = (Cos(.707*360 / HPPeriod) + Sin(.707*360 / HPPeriod) - 1) / Cos(.707*360 / HPPeriod);
    
    RMO = (1 – alpha2 / 2)*(1 – alpha2 / 2)*(RM - 2*RM[1] + RM[2]) + 2*(1 – alpha2)*RMO[1] - (1 – alpha2)*(1 – alpha2)*RMO[2];
    
    Return RMO as "Recursive Median Oscillator"
    Return 0, as "Zero line"
    

     

    There are some promising backtests based on these indicators her midway down the page. Pls see screenshot: http://traders.com/Documentation/FEEDbk_docs/2018/03/TradersTips.html

    #64704 quote
    Despair
    Blocked
    Master

    Oh, thank you. I missed this one! Looks interesting.

    #64768 quote
    Despair
    Blocked
    Master

    I submitted the indicator to the library. You can download it once Nicolas has approved it.

    #64823 quote
    Bard
    Participant
    Master

    Thanks very much @Despair, much appreciated.

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

Can anyone code the John Ehlers Recursive Median Filter & Oscillator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Bard @brad Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Bard
7 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/07/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...