Bulb Indicator
Bulb Indicator
rsiSource = close
rsiLength = 13
rsiOverbought = 70
rsiOvesold = 30
var laststate = 0
var hh = low
var ll = high
osLabelText() =>
if(last_actual_label_ll_price < low)
"buy"
else
"buy"
createOverBoughtLabel(isIt) =>
if(isIt)
label.new(x=bar_index, y=na ,yloc=yloc.price, style=label.style_label_down,
color=#F70700, size=size.normal, text=obLabelText(), textcolor = color.white)
else
label.new(x=bar_index, y=na ,yloc=yloc.price, style=label.style_label_up,
color=#22E139, size=size.normal, text=osLabelText(), textcolor = color.white)
moveOversoldLabel() =>
label.set_x(labelll, bar_index)
label.set_y(labelll, low)
label.set_text(labelll, osLabelText())
line.set_x1(line_down, bar_index)
line.set_y1(line_down, low)
moveOverBoughtLabel() =>
label.set_x(labelhh, bar_index)
label.set_y(labelhh, high)
label.set_text(labelhh, obLabelText())
line.set_x1(line_up, bar_index)
line.set_y1(line_up, high)