thinkorswim

Заготовка для индикатора HVR_IB_LR4 регулируются периоды для расчета волатильноси и порог HVR...


Проголосовало: 0

Янв 21 2013, 23:22


Комментарии
growex


GrOwEx
.01.2013
input Price = close;
declare upper;
input Period = 100;
def range = high - low;
input period2 = 6;
input hvrlevel = 50;

#====================
# Log Return calculation;
def log_return = log(Price / Price[1]);
return calculation;
def mean_return = (1 / Period) * sum(log_return, Period);
# Standart Deviation (Volatility)
def Volatility = Sqrt((1 / (Period - 1)) * sum(Sqr(log_return - mean_return), Period));
def Volatility2 = Sqrt((1 / (Period2 - 1)) * sum(Sqr(log_return - mean_return), Period2));
def hvr = (volatility2/volatility)*100;
condition here
plot s = range < range[1] and range < range[2] and range < range[3] and high < high[1] and low > low[1] and hvr >= hvrlevel;#Set condition here
s.setPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
#====================

Янв 21 2013, 23:22
Maksimillion

что будет показывать?

Янв 22 2013, 16:57
growex

historical volatility ratio

Янв 22 2013, 19:59
Maksimillion

и как он поможет в торговле?

Янв 23 2013, 10:07
Наш канал