Friday, October 11, 2024

AFL CODE-SETUP_HULL INDICATORS


 _SECTION_BEGIN("RSIa");

P = ParamField( "Price field" );

periods = Param("Periods", 14, 1, 200, 1 );

Plot( RSIa( P, periods), _DEFAULT_NAME(), ParamColor( "Color", colorOrange ), ParamStyle("Style",styleThick)  );

_SECTION_END();


_SECTION_BEGIN("Stoch%D1");

periods = Param( "Periods", 8, 1, 200, 1 );

Ksmooth = Param( "%K avg", 3, 1, 200, 1 );

Dsmooth = Param( "%D avg", 3, 1, 200, 1 );

Plot( StochD( periods , Ksmooth, DSmooth ), _DEFAULT_NAME(), ParamColor( "Color", colorLime), ParamStyle("Style") );

_SECTION_END();


_SECTION_BEGIN("Stoch%D2");

periods = Param( "Periods", 14, 1, 200, 1 );

Ksmooth = Param( "%K avg", 3, 1, 200, 1 );

Dsmooth = Param( "%D avg", 3, 1, 200, 1 );

Plot( StochD( periods , Ksmooth, DSmooth ), _DEFAULT_NAME(), ParamColor( "Color", colorRed ), ParamStyle("Style") );

_SECTION_END();


_SECTION_BEGIN("add line");

Line1= LineArray (0,50,LastValue(BarIndex()),50,20);

Line2= LineArray (0,30,LastValue(BarIndex()),30,20);

Line3= LineArray (0,70,LastValue(BarIndex()),70,20);

Plot (Line1,"50", colorPink, styleThick | styleNoLabel);

Plot (Line2,"30", ColorRGB(255,0,255), styleDashed | styleNoLabel);

Plot (Line3, "70", ColorRGB(255,0,255), styleDashed | styleNoLabel);

_SECTION_END();

👉Tải tại đây

https://drive.google.com/file/d/19TCGYZU2AqYv9Gnmo410KxKpjiEkUukN/view?usp=drive_link

Cách sử dụng AFL  cho Amibroker  

Tải xuống tệp Amibroker AFL. 

Bây giờ hãy sao chép tệp afl và dán vào vị trí cài Amibroker  

D:\A KY PC\Win\Amibroker\Formulas\VIP free


1 comment: