Another version of the classic Bill Williams indicator: Fractal.
The last two Fractals are plotted with lines on the price chart.
Fractals are highest high or lowest low of the last 3 candles.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
//----- Highs ----- ONCE HighCount = Undefined ONCE HighFractal = Undefined IF (High > High[1]) AND (High > High[2]) THEN HighLevel = High ENDIF IF (High < HighLevel) THEN HighCount = HighCount - 1 ELSIF (High >= HighLevel) THEN HighCount = 0 ENDIF IF HighCount = -2 THEN HighFractal = HighLevel ELSE HighFractal = HighFractal ENDIF //----- Lows ----- ONCE LowCount = Undefined ONCE LowFractal = Undefined IF (Low < Low[1]) AND (Low < Low[2]) THEN LowLevel = Low ENDIF IF (Low > LowLevel) THEN LowCount = LowCount + 1 ELSIF (Low <= LowLevel) THEN LowCount = 0 ENDIF IF LowCount = 2 THEN LowFractal = LowLevel ELSE LowFractal = LowFractal ENDIF RETURN HighFractal as "High Level", LowFractal as "Low Level" |
Share this
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 :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials