LazyBear

Indicator: Ulcer Index

2691 5 146
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 QuantitativeExhaustion
Code:
http://pastebin.com/kKEeEr9V

Allows 2 lengths and 2 cutoffs to be configured.

Sample:
+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).
+2 Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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