BardParticipant
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
Oh, thank you. I missed this one! Looks interesting.
I submitted the indicator to the library. You can download it once Nicolas has approved it.
BardParticipant
Master
Thanks very much @Despair, much appreciated.