You are on page 1of 1

instrument { name = "SHEGO 1.

0", icon="indicator", overlay = true }

input_group {
"COMPRA CTMR",
comprar_color = input {default = "green", type = input.color}
}

input_group {
"VENDE MRD",
vender_color = input {default = "red", type = input.color}
}

sec = security (current_ticker_id, "1m")

if sec and sec.open_time == open_time then

base = sma(open, '30')


high_band = base + (stdev(open, 30) * 2)
low_band = base - (stdev(open, 30) * 2)
media = sma(open, '15')
up_band = media + (stdev(close, 15) * 2)
down_band = media - (stdev(close, 15) * 2)

--REVERSAO

hline(high_band, "HH10", "red", 1)


hline(low_band, "HH20", "green", 1)
hline(up_band, "HH30", "red", 1)
hline(down_band, "HH40", "green", 1)

plot_shape((open > high_band and close < high_band),


"SHEGO VENDE",
shape_style.arrowdown,
shape_size.huge,
vender_color,
shape_location.abovebar,
0,
"SHEGO VENDE",
vender_color)

plot_shape((open < low_band and close > low_band),


"SHEGO COMPRA",
shape_style.arrowup,
shape_size.huge,
comprar_color,
shape_location.belowbar,
0,
"SHEGO COMPRA",
comprar_color)
end

You might also like