Ehlers' Sinewave Indicator

Forums ProRealTime English forum ProBuilder support Ehlers' Sinewave Indicator

Viewing 12 posts - 16 through 27 (of 27 total)
  • #123303

    Hi there, can anyone figure out how to get the Fractal indicator to take trades in a system?
    I tried writing it out manually (including adding the indicator in the system as I’m not sure if calling it is the fastest, cleanest way to use it?), but it only takes one trade. The first one.

    It’d be really interesting to backtest this with differnt types of stops (Kase Dev Stop, Kaufman, Trailing Stops etc) because the enrties already look like they’re way beyond 50% accurate on direction.

    Cheers for any help,

     

     

    #123489

    Spotted my mistake, the Fractal conditions weren’t complete. Here’s the correct Fractal System code:
    Fractal triangles in the screenshot are yellow and blue.

    3.8 spread. £/$ Daily. 01/11/17-29/01/19
    200% return, 40% Drawdown.

     

     

    #123494

    Fractal + Kase Dev Stop

    Fractal triangles in the screenshot are yellow and blue.

    3.8 spread. £/$ Daily. 01/11/17-29/01/19 (randomly chosen dates)
    200% return, 32% Drawdown.
    Shouldersize = 5 randomly chosen. Please adjust these and the Dev Stop for different markets.

    Kase Dev Stop code: https://www.prorealcode.com/prorealtime-indicators/kase-dev-stop-v3

     

    #123517

    Hi @Nicolas, I was wondering could you please figure out why the buy signal occurred when it did and also why the sell signal is late? This applies to all the trades. Pls see my screenshot.

    The Trading System code is actually directly above this comment. I was trying to get this Fractal System to trade on the next bar after those yellow and blue fractal triangle signals appeared. Any ideas? This is a great indicator that Juanj has coded!

    Cheers and Stay safe,
    Bard

    #123555

    Usual debugging routine:

    1. verify that you are using the same exact settings in both the strategy and the indicator applied on the chart
    2. GRAPH / GRAPHONEPRICE the variables (lines of your indicator) to verify they are the same as the one used on the price chart

     

    #123628

    Thanks @Nicolas, I double checked indicator and system code, they’re both working off a shouldersize =5 variable. I have included the graphing function in the code using: https://www.prorealcode.com/blog/debugging-probuilder-graph-instruction/

    So I’ve tried many different attempts using different parts of the code like “FractalH” or “FractalD = -1 and FractalL ” in the graphing code (and my buy/sell code) — pls see code below — but I can never get the graph to line up with the blue and yellow triangles (or more importantly get the system to actually take trades AT those triangles! This is because I don’t understand the code well enough to be able to program it to take those trades and graph it at those exact blue and yellow triangle signals.

    I guess to a coder/programmer it is probably obvious. I get the basic premise that the code is searching for 5 day highs and lows dependent upon that “shouldersize = 5” variable, but don’t understand the line:
    SwingH = (r+1  (i.e. 11) ) and (FractalD = 0 or FractalD = -1) particularly the FractalD part?

    What code needs to be placed before that “buy 10 at market”  command to get it to enter the next bar after a blue or yellow triangle signal?

    Thanks again,

     

    #123736

    @Barde,

    Sorry  it’s impossible to add the KASE indicator in PRT for the test. Have YOU ITF ?

    Thank You

    Florian

     

    #123763

    No worries, here you go @Florian: https://www.prorealcode.com/prorealtime-indicators/kase-dev-stop-v3/|

    It doesn’t matter if you add and use the non SAR version to the code because the issue I have isn’t the Exit it’s the Entry. Btw, what happens when you copy the SAR version I posted above?

    #123888

    The fractals are marking tops and bottoms in the past. These points are obviously detected afterwards, that’s why your entries are “late”, they just open at the exact moment of when the fractals points are confirmed (later after the top or the bottom). I suggest you read about how the fractal are formed 😉

    1 user thanked author for this post.
    #123937

    “In order for a fractal to form, there should be a series of 5 consecutive bars where the middle bar will be the highest preceded and followed by two lower neighbouring bars on each side.” https://www.prorealcode.com/prorealtime-indicators/bill-williams-fractals/

    Right, got it! Thanks @Nicolas, I clearly need to take my Government prescribed daily dose of fresh air and exercise! 🤪
    The shouldersize might be = 5, but “r” = shouldersize *2, so there is a 10 + 1 day formation with the highest or lowest candle in the middle of that pattern and not confirmed until the end of the last bar. I guess the only “solution” might be to go from the daily time frame and look at a 4 hour or 2 hour time frame to see if there is any “advance warning” of a top or bottom being formed but that’s not exactly going to always spot a daily formation.

    I still don’t understand the line:
    SwingH = (r+1) and (FractalD = 0 or FractalD = -1) particularly the FractalD part?

    That’s from Line 22 in this post: https://www.prorealcode.com/topic/ehlers-sinewave-indicator/page/2/#post-123494
    How does the Fractal code know what FractalD = -1 is yet? It’s not been defined in the lines of code before line 22? Obviously it’s a conditionality (-1 or 1), so if, in Line 22, the Fractal identity is either 0 or -1 then a new high can be classified as FractalD = 1 but could you please explain this FractalD = -1 despite — not being defined yet — in layman’s terms though?
    Cheers,

    #123945

    In this code, the FractalD  variable is the “direction” of the fractal, aka a top or a bottom. The code keep in memory the last formed fractal. In the first run the FractalD is not yet known, that’s why it also test if it is equal to 0 or 1/-1.

    1 user thanked author for this post.
    #178483
Viewing 12 posts - 16 through 27 (of 27 total)

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