Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
Find Out More Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Ulcer Index for Amibroker (AFL)

Rating:
2 / 5 (Votes 6)
Tags:
oscillator, amibroker

The ulcer index is a stock market risk measure or technical analysis indicator devised by Peter Martin

https://en.wikipedia.org/wiki/Ulcer_index

code converted from

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

credit : LazyBear.

Indicator / Formula

Copy & Paste Friendly
_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();

1 comments

1. honijon

it doesnt work

Leave Comment

Please login here to leave a comment.

Back