Script
Script
name = 'BU-MA',
short_name = 'super',
overlay = true
}
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),
"go",
shape_style.arrowup,
shape_size.normal,
colorBuy,
shape_location.belowbar,
-1,
"",
"green"
)
plot_shape(
(sellCondition),
"go",
shape_style.arrowdown,
shape_size.normal,
colorSell,
shape_location.abovebar,
-1,
"",
"red"
)