Ehlers' Sinewave Indicator

Forums ProRealTime English forum ProBuilder support Ehlers' Sinewave Indicator

Viewing 15 posts - 1 through 15 (of 27 total)
  • #11864

    Hi all.

    Is there somebody that can convert John Ehlers’ Sinewave Indicator forPRT usage? This is the EasyLanguage code:

    {*****************************************************
    Sinewave Indicator
    *****************************************************}
    Inputs: Price((H+L)/2),
    alpha(.07);
    Vars: Smooth(0),
    Cycle(0),
    I1(0),
    Q1(0),
    I2(0),
    Q2(0),
    DeltaPhase(0),
    MedianDelta(0),
    MaxAmp(0),
    AmpFix(0),
    Re(0),
    Im(0),
    DC(0),
    alpha1(0),
    InstPeriod(0),
    DCPeriod(0),
    count(0),
    SmoothCycle(0),
    RealPart(0),
    ImagPart(0),
    DCPhase(0);
    Smooth = (Price + 2*Price[1] + 2*Price[2]
    + Price[3])/6;Cycle = (1 – .5*alpha)*(1 – .5*alpha)*(Smooth
    -2*Smooth[1] + Smooth[2]) + 2*(1 – alpha)*Cycle[1]
    -(1 – alpha)*(1 – alpha)*Cycle[2];If currentbar < 7 then Cycle = (Price – 2*Price[1]
    + Price[2]) / 4;{Cycle = Price;}
    Q1 = (.0962*Cycle + .5769*Cycle[2] – .5769*Cycle[4]
    -.0962*Cycle[6])*(.5 + .08*InstPeriod[1]);I1 = Cycle[3];
    If Q1 <> 0 and Q1[1] <> 0 then DeltaPhase = (I1/Q1
    -I1[1]/Q1[1]) / (1 + I1*I1[1]/(Q1*Q1[1]));
    FIGURE 11.2 EasyLanguage Code to Compute the Sinewave Indicator
    The Sinewave Indicator 155
    If DeltaPhase < 0.1 then DeltaPhase = 0.1;
    If DeltaPhase > 1.1 then DeltaPhase = 1.1;
    MedianDelta = Median(DeltaPhase, 5);
    If MedianDelta = 0 then DC = 15 else DC = 6.28318 /
    MedianDelta + .5;
    InstPeriod = .33*DC + .67*InstPeriod[1];
    Value1 = .15*InstPeriod + .85*Value1[1];
    {Compute Dominant Cycle Phase}
    DCPeriod = IntPortion(Value1);
    RealPart = 0;
    ImagPart = 0;
    For count = 0 To DCPeriod – 1 begin
    RealPart = RealPart + Sine(360 * count
    / DCPeriod) * (Cycle[count]);
    ImagPart = ImagPart + Cosine(360 * count
    / DCPeriod) * (Cycle[count]);
    End;
    If AbsValue(ImagPart) > 0.001 then DCPhase
    = Arctangent(RealPart / ImagPart);
    If AbsValue(ImagPart) <= 0.001 then DCPhase = 90
    * Sign(RealPart);
    DCPhase = DCPhase + 90;
    If ImagPart < 0 then DCPhase = DCPhase + 180;
    If DCPhase > 315 then DCPhase = DCPhase – 360;
    Plot1(Sine(DCPhase), “Sine”);
    Plot2(Sine(DCPhase + 45), “LeadSine”);

     

    #11872

    Hi Renato,

    Do this one the same? : http://www.prorealcode.com/prorealtime-indicators/even-better-sinewave/

    I believe not, but just to be sure? If not, I can of course convert it to prorealtime.

    #11884

    Hi Nicholas

    No, I had already seen this one and it is not the same; the Ehlers’ script that I forwarded is much more complicated.

    Thanks for your dedication to the cause LOL.

    Renato

    #11887

    I found a lot of Ehlers’ stuff on HK-Lisse website:

    MESA period indicator :

     

    MESA PHASE INDICATOR :

     

    MESA RSB :

     

    MESA SINEWAVE INDICATOR :

     

    MESA TRENDLINE indicator :

     

    MESA trend cycle :

     

    I haven’t test anything. Don’t really know if it’s personal work or original Ehlers indicators. If it’s not, please tell me and I’ll convert your given code.

    This is the URL where I found these prorealtime codes: http://hk-lisse.over-blog.com/article-16635860.html

    1 user thanked author for this post.
    #11895

     

    #11934

    Thanks Nicholas, thanks Supertiti.

    Very kind of you.

    Renato

    #24496

    Hi Renato,

    I am also very interested in the Hilbert Sine Wave indicator by John Ehler and I would like to be able to use this with PRT. There is the “Better Hilbert Sine Wave indicator” by emini-watch.com, which is only available for TradeStation. I expect you have seen this, but if not here is the link – http://emini-watch.com/trading-indicators/hilbert-sine-wave/

    It would be perfect to have a version of this for PRT. Have you tested the code that Nicolas very kindly provided? Did he manage to code the EasyLanguage code that you provided?

    Regards,

    Tony

    1 user thanked author for this post.
    #50707

    Found this ok eklablog but cant get it to work

     

     

    #50714

    I don’t know if it should look like this, but this is a fixed code:

     

    #86147

    Hello

    I have found an interesting concept on this website  (it is not an advertising, just a link to the concept)

    https://www.pro-indicators.com/pro-indicators—sinewave—momentum-on-tradingview-en.html

    I am manually trading cycle of Elliot Waves

    The idea of trading sinewave cycles combined with other information is smart.

    I would like to build a screener based on

    -sinewave cycles

    -momentum (divergence)

    -price pattern : Demark count 9 /13 , or high volume , candlestick patterns, POC on market profile

    -fibonnaci retracement of previous trend

    Is there anybody who tried to code this kind of indicator / screener?

     

    Regards

     

    #87646

    I have worked on

    -cycle on adaptative stochastic

    -basic candle sticks : Low/High reversal, Extreme Reveral, Reversal

    It give some results

     

    I will try to add

    -better volume indicator

    -momentum filtration

    1 user thanked author for this post.
    #122865

    Hello Nicolas,

    I was attempting to improve/replace the conditions in Candle Reverse Sinewave and use a (fractal) reversal of this original line of code:

    using lines from this Fractal code:
    https://www.prorealcode.com/topic/calculating-diagonal-trend-lines-using-fractals-and-trigonometry/page/2/#post-59358

    How do I correct the syntax below to get it to draw the green arrows when this line: FracL = FracL + 1 is used?

    I’m hoping that this newer coding will produce less false signals than the original, do you think this is the best reversal pattern to use (a 5 bar pattern)?

    I’ve have experimented a lot with different Ehler’s Stochastic periods and thresholds (0.01 up to 0.3) and although this is a great indicator (arrows literally on some turning points) there’s just too many false signals (eg, a few green arrows in a falling market) and it still misses some big turning points.

    Cheers!
    Bard

     

    #122866

    * Not Williams Fractal Bottom code — I meant to write “Calculating Diagonal Trend Lines Using Fractals and Trigonometry” in code description field.

    #122956

    Hi Bard, I literally just scanned through your request. But here is an updated version of the Fractal code above:

     

    #123159

    Wow! This is is amazing, thanks @Juanj,

    I’ve compared your fractal indicator to the modified “reversal point indicator” and my modified version – pls see image 1 of daily S&P 500. Shouldersize =5

    The original indicators arrows are bright green and red.
    My Univ Osc modified indicator uses dark green and orange arrows and
    the fractal indicator uses green and purple triangles.

    I used a Call code for Ehler’s Universal Oscillator to replace the standard oscillator in the original “reversal point indicator” (my code at the bottom of the comments section of the indicator here: https://www.prorealcode.com/prorealtime-indicators/reversal-point-indicator/)

    I had a couple of questions though, I’m just not sure how to do a substitution using the fractal code for this old c3  = lowest[3](low)<lowest[LowestLow](low)[1] etc, line of the code?

    And if you wanted to do a simplified creation I was wondering why I set it to Buy when Price = FractalL, it doesn’t produce any trades? Pls see second image.

    Also lastly why are the Return Fractal H and Fractal L lines a few bars to the right of the drawarrows on the price chart, i.e. not aligned with the drawarrows?

    Thanks again,

    Cheers,
    Stay safe!

Viewing 15 posts - 1 through 15 (of 27 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login