LazyBear

Indicator: Ulcer Index

1957 5 99
Ulcer Index (UI) is a method for measuring investment risk that addresses the real concerns of investors, unlike the widely used standard deviation of return ( SD             ). It is a measure of the depth and duration of drawdowns in prices from earlier highs. In other words, it is a measure of volatility , but only volatility in the downward direction, i.e. the amount of drawdown or retracement occurring over a period.

The greater a drawdown in value, and the longer it takes to recover to earlier highs, the higher the UI. It measures the "severity" of drawdowns.

More info: http://en.wikipedia.org/wiki/Ulcer_index
Remove from Favorite Scripts Add to Favorite Scripts
// @author LazyBear
// Ulcer Index 
// @credits http://www.tangotools.com/ui/ui.htm

study(title = "Ulcer Index [LazyBear]", shorttitle="UlcerIndex_LB")
length=input(10)
cutoff=input(5)
hcl=highest(close,length)
r=100.0*((close-hcl)/hcl)
ui=sqrt(sum(pow(r,2), length)/length)
sl=plot(ui, color=ui>cutoff ? red : aqua)
hline(cutoff, color=red)
bl=plot(cutoff)
fill(sl,bl,color=silver)

LazyBear created a custom version of the Ulcer Index for me with background color alerts when the trend direction changes, based on my input.

http://pastebin.com/Cenrft3z

Thanks, LazyBear!
Reply
QuantitativeExhaustion QuantitativeExhaustion
How do you combine two (or more) lengths for an average?

Want to get a Ulcer indicator to look like RSI
+3 Reply
LazyBear PRO QuantitativeExhaustion
Code:
http://pastebin.com/kKEeEr9V

Allows 2 lengths and 2 cutoffs to be configured.

Sample:
snapshot
+2 Reply
IV is probably the best to benchmark. Ulcer is one of the best volatility price indicators out there for measuring... attempting to find perfect Overbought/Oversold Volatility Indicator(s).
snapshot
+2 Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out