Professional Documents
Culture Documents
0/
// © RicardoSantos
//@version=4
// Initiate bars:
//----------------------------------------------------------------------------------
// Required functions:
for _i = 0 to max(_length-1, 0)
if _isSourceOver
_h_value := _source[_i]
_h_bar := _bars[_i]
[_h_value, _h_bar]
for _i = 0 to max(_length-1, 0)
if _isSourceUnder
_l_value := _source[_i]
_l_bar := _bars[_i]
[_l_value, _l_bar]
line.delete(id=_li)
_li := line.new(x1=_x1-1, y1=_y1 - _r, x2=_x1, y2=_y1, xloc=xloc.bar_index, extend=extend.right, color=_color, style=line.style_dashed,
width=1)
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// Inputs:
int length = input(defval=100, title='Channel length:', minval=1)
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
if change(mid) != 0
r := atr(length)
//----------------------------------------------------------------------------------
// lines variables:
if show_fan_from_high
if is_new_low
if is_new_high
if show_price_levels_from_high
if is_new_low
if show_price_levels_from_low
if is_new_high