Setup de Wall Street 01
Setup de Wall Street 01
Setup de Wall Street 01
if ((close > close[2]) and (close[2] > open[2]) and (close[4] > close[8])) then
plot_shape(1,
'Bull_OTC',
shape_style.triangleup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"",
"#fcfc03"
)
else
if ((close < close[2]) and (close[2] < open[2]) and (close[4] < close[8])) then
plot_shape(1,
'Bear_OTC',
shape_style.triangledown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"",
"#fcfc03"
)
end
end
input_group {
"Maxima",
level_1_color = input { default = "Red", type = input.color },
level_1_width = input { default = 4, type = input.line_width }
}
input_group {
"Minima",
level_2_color = input { default = "Green", type = input.color },
level_2_width = input { default = 4, type = input.line_width }
}
c1 = candle.high
c2 = candle.low
end
local methods = { h4 }
if sec then
local method = methods [method_id]
method (sec)
end
instrument {
name = 'Setup de Wall Street 01',
short_name = '@otraderdewallstreet',
icon = 'indicators:ADX',
overlay = true
}
input_group {
"Area Up and Down",
colorAreaUp = input { default = "rgba(220, 20, 60, 0.3)", type = input.color },
input_group {
"Ma Fast Line",
colorFast = input { default = "white", type = input.color },
widthFast = input { default = 1, type = input.line_width},
visibleFast = input { default = true, type = input.plot_visibility }
}
input_group {
"Ma Slow Line",
colorSlow = input { default = "white", type = input.color },
widthSlow = input { default = 2, type = input.line_width},
visibleSlow = input { default = false, type = input.plot_visibility }
}
input_group {
"Buy Klen",
backgroundcolorbuy = input { default = "green", type = input.color },
visibleBuy2 = input { default = true, type = input.plot_visibility }
}
input_group {
"Sell Klen",
backgroundcolorsell = 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])
emaFast = avgFast(titleFast,MaFast_period)
emaSlow = avgSlow(titleSlow,MaSlow_period)
macd = emaFast - emaSlow
signal = avgSignal(macd,Signal_period)
--plot(macd,"macd", "Green", 1)
--plot(signal,"signal", "Red", 1)
--rect {
--first = 0,
--second = histo,
--color = histo >= histo[1] and "Green" or "Red",
--width = 0.5
--}
MaTrend0 = avgTrend(titleTrend,MaTrend_period)
MaTrend1 = MaTrend0[1]
end
end
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="white",type=input.color},width=input{defau
lt=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)
if Exibir_tracamento == 1 then
plot(emaa, "SMA", ema_color)
plot(upper_band, "UPPER_BAND", bbsup_color)
plot(lower_band, "LOWER_BAND", bbinf_color)
end