Thursday, October 10, 2024

AFL CODE-ULCER INDEX

 


_SECTION_BEGIN(" Ulcer Index ");

 

//https://www.tradingview.com/script/QuqgdJgF-Indicator-Ulcer-Index/

// Credits : LazyBear - TradingView.

 

length = Param( "Length", 10, 1, 5000, 1 );

cutoff = Param( "Cut off", 5, 0, 100, 0.1 );

 

hcl=hhv(close,length);

r=100.0*((close-hcl)/hcl);

ui=sqrt(sum(r^2, length)/length);

col=IIf(ui>cutoff,colorRed,colorAqua);

Plot( ui, "Ulcer Index ("+length+","+cutoff+") ", col);

Plotgrid(cutoff,colorBlack,9, 1);

 

_SECTION_END();

👉Tải tại đây

https://drive.google.com/file/d/1j84E2a8pfXkJ2iXfs-6_zNFLtuy51KiH/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: