Заготовка для индикатора HVR_IB_LR4 регулируются периоды для расчета волатильноси и порог HVR...
#HVR_IB_LR4 #by GrOwEx #21.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]); #Mean 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; #Set 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); #====================
что будет показывать?
historical volatility ratio
и как он поможет в торговле?
http://www.rpg-club.com/x1000m?h=forum.esigna...lity-Ratio
#HVR_IB_LR4
Янв 21 2013, 23:22#by GrOwEx
#21.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]);
#Mean 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;
#Set 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);
#====================
что будет показывать?
Янв 22 2013, 16:57historical volatility ratio
Янв 22 2013, 19:59и как он поможет в торговле?
Янв 23 2013, 10:07http://www.rpg-club.com/x1000m?h=forum.esigna...lity-Ratio
Янв 23 2013, 12:50