Fractal Restracements
Fractal Retracements refer to price movements that retrace a portion of the previous trend before potentially continuing in the original direction. Amibroker AFL can be employed to develop tools that identify and measure these retracements using fractal-based analysis. Integration with Amibroker data feed allows for accurate identification of retracement levels, assisting traders in assessing potential reversal points.
/_SECTION_BEGIN("Fractal Retracements"); TOP = Param("HIGH VALUE",100,1,1000); BOTTOM = Param("LOW VALUE",100,1,1000); x = HHV(H,top); y = LLV(L,bottom); nil = x; twelveand5 = x-((x-y)*0.125); twenty5 = x-((x-y)*0.25); thirty3and3 = x-((x-y)*0.3333); fifty = x-((x-y)*0.5); sixty6and6 = x-((x-y)*0.6667); seventy5 = x-((x-y)*0.75); eighty7and5 = x-((x-y)*0.875); hundred = x-((x-y)*1.00); Plot(nil, "", colorRed); Plot(twelveand5, "", colorRed); Plot(twenty5, "", colorRed); Plot(thirty3and3, "", colorRed); Plot(fifty, "", colorLime); Plot(sixty6and6, "", colorRed); Plot(seventy5, "", colorRed); Plot(eighty7and5, "", colorRed); Plot(hundred, "", colorRed); Plot(C, "", colorRose, styleCandle); _SECTION_END();