My Stochastic Oscillator – John Ehlers

My Stochastic Oscillator – John Ehlers

In his article, “Predictive And Successful Indicators,” author John Ehlers presents two new indicators: the SuperSmoother filter, which is superior to moving averages for removing aliasing noise, and the MESA Stochastic oscillator, a stochastic successor that removes the effect of spectral dilation through the use of a roofing filter.

To demonstrate the effects of using the new indicators, Ehlers introduces a simple countertrend system that goes long when MESA Stochastic crosses below the oversold value and reverses the trade by taking a short position when the oscillator exceeds the overbought threshold.

This stochastic oscillator eliminate noises a lot and then make reading of this oscillator more convenient with a clearer view. Because of smoothing / lag phenomena, this indicator must be used in convergence with other indicator to give good signals. Another ways of using it for counter trend trades would be to directly enter trade when the oscillator cross the oversold area for a buy order and the overbought area for a short sell order.

 

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. SAM • 11/03/2016 #

    Hy Nicolas,I have downloaded this oscillator, but i see only the two horizontal lines (0.2 and 0.8).The oscillator line don’t go. (maybe in your script missing the “close” data?)
    Thank-you
     

  2. SAM • 11/03/2016 #

    Sorry for my previous post, your indicato all right!!
    it runs well, but on Germany 30 (CFD) time frame 15 minutes don’t go.. (for every other time frame runs good..)i do not know why…
     
     

  3. Bard • 11/03/2016 #

    Hi Nicolas, Thanks for posting Ehler’s My Oscillator (a combination of his Optimal Tacking Filter and the Universal Oscillator (Supersmoother)), I just saw your MESA stochastic for prorealtime post #15940. You mentioned “This indicator reflects short term variations of price within the “bandedge” parameter as a  frequency” on the  Universal Oscillator page. What does that exactly mean? I was also wondering how best to determine what Bandedge setting to use in Ehler’s Oscillators, or is it a case of optimising it for one currency pair and then seeing how it performs for other pairs?
    Re: Trading systems, I’m still working with different Ehler indicators. When the Supersmoother Oscillator is set to be >= the zero line as a long entry (and <= for short trades) using a Kaufman KAMA as the exit long (Period = 4, FastPeriod = 2, SlowPeriod = 30) works well on different markets like forex, gold, even Credit Agricole. As usual it is a balancing act with getting acceptable lower drawdowns with the % winner and a good gain/loss ratio.Is there any way to do Monte Carl testing of results, fortunately it’s built into the Trading Blox s/ware I have but I didn’t manage to figure out how to use the Excel s/ware approach?Cheers again for your help.

    • Nicolas • 11/03/2016 #

      Nice to hear you make good trades with Ehler’s indicators so far. About the “bandedge” statement, where did I mentioned that?
      About Monte Carlo analysis, there are already good threads on forums to make your excel report of prorealtime backtest results:
      http://www.prorealcode.com/topic/monte-carlo-analysis/
      http://www.prorealcode.com/topic/montecarlo/

    • Bard • 11/03/2016 #

      The bandedge was part of the Universal Oscillator: http://www.prorealcode.com/prorealtime-indicators/universal-oscillator-john-ehlers/Thanks for the Monte Carlo links, I will take a look. (I’m using Firefox and the page is jumping to the bottom when I click on insert link…)
       

  4. Bard • 11/03/2016 #

    Hi Nicolas, Thanks for your help with the Monte Carlo links and these Ehler’s indicators, they really are good, particularly the Universal Oscillator with 0.7 and -0.7 crosses using a trend definition like two 200 mov averages, the present  compared to it’s 5 or 10 day previous value to determine trade direction and using a shorter period exit stop. Oddly Cythia Kase’s Dev Stops didn’t seem to work as well… I will test the Univ. Osc with the Kaufman KAMA soon.
    I’m going to see how they then compare with the Goertzel Algo if I can ever get those indicators to load properly without “syntax issues… The function called from Example A, called from Example B, is called with 1 parameter(s) instead of 0 expected. “? I think I’m, missing an indicator – pls see screenshot: The image isn’t showing as attached to this comment? I will try again below this comment if necessary.I’m trying to figure out though how you determine the best bandedge setting for the Universal Oscillator? It’d be great if it could have been an optimised parameter so it could then be optimised and “let loose” on an out of sample data set. Is there a simple way like trying to match the oscillations to the price/chart oscillations?Cheers Brad

  5. Bard • 11/03/2016 #
  6. Bard • 11/03/2016 #

    Yes, the Univ Osc with a KAMA used as a trend filter instead of a simple mov ave. (for long or short trades – comparing the present with it’s value 10 days ago) doubled the profits to 78% over 4 years with drawdown dropping from 21.6% to 13.7%. (-;

  7. Bard • 11/03/2016 #

    P.s. is there anyway of getting more, 4 hour £/€ data to back test on (or other currency pairs)? The £/€, Univ Osc. System only does 61 trades between 2012 and 2016, that’ll be 40 trades to optimise on and hopefully around 20 trades for the out of sample test.

  8. Etienne • 11/03/2016 #

    Hi, I’m quite late in this thread.
    I’d just like to propose an enhancement because this indicator turns out to be really to compute, specially if doing some back-testing.
    The idea simply is to replace the looping part with some native function which are quicker, and to do constants calculation just once… Here’s the code…

    Once alpha1 = (Cos(.707*360 / 48) + Sin(.707*360 / 48) – 1) / Cos(.707*360 / 48)
    Once a1 = exp(-1.414*3.14159 / 10)
    Once b1 = 2*a1*Cos(1.414*180 / 10)
    Once c2 = b1
    Once c3 = -a1*a1
    Once c1 = 1 – c2 – c3

    if barindex>Length then
    //Highpass Filter cyclic components whose periods are shorter than 48 bars
    HP = (1 – alpha1 / 2)*(1 – alpha1 / 2)*(Close – 2*Close[1] + Close[2]) + 2*(1 – alpha1)*HP[1] – (1 – alpha1)*(1 – alpha1)*HP[2]
    //Smooth with a Super Smoother Filter
    Filt = c1*(HP + HP[1]) / 2 + c2*Filt[1] + c3*Filt[2]

    HighestC = highest[Length – 1](Filt)
    LowestC = lowest[Length – 1](Filt)

    Stoc = (Filt – LowestC) / (HighestC – LowestC)
    MyStochastic = c1*(Stoc + Stoc[1]) / 2 + c2*MyStochastic[1] + c3*MyStochastic[2]
    endif

    RETURN MyStochastic as “My Stochastic”, 0.8 as “0.8 level”, 0.2 as “0.2 level”

  9. Bard • 11/03/2016 #

    Hi Nicolas, I wanted to make this scaled indicator above between -1 and +1 instead of 0 to +1.
    What’s the best way to do that please as I tried multiplying MyStochastic by 2 and didn’t get a full range of values for the -1 to 0 range? Pls see image and top indicator: https://www.dropbox.com/s/hsimnthu4kmjw4f/scalingoscillator.png

    I wanted to compare the effects of the roofing filter in this indicator with the results from Ehler’s Universal Oscillator (no roofing filter) which is set as a histogram plotted between -1 and +1. It’s easier for visual comparison, although of course it’s still possible with this line based oscillator version. Cheers.

avatar
Register or

Likes

avatar avatar avatar
Related users ' posts
Bebbo Grazie del prezioso contributo Nicolas, scusa la mia inesperienza, sono alle prime armi e s...
Nicolas To avoid recalculation, you should use the one from this post.
Bebbo Ok Grazie Nicolas.
ALE Hi the color is given by a numerical value derived from the oscillator in use. If you comp...
efahmy Thanks mate
Jo-01-R Hello, it is possible to have this indicator but instead of colors rather have numbers rangi...
Appsoluxions Hi Nicolas, do you have the MT4 version of the indicator? I am not sure if these kind of que...
Nicolas Hi, don't have one sorry. But you can still ask for private coding through our programming s...
Appsoluxions Cool. Thanks for the response.
Nicolas Add it on price using the wrench on the left upper side of the price chart.
Stenozar thanks Nicolas, I' ll try again!
Radetzky Buongiono e grazie : l'immagine sopra ritrae l'indicatore sul TF 15 min ma a me funzio...
Etienne Hi, thanks for proving this code. I would like to contribute by adding a computation speed...
Etienne //Compute Super Smoother coefficients once if barindex = 1 then a1 = exp( -1.414 * 3.14159...
Nicolas Thanks a lot!
Bard From the url link #post-65420 above but without the chart image: Stocks & Commodities...
Bard Note: lter = filter
Bard Apologies, there's been an issue with copying "f" and "I" from the article and pasting.. whi...
Nicolas
6 years ago
Nicolas Oui. Pour changer la période, il faudra ajuster la variable MMperiod
macbartin plus la période est grande (en occurrence 20) plus l'indicateur est précis dans les changeme...
Hasardeur Hallo Nicolas, in John Ehlers book "cycle analytics for Traders" from 2013, Mr. Ehlers desc...
GraHal Is this the Discussion Topic you need @Gregg https://www.prorealcode.com/topic/scalping-i...
bertrandpinoy bonjour Nicolas y a t il une possibilité de signal sonore dès qu une vente ou un achat serai...
Nicolas Oui cela nécessitera une adaptation du code cependant, merci de formuler une demande sur le ...
TAC Bolsa This indicator give trading signals depending of the crosses of overbought and oversold area...
Juanjo Hola. El indicador es válido para acciones en periodo diario? Gracias
TAC Bolsa Hola Juanjo la información del indicador y otros la puede encontrar en el BLog. https://w...
Khaled Thanks, but if I may ask what's EMA Period? The price which reverses the EMA[20] is not the ...
Francesco78 EMA is not a moving average, it is just the name we called the quantity defined above
Khaled My bad. Thank you so much!
alex Im looking for a entry when EpicMA crosses over/under trigger. Then look for exits when Epic...
haseluis Hello, who can help me why the screener does not work // Der folgende Code bezieht sich auf...
Nicolas Hello, please ask your question with a new forum topic, this is not the place to ask for sup...
Pier
7 years ago
Cris48  Nice Pier, I put inside also the adx .... //settings//b=20 if low < low[1] thenllv = (...
parthdesai11 Indicator not working in Beta Version 11.1 , Any idea ??
Nicolas What is the issue with version 11 and this indicator please?
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
Gianluca Hello there is a new version, is it possible to translate it? https://www.tradingview.com...
christophe11560 bonjour, PRT me demande de réduire la période d'adaptive cyber Cycle suite à de fort ralent...
Pietro Fontana christophe11560, i've coded this a long time ago for a different version of the PRT, i'm not...
majid52026 Hi I want MBXF Timing for mq5 Does anyone have this indicator???
dertopen Hi Nicolas good work for the code translation when i chek the mbfx system site i see in t...
Nicolas Yes, just change the color by yourself in the indicator settings window.
Nicolas All conditions under parenthesis for the c1 to c4 conditions should be inverted. 
tomus Can you give an example of the overbought codes please? Thanks.
ams123 Frank Merci Nicholas -:)
wtangsiri Bonjour J'ai importé le fichier ITF en question, mais cela me donne, en bas de l'écran, un...
Nicolas Il faut ajouter l'indicateur sur le graphique du prix.
skuggan89 This is a great indicator, works very well!! Is there any algo based on this indicator that ...

Top