John Ehlers’ Reverse EMA

I just listened to this podcast in which the “Better System Trader,” Andrew Swanscott of Australia, interviewed John Ehlers and was handed the code for Andrew’s listeners to have a brand new indicator that Mr. Ehlers calls his “Reverse EMA.” I translated the text file into my trading platform at thinkorswim. Before I share my translation of the text file, however, I would like to add a caveat for anyone who might try to use this as a “predictor” of future price action.

In the interview the author of this Reverse EMA makes a point of saying that moving averages generally have no predictive ability, until now with his new creation of the “Reverse EMA.” The fact is, neither does this indicator. Any moving average, oscillator, or any other indicator that is derived from past prices has NO predictive power whatsoever for future prices. More succinctly, anything derived from price cannot predict future price. For that to happen you need something unrelated, like every time the wind picks up there will be eagles looking for ducklings. Or, as a more relatable example, the advance-decline line has been strong and trending higher therefore I suspect that prices will stay firm to higher from here.

declare lower;

input lincoln = 0.1;
input length = 8;

def polk = 1 – lincoln;
def EMA = ExpAverage(close, length);
def EMA1 = lincoln * Close + polk * EMA[1];
def washington = polk * EMA + EMA[1];
def adams = Power(polk, 2) * washington + washington[1];
def jefferson = Power(polk, 4) * adams + adams[1];
def madison = Power(polk, 8) * jefferson + jefferson[1];
def monroe = Power(polk, 16) * madison + madison[1];
def quincy = Power(polk, 32) * monroe + monroe[1];
def jackson = Power(polk, 64) * quincy + quincy[1];
def vanburen = Power(polk, 128) * jackson + jackson[1];
plot signal = EMA1 – lincoln * vanburen;
plot h = 0;

Obviously I have changed the verbiage of the code for no particular reason than to be ornery, since Mr. Swanscott is an Aussie. The host of the podcast and I had a few exchanges in twitter, during which I apologized for posting the code and the translation without asking him first. He has since granted me permission to post the thinkorswim translation but not the original text file, which was only for subscribers of Mr. Swanscott to receive and hopefully drive more subscribers to his podcast by way of sharing the original text version that Mr. Ehlers provided.

Here’s what the final product looks like. If any thinkorswimmers out there want to comment on my translation, feel free to comment.

Ehlers Reverse EMA

Cheers, and stay safe out there.

That is all. Enjoy your day, and thanks for reading.