Retaliação 1
Retaliação 1
Retaliação 1
name = 'MORTALHA',
short_name = 'super',
overlay =true
}
input_group {
"Compra",
colorBuy = input { default = "blue", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}
input_group {
"Venda",
colorSell = input { default = "yellow", 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),
"30",
shape_style.arrowup,
shape_size.large,
colorBuy,
shape_location.belowbar,
-1,
"PROXIMA COMPRAR",
"blue"
)
plot_shape(
(sellCondition),
"30",
shape_style.arrowdown,
shape_size.large,
colorSell,
shape_location.abovebar,
-1,
"PROXIMA VENDER",
"YELLOW"
)
instrument{name="RETALIAÇÃO 1 MORTALHA",icon='https://www.google.com/url?
sa=i&url=https%3A%2F%2Fmyicons.co
%2F&psig=AOvVaw3UTgfDo_l_YxT4qVtiaoE7&ust=1638095965421000&source=images&cd=vfe&ved
=0CAsQjRxqFwoTCKCli5WtuPQCFQAAAAAdAAAAABAD',overlay=true}
if not get_value(c)then
return b end;
local d=high<=c and high[1]<=c and high[3]<=c and high[4]<=c;
b:set(iff(d,c,b[1]))return b end;
local function e()local b=make_series()local c=low[2]if not get_value(c)then return
b end;
local d=low>=c and low[1]>=c and low[3]>=c and low[4]>=c;
b:set(iff(d,c,b[1]))return b end;
input_group{"Color",color=input{default="LIME",type=input.color},width=input{defaul
t=1,type=input.line_width}}h=a()l=e()hline(h,"High",color,high_width)hline(l,"Low",
color,width)hline(highest(10)[1],"HH10",color,1)hline(lowest(10)
[1],"LL10",color,1)hline(highest(30)[1],"HH30",color,1)hline(lowest(30)
[1],"LL30",color,1)hline(highest(60)[1],"HH60",color,1)hline(lowest(60)
[1],"LL60",color,1)hline(highest(100)[1],"HH100",color,1)hline(lowest(100)
[1],"LL100",color,1)hline(highest(150)[1],"HH150",color,1)hline(lowest(150)
[1],"LL150",color,1)hline(highest(200)[1],"HH200",color,1)hline(lowest(200)
[1],"LL200",color,1)
instrument {
name = 'RETALIAÇÃO 1 MORTALHA',
short_name = 'SMA-ENG',
icon = 'indicators:BB',
overlay = true
}
input_group {
"Ma Slow Line",
colorSlow = input { default = "purple", type = input.color },
widthSlow = input { default = 2, type = input.line_width},
visibleSlow = input { default = true, type = input.plot_visibility }
}
input_group {
"Buy Outside Bar",
colorBuy2 = input { default = "lime", type = input.color },
visibleBuy2 = input { default = true, type = input.plot_visibility }
}
input_group {
"Sell Outside Bar",
colorSell2 = input { default = "red", type = input.color },
visibleSell2 = input { default = true, type = input.plot_visibility }
}
candle_time = {"1s", "5s", "10s", "15s", "30s", "1m", "2m", "5m", "10m", "15m",
"30m", "1H", "2H", "4H", "8H", "12H", "1D", "1W", "1M", "1Y"}
candle_time_res = input(6,"Candle check
resolution",input.string_selection,candle_time)
filter_source = {"1s", "5s", "10s", "15s", "30s", "1m", "2m", "5m", "10m", "15m",
"30m", "1H", "2H", "4H", "8H", "12H", "1D", "1W", "1M", "1Y"}
filter_pa_index = input(8,"Candle check
resolution",input.string_selection,filter_source)
--print(filter_source[filter_pa_index])
MaTrend0 = avgTrend(titleTrend,MaTrend_period)
MaTrend1 = MaTrend0[1]
end
end
input_group {
"Buy Arrow",
colorBuy = input { default = "lime", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}
input_group {
"Sell Arrow",
colorSell = input { default = "red", type = input.color },
visibleSell = input { default = true, type = input.plot_visibility }
}
candle_time = {"1s", "5s", "10s", "15s", "30s", "1m", "2m", "5m", "10m", "15m",
"30m", "1H", "2H", "4H", "8H", "12H", "1D", "1W", "1M", "1Y"}
candle_time_res = input(6,"Candle check
resolution",input.string_selection,candle_time)
MaTrend0 = avgTrend(titleTrend,MaTrend_period)
Matrend1 = MaTrend0[1]
plot_shape((close > open and close[1] < open[1] and close > Mafast0 and close >
MaSlow0 and close > MaTrend0 and close > open[1] and open <= close[1] and
abs(close-open) > abs(close[1]-open[1])),
"CALL",
shape_style.triangleup,
shape_size.tiny,
colorBuy,
shape_location.belowbar,
0,
"",
colorBuy
)
plot_shape((close < open and close[1] > open[1] and close < Mafast0 and close <
MaSlow0 and close < MaTrend0 and close < open[1] and open >= close[1] and
abs(close-open) > abs(close[1]-open[1])),
"PUT",
shape_style.triangledown,
shape_size.tiny,
colorSell,
shape_location.abovebar,
0,
"",
colorSell
)
end