Modified Auto Fib
The Modified Auto Fib AFL in Amibroker automates Fibonacci retracement and extension levels. Utilizing amibroker data feed capabilities enables traders to identify potential support and resistance levels based on Fibonacci analysis. This AFL aids traders in understanding price retracements and extensions, facilitating more precise entry and exit points in trades.
/ SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )), ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 ))); _SECTION_BEGIN("Fib_Levels"); /*--------------------------------------------------- Automatic Fib Levels Aron Pipa, December, 11, 2005 --------------------------------------------------------*/ SetChartOptions(0,chartShowArrows|chartShowDates); Plot(C,"", IIf(C>O,colorGreen,colorRed) , styleCandle); // Get values for fib levels StartBar=SelectedValue(BarIndex()); FinishBar = EndValue( BarIndex() ); i = startbar; period = FinishBar - StartBar; Lo =LLV(L,period); Hi = HHV(H,period); Line0 = 0; Line1 = 0; Line2 = 0; Line3 = 0; Line4= 0; Line100 = 0; for( i = startbar; i < finishbar; i++ ) { if(EndValue(C)> KEY REVERSALS << ", O, H, L, C, SelectedValue( ROC( C, 1 )) )); Plot(C,"",colorBlack,styleBar); /*Closing Price Reversals Automatic Analysis by Larry Lovrencic*/ CPRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND HRef(C,-1); CPRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>Ref(H,-1) AND L>Ref(L,-1) AND C(H-0.2*(H-L)) AND HRef(L,-1); HRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND HRef(L,-1); /*Island Reversals Automatic Analysis by Larry Lovrencic*/ IRbuy=Ref(L,-2)>Ref(H,-1) AND L>Ref(H,-1); IRsell=Ref(H,-2)Ref(H,-1); KRsell=O>Ref(C,-1) AND H>Ref(H,-1) AND C(H-0.2*(H-L)) AND H(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>Ref(H,-1) AND L>Ref(L,-1) AND C>Ref(C,-1); /*Pivot Point Reversals Automatic Analysis by Larry Lovrencic*/ PPRbuy=Ref(L,-1)Ref(H,-1); PPRsell=Ref(H,-1)>Ref(H,-2) AND Ref(H,-1)>H AND C