8446 visitas
Request for SpreadEagle71:
Stop Hunt Levels adapted from:
http://www.investopedia.com/articles/for...
configuration:
smoothing: smooths/average the source higher value will remove spikes but delay the speed of adjusting
source: source to compare crossing lines.
Rounding Value: value space of the grid.
Entry Window Size: Space for entrys.
Stop Hunt Levels adapted from:
http://www.investopedia.com/articles/for...
configuration:
smoothing: smooths/average the source higher value will remove spikes but delay the speed of adjusting
source: source to compare crossing lines.
Rounding Value: value space of the grid.
Entry Window Size: Space for entrys.
study(title='[RS]Stop Hunt Levels V0', overlay=true) smoothing = input(title='Smoothing interval:', type=integer, defval=1) src = ema(input(title='Source', type=source, defval=close), smoothing) r_value = input(title='Rounding Value:', type=float, defval=0.0100) w_size = input(title='Entry window size:', type=float, defval=0.0010) fraction_top = ceil(src / r_value) fraction_bot = floor(src / r_value) top = r_value*fraction_top bot = r_value*fraction_bot h_top = top + w_size l_top = top - w_size h_bot = bot + w_size l_bot = bot - w_size fcolor = top != top[1] plot(title='Upper Range:', series=top, color=fcolor?na:black, linewidth=2) plot(title='Lower Range:', series=bot, color=fcolor?na:black, linewidth=2) pht = plot(title='Upper Range Buy Line:', series=h_top, color=fcolor?na:lime, linewidth=2) plt = plot(title='Upper Range Sell Line:', series=l_top, color=fcolor?na:red, linewidth=2) phb = plot(title='Lower Range Buy Line:', series=h_bot, color=fcolor?na:lime, linewidth=2) plb = plot(title='Lower Range Sell Line', series=l_bot, color=fcolor?na:red, linewidth=2) fill(pht, plt, color=gray, transp=75) fill(phb, plb, color=gray, transp=75)
Comentarios