Category: Indicator > Miscellaneous
The Ulcer Index is a measure of the stress level related to an investment’s market behavior. It uses price retracements to measure the "stressfulness." This is done by comparing recent price action with past price action.
As stated by Peter Martin and Byron McCann, "the higher an investment's Ulcer Index, the more likely investing in it will cause ulcers or sleepless nights."
Price - Specifies the price used to calculate the Ulcer Index
Length - Number of bars of data to be included in the calculation of the Ulcer Index
SafeLevel - The level above which the Ulcer Index is considered to be high
INPUTS: PRICE(CLOSE), LENGTH(20), SAFELEVEL(5);
UI = ULCERINDEX(PRICE, LENGTH);
IF PLOT1 > PLOT2 THEN
ALERT("THE SAFE LEVEL HAS BEEN EXCEEDED.");