You are on page 1of 2

instrument {overlay = true,

name = 'Engulfing Pattern V5',


short_name = 'ENGF',
icon="indicators:AO"}

include_gap = input (2, "Incluir Gap en cuerpo?", input.string_selection, {"Con


Gap","Sin Gap"} )
body_cross_wick = input (1, "Cuerpo debe cruzar Sombra", input.string_selection,
{"Si","No"} )

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 } }

vlavrde = close[1] < open[1]


vlarjo = close[1] > open[1]
acvrde = close > open
acrjo = close < open

if body_cross_wick == 1 then
eng_bodyup = close > high[1]
eng_bodudn = close < low[1]
else
if body_cross_wick == 2 then
eng_bodyup = close > open[1]
eng_bodudn = close < open[1]
end
end

if (include_gap == 1) then

plot_shape((vlavrde and acvrde and eng_bodyup),


'Bull_Engulfing',
shape_style.arrowup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"Eng",
call_color )

plot_shape((vlarjo and acrjo and eng_bodudn),


'Bear_Engulfing',
shape_style.arrowdown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"Eng",
put_color)

else
if (include_gap == 2) then

plot_shape(vlavrde and acvrde and eng_bodyup and (close[1] >= open),


'Bull_Engulfing',
shape_style.arrowup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"Eng",
call_color)

plot_shape(vlarjo and acrjo and eng_bodudn and (close[1] <= open),


'Bear_Engulfing',
shape_style.arrowdown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"Eng",
put_color)
end
end

You might also like