Fractals average using arrays

Forums ProRealTime English forum ProBuilder support Fractals average using arrays

Viewing 4 posts - 1 through 4 (of 4 total)
  • #124352

    Here is another example showing the benefits of the arrays that are now available in PRTv11.

    This indicator stores the value of every fractal (swing high and swing low) so that we can then calculate any period average of them that we like. So a 10 period average would look at the last ten swing highs and add them up and divide by 10 and the same for swing lows.

    Add it to the price chart.

    The type of fractal can be selected by changing the ‘BarsBefore’ and ‘BarsAfter’ values and period for the average set by changing the ‘p’ value.

    The attached image shows 3 bar fractal 50 period averages on the EURUSD daily.

     

    3 users thanked author for this post.
    #124736

    Is there a download file for this?

    #124738

    I didn’t attach one as really it was just an example exercise in playing with arrays. My platform is shut down at the moment but I’ll add an ITF file tomorrow and maybe even submit it to the library tomorrow. No point in doing that now as it’s Sunday and Nicolas is most likely sleeping off the cocktails he’s been drinking in the garden all afternoon!

    You can always copy and paste the code above into a new indicator with creation by programming and then add ‘p’ and ‘BarsBefore’ and ‘BarsAfter’ as a changeable variables or just remove the // before them in the code.

    #124749

    You can now find this indicator in the library:

    https://www.prorealcode.com/prorealtime-indicators/fractals-average/

    I’ve also added a blue mid line that is the average position of the swing high fractal line and the swing low fractal line. You can turn the display of any of the three lines on and off by ticking the relevant box.

Viewing 4 posts - 1 through 4 (of 4 total)

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