Professional Documents
Culture Documents
input_group {
"Maxima",
level_1_color = input { default = "red", type = input.color },
level_1_width = input { default = 2, type = input.line_width }
}
input_group {
"Minima",
level_2_color = input { default = "green", type = input.color },
level_2_width = input { default = 2, type = input.line_width }
}
local function m15(candle)
c1 = candle.high
c2 = candle.low
end
end
input_group {
"Compra",
colorBuy = input { default = "green", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}
input_group {
"Venda",
colorSell = input { default = "red", type = input.color },
visibleSell = input { default = true, type = input.plot_visibility }
}
buyCondition = conditional(buffer1 > buffer2 and buffer1[1] < buffer2[1] and not
(buffer1 < buffer2 and buffer1[1] > buffer2[1]))
buyCondition = conditional(buffer1 > buffer2 and buffer1[1] < buffer2[1])
sellCondition = conditional(buffer1 < buffer2 and buffer1[1] > buffer2[1] and not
(buffer1 > buffer2 and buffer1[1] < buffer2[1]))
sellCondition = conditional(buffer1 < buffer2 and buffer1[1] > buffer2[1] )
plot_shape(
(buyCondition),
"ENTRA",
shape_style.triangleup,
shape_size.huge,
colorBuy,
shape_location.belowbar,
-1,
"ENTRA",
"yellow"
)
plot_shape(
(sellCondition),
"ENTRA",
shape_style.triangledown,
shape_size.huge,
colorSell,
shape_location.abovebar,
-1,
"ENTRA",
"yellow"
)