Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

instrument{name="Estrategia Berman",

short_name="EBerman",
icon="https://yt3.ggpht.com/ytc/
AKedOLTzu7tfbxr8F8VuWtCnvNYeywhN1zqpo3xVw8EmsW8=s900-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= "blue", type= input.color}}


input_group {"BANDA SUPERIOR", bbsup_color= input{ default= "red", type=
input.color}}
input_group {"BANDA INFERIOR", bbinf_color= input{ default= "yelloW", 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}}

sec= security(current_ticker_id, "5m")

if sec and sec.open_time == open_time then

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)

end

You might also like