You are on page 1of 2

-----MODIFICADO POR---@JOSEE_TRADER----------------

instrument {
name = 'LIMITE DO PREÇO',
short_name = 'SMA-ENG',
icon = 'https://www.google.com/imgres?imgurl=https%3A%2F%2Fyt3.ggpht.com
%2FPiZU7Fvv3F8LyGrToM8ATVvG2at00b8DpGjTSf1EKUxFwkhSnCuEqgGsad0kYWxSE1eK3bOYEeM
%3Ds900-c-k-c0x00ffffff-no-rj&imgrefurl=https%3A%2F%2Fwww.youtube.com%2Fchannel
%2FUCJWt1lVVxpYPC8txs28mhmg&tbnid=eD2nGmxR49FRpM&vet=12ahUKEwiRx_HiktD0AhXDBrkGHT_f
Bo0QMygBegQIARB6..i&docid=scWF6WVPzh2efM&w=900&h=900&q=jose
%20trader&ved=2ahUKEwiRx_HiktD0AhXDBrkGHT_fBo0QMygBegQIARB6',
overlay = true
}
Exibir_tracamento= input(1, "Deseja exibir o tracamento?", input.string_selection,
{"SIM", "NAO"})

input_group {"EMA", ema_color= input {default= '#white', 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

input_group {
"MAXIMA",
comprar_color = input {default = "light blue", type = input.color}
}

input_group {
"MAXIMA",
vender_color = input {default = "pink", type = input.color}
}

sec = security (current_ticker_id, "1m")

if sec and sec.open_time == open_time then

base = sma(open, '10')


high_band = base + (stdev(open, 10) * 2)
low_band = base - (stdev(open, 10) * 2)
media = sma(close, '20')
up_band = media + (stdev(close, 20) * 2.5)
down_band = media - (stdev(close, 20) * 2.5)
expo = ema(close,'100')

--IMPULSOS

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

"put",
shape_style.arrowdown,
shape_size.huge,
vender_color,
shape_location.abovebar,
0,
"MAXIMA",
vender_color)

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


"call",
shape_style.arrowup,
shape_size.huge,
comprar_color,
shape_location.belowbar,
0,
"MAXIMA",
comprar_color)

-- RETRAES

plot_shape((open < up_band and high > up_band and close <= up_band and expo >
up_band),
"VENDER1",
shape_style.arrowdown,
shape_size.huge,
vender_color,
shape_location.abovebar,
0,
"MAXIMA",
vender_color)

plot_shape((open > down_band and low < down_band and close >= down_band and
expo < down_band),
"COMPRAR1",
shape_style.arrowup,
shape_size.huge,
comprar_color,
shape_location.belowbar,
0,
"MAXIMA",
comprar_color)

end

You might also like