Script Pro @richard
Script Pro @richard
Script Pro @richard
input_group {
"Compra",
comprar_color = input {default = "#b811f0", type = input.color}
}
input_group {
"Contagem de FIBOS",
emaa_per = input {default = "15", type = input.string}
}
input_group {
"Precisao do Time: (1/10)",
doch_time = input {default = "10", type = input.string}
}
input_group {
"Mercado OTC",
time_otc = input {default = "nao", type = input.string}
}
input_group {
"Velas Volatil TimeFrame",
frame_otc = input {default = "m1", type = input.string}
}
input_group {
"Nivel de Precisao",
emab_per = input {default = "100", type = input.string}
}
input_group {
"MR",
emac_per = input {default = "5", type = input.string}
}
input_group {
"ML",
emad_per = input {default = "15", type = input.string}
}
input_group {
"Venda",
vender_color = input {default = "#fcf805", type = input.color}
}
input_group {
"Velas",
positivo = input { default = "#00ff55",type = input.color },
neutro = input { default = "#000000", type = input.color },
negativo = input { default = "#f70202", type = input.color },
}
--PARAMETROS
EMAA = ema(open,emaa_per)
EMAB = ema(open,emab_per)
EMAC = ema(ohlc4,emac_per)
EMAD = ema(ohlc4,emad_per)
timestamp = (sec)
--CALCULOS
TA = ((close > close[1]) and (close > EMAA) and (EMAA > EMAA[1]))
TB = ((close < close[1]) and (close < EMAA) and (EMAA < EMAA[1]))
TI = ((open < close[1]) and (open < EMAA) and (EMAD < EMAA[1]))
ENC = ((EMAC[1] < EMAD[1]) and (EMAC > EMAD))
ENV = ((EMAC[1] > EMAD[1]) and (EMAC < EMAD))
local bar_color
plot_shape(1,
'X',
shape_style.xcross,
shape_size.huge,
can_color,
shape_location.top,
0,
print ("Resp"),
"A"
)
else
bar_color = neutro
end
end
if ((close[1] < open[1]) and (close > open) and (close > high[1]) and close[2]
>= open) then
plot_shape(1,
'Bull_Engulfing',
shape_style.flag,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"Analise",
print ("Analise"),
"A"
)
else
if ((close[1] > open[1]) and (close < open) and (close < low[1]) and
close[2] <= open) then
plot_shape(1,
'Bear_Engulfing',
shape_style.flag,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"Analise",
print ("Analise"),
"A"
)
end
end
if ((close > close[1]) and (close[1] > open[2]) and (close[3] > close[2])) then
plot_shape(1,
'Bull_UP',
shape_style.arrowup,
shape_size.huge,
call_color,
shape_location.belowbar,
0,
"Call - Pro",
"#ffffff"
)
else
if ((close < close[1]) and (close[1] < open[2]) and (close[3] < close[2]))
then
plot_shape(1,
'Bear_DOWN',
shape_style.arrowdown,
shape_size.huge,
put_color,
shape_location.abovebar,
0,
"Put - Pro",
"#fcfc03"
)
end
end
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 }
}
if sec then
local method = methods [method_id]
method (sec)
end
percentage = input (3, "Porcentagem", input.double, 0.01, 100, 1.0) / 100
period = 2