Can anyone code the John Ehlers Recursive Median Filter & Oscillator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #64691 quote
    BardBard
    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

    TT-Quantacula2.png TT-Quantacula2.png
    #64704 quote
    DespairDespair
    Blocked
    Master

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

    #64768 quote
    DespairDespair
    Blocked
    Master

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

    #64823 quote
    BardBard
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 BardBard
8 years, 6 months ago.

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