InvestorsHub Logo
Followers 43
Posts 22774
Boards Moderated 2
Alias Born 10/16/2008

Re: desertcynlite post# 3043

Sunday, 09/29/2013 7:33:39 PM

Sunday, September 29, 2013 7:33:39 PM

Post# of 3631
??, I just reloaded and renamed and it worked

==============================================================

declare upper;
input period = AggregationPeriod.DAY ;
#hint period: time period to use for aggregating implied volatility.
input length =252 ;
#hint length: #bars to use in implied volatility calculation.
def ivGapHi = if isnan(imp_volatility(period=period)) then 99999999999 else imp_volatility(period=period);
def ivGapLo = if isnan(imp_volatility(period=period)) then -99999999999 else imp_volatility(period=period);
def periodHigh = highest( ivGapLo,length=length);
def periodLow = lowest( ivGapHi, length=length);
def ivRange = periodHigh - periodLow ;
def ivp = round( 100*(imp_volatility(period=period) - periodLow)/ivRange, 0);
AddLabel(1, Concat("IV%: ", ivp), color = CreateColor(255-(ivp*2.55),ivp*2.55,0));

Disaster is Only a Keystroke Away!

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.