Professional Documents
Culture Documents
BB and CCI
BB and CCI
BB and CCI
input_group {
"Buy",
buycolor = input { default = "Cyan", type = input.color },
input_group {
"Sell",
sellcolor = input { default = "Magenta", type = input.color },
input_group {
"REVERSAL SIGNAL",
visible = input{default = true, type = input.plot_visibility}
}
input_group {
"FOLLOW TREND SIGNAL",
visible1 = input{default = true, type = input.plot_visibility}
}
input_group{
"front.newind.adx.fill",
fill_color = input{default = rgba(75,255,181, 0.08), type = input.color},
fill_visible = input{default = true, type = input.plot_visibility}
--Define Strategy
--BB Band
bb_period = input(14,"BB Period",input.integer,1,1000,1)
Offset_Value = input(2,"Offset_Value",input.double,0,10,0.1)
if fill_visible then
fill{first = upperband, second = lowerband, color = fill_color}
end
--CCI
CCI_period = input(14,"CCI Period",input.integer,1,1000,1)
OVB_OVS = input(200,"OVB OVS",input.integer,1,1000,1)
mycci = cci(close, CCI_period)
--plot Signal
if visible1 then
plot_shape((buycondition1 == true), "BUY", shape_style.arrowup,
shape_size.huge, buycolor, shape_location.belowbar, 0, "BUY1", buycolor )
plot_shape((sellcondition1 == true),"SELL", shape_style.arrowdown,
shape_size.huge, sellcolor, shape_location.abovebar, 0, "SELL1", sellcolor )
end