You are on page 1of 1

instrument{name="Estrategia Berman",

short_name="EBerman",
icon="https://yt3.ggpht.com/ytc/AKedOLTzu7tfbxr8F8VuWtCnvNYeywhN1zqpo3xVw8EmsW8=s90
0-c-k-c0x00ffffff-no-rj", overlay=true}

Exibir_tracamento= input(1, "Deseja exibir o tracamento?", input.string_selection,


{"SIM", "NAO"})

input_group {"EMA", ema_color= input {default= '#10A3C4', type= input.color}}


input_group {"BANDA SUPERIOR", bbsup_color= input{ default= "#DA4933", type=
input.color}}
input_group {"BANDA INFERIOR", bbinf_color= input{ default= "#22D34F", type=
input.color}}
input_group {"CALL", call_color= input{ default= "green", type= input.color}}
input_group {"PUT", put_color= input{ default= "red", type= input.color}}

smaa= sma(close, '20')


upper_band= smaa + (stdev(close,20) * 2.5)
lower_band= smaa - (stdev(close,20) * 2.5)
emaa= ema(close, '100')

if Exibir_tracamento == 1 then
plot(emaa, "SMA", ema_color)
plot(upper_band, "UPPER_BAND", bbsup_color)
plot(lower_band, "LOWER_BAND", bbinf_color)
end

plot_shape((high >= upper_band and emaa > upper_band),


"PUT",
shape_style.arrowdown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"PUT",
put_color)

plot_shape((low <= lower_band and emaa < lower_band),


"CALL",
shape_style.arrowup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"CALL",
call_color)

You might also like