You are on page 1of 3

instrument{name="Padroes de velas - @marcelo_lcampos",

short_name="Estrategia 2 Confluências ",


icon="", overlay=true}

input_group {"CHAVE KEY",key_par = input {default = "Marcelo_lcampos", type =


input.string}}
show_engulfing =input (1, "Mostrar Engolfo:", input.string_selection, {"Sim","Nao"}
)
include_gap = input (2, "Incluir gap no Engolfo:", input.string_selection,
{"Sim","Nao"} )
show_hammer =input (1, "Mostrar Martelo (Bear/Bull):", input.string_selection,
{"Sim","Nao"} )
show_marubozu =input (1, "Mostrar Marubozu:", input.string_selection, {"Sim","Nao"}
)

input_group { "Marubozu - UP COLOR", mbup_color = input { default="#ADFF2F", type =


input.color } }
input_group { "Marubozu - DOWN COLOR", mbdn_color = input { default="#ADFF2F", type
= input.color } }

input_group { "ENG - UP COLOR", call_color = input { default="#00FFFF", type =


input.color } }
input_group { "ENG - DOWN COLOR", put_color = input { default="#FF00FF", type =
input.color } }

input_group { "Hammer", hmr_color = input { default="#FFD700", type = input.color }


}
input_group { "Inverted Hammer", ihmr_color = input { default="#FFD700", type =
input.color } }

input_group { "Hanging Man", hgm_color = input { default="red", type =


input.color } }
input_group { "Shotting Star", shtr_color = input { default="red", type =
input.color } }

eng_crossup_wick = close > high[1]


eng_crossdn_wick = close < low[1]

if (include_gap == 1 and show_engulfing == 1) then

plot_shape((close[1] < open[1]) and (close > open) and (close > high[1]),
'Bull_Engulfing',
shape_style.arrowup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"Engolfo de Alta",
call_color )

plot_shape((close[1] > open[1]) and (close < open) and (close < low[1]),
'Bear_Engulfing',
shape_style.arrowdown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"Engolfo de Baixa",
put_color)

else
if (include_gap == 2 and show_engulfing == 1) then

plot_shape((close[1] < open[1]) and (close > open) and (close > high[1])
and (close[1] >= open),
'Bull_Engulfing',
shape_style.arrowup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"Engolfo",
call_color)

plot_shape((close[1] > open[1]) and (close < open) and (close < low[1]) and
(close[1] <= open),
'Bear_Engulfing',
shape_style.arrowdown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"Engolfo",
put_color)
end
end

if (show_hammer == 1) then

plot_shape((open < close and close > high - ((high - low)*0.05) and (abs(close
- open)) < ((high - low)*0.4) and (abs(close - open)) > ((high - low)*0.1)),
'Hammer',
shape_style.arrowup,
shape_size.huge,
hmr_color,
shape_location.belowbar,
0,
"Martelo",
hmr_color )

plot_shape((open < close and open < low + ((high - low)*0.05) and (abs(close -
open)) < ((high - low)*0.4) and (abs(close - open)) > ((high - low)*0.1)),
'Inverted Hammer',
shape_style.arrowup,
shape_size.huge,
ihmr_color,
shape_location.belowbar,
0,
"Martelo Inv.",
ihmr_color)

plot_shape((open > close and open > high - ((high - low)*0.05) and (abs(close -
open)) < ((high - low)*0.4) and (abs(close - open)) > ((high - low)*0.1)),
'Hanging Man',
shape_style.arrowdown,
shape_size.huge,
hgm_color,
shape_location.abovebar,
0,
"Enforcado",
hgm_color)

plot_shape((open > close and close < low + ((high - low)*0.05) and (abs(close -
open)) < ((high - low)*0.4) and (abs(close - open)) > ((high - low)*0.1)),
'Shotting Star',
shape_style.arrowdown,
shape_size.huge,
shtr_color,
shape_location.abovebar,
0,
"Shotting Star",
shtr_color)

end

if (show_marubozu == 1) then

plot_shape(((open < close) and ((close > high) - ((high - low)*0.02)) and
((open < low) + ((high - low)*0.02)) and ((abs(close - open)) > ((high -
low)*0.95))),
'Marobozu UP',
shape_style.arrowup,
shape_size.huge,
mbup_color,
shape_location.belowbar,
0,
"Marubozu",
mbup_color)

plot_shape(((open > close) and ((close < high) + ((high - low)*0.02)) and
((open > low) - ((high - low)*0.02)) and ((abs(close - open)) > ((high -
low)*0.95))),
'Marubozu Down',
shape_style.arrowdown,
shape_size.huge,
mbdn_color,
shape_location.abovebar,
0,
"Marubozu",
mbdn_color)

end

You might also like