"Bill Williams' Fractals" WITH Arrows & Levels

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #35504 quote
    Doctrading
    Participant
    Master

    Hi all,

    Sorry for being far from this site, these last weeks… I’m very busy, but still happy to trade and post some codes. These times I did prefer manual trading… but this trading is made with the help of custom indicators.

    Here is one of these indicators.

    As you know, there was already a code of the Fractals of Bill Williams on prorealcode.com.

    But I wanted to create this code myself.
    And I did add Arrows, so that you can visualize the fractals as if you were on Metatrader for example.

    On the picture, you can see : 

    • the support / resistance levels (in blue, but you can change the colors)
    • the fractals themselves (with arrows)

    You can change the period of the fractals.

    Best regards,

    // Code : Fractales
    // www.doctrading.fr
    
    // Visualisation des fractales avec flèches
    Arrow = 0
    
    // Nombres de bougies constituant la fractale (impair)
    Ncandles = 5
    
    // Nombres de bougies de chaque côté de la bougie extrême
    Nside = (Ncandles - 1) / 2
    
    // Définition de la fractale supérieure
    IF high[Nside] >= highest[Ncandles](high) THEN
    Fup = high[Nside]
    Arrow = -1
    ENDIF
    
    // Définition de la fractale inférieure
    IF low[Nside] <= lowest[Ncandles](low) THEN
    Fdown = low[Nside]
    Arrow = 1
    ENDIF
    
    // Tracé des flèches
    IF Arrow = 1 THEN
    DRAWARROWUP(barindex[2],low[2]-Averagetruerange[5]/3)coloured(0,150,0)
    ELSIF Arrow = -1 THEN
    DRAWARROWDOWN(barindex[2],high[2]+Averagetruerange[5]/3)coloured(255,0,0)
    ENDIF
    
    Return Fup as "Fractale UP", Fdown as "Fractale DOWN"
    #35509 quote
    Nicolas
    Keymaster
    Master

    Hi Doc, thanks for sharing your code.

    While reviewing it for the library, I stumble upon the bug of multiple arrows like in the picture attached, I don’t know if you are aware of it?

    The fractals with same design as MT4 has been coded in this topic already FYI: https://www.prorealcode.com/topic/indicateurs-bill-williams/#post-20690

    #35511 quote
    Doctrading
    Participant
    Master

    Hello Nicolas,

    Actually I did test only on daily candles ; I didn’t see this bug…

    Sorry, I didn’t see that this indicator was already coded here !

    Best regards,

    #35515 quote
    Doctrading
    Participant
    Master

    Strange, actually I have a but with fractals of 3 candles, but non with fractals of 5 candles…

    #35525 quote
    Nicolas
    Keymaster
    Master

    The problem is that you continuously draw arrow at high or low 2 bars ago even if you have not find any new fractal. You should draw the arrow at fractal bar instead. You are trying to reinvent the wheel 🙂 there are already many codes that spot fractals points:

    https://www.prorealcode.com/prorealtime-indicators/bill-williams-fractals/

    https://www.prorealcode.com/topic/indicateurs-bill-williams/

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

    https://www.prorealcode.com/prorealtime-indicators/multi-fractals-zigzag-highlow/

    https://www.prorealcode.com/prorealtime-indicators/bar-count-reversals-pivot-points-highlow/

    #69196 quote
    tommygtb
    Participant
    New

    Hi Nicolas,

    Is there an updated Fractals indicator that works with 10.3 with dots rather that arrows ?

     

    Kind Regards

    Tom

    #69302 quote
    Nicolas
    Keymaster
    Master

    You can try this one: https://www.prorealcode.com/topic/indicateurs-bill-williams/#post-20690

    You can change the symbol used to plot the fractals by something else if you want to.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

"Bill Williams' Fractals" WITH Arrows & Levels


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Doctrading @doctrading Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Nicolas
7 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/14/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...