EMA CDC LuaScript
EMA CDC LuaScript
input_group {
"Ma Fast Line",
colorFast = input { default = "#ff56e8", type = input.color },
widthFast = input { default = 1, type = input.line_width},
visibleFast = input { default = false, type = input.plot_visibility }
}
input_group {
"Ma Slow Line",
colorSlow = input { default = "#2d2af7", type = input.color },
widthSlow = input { default = 2, type = input.line_width},
visibleSlow = input { default = false, type = input.plot_visibility }
}
input_group {
"Ma Trend Line",
colorTrend = input { default = "#f74200", type = input.color },
widthTrend = input { default = 3, type = input.line_width},
visibleTrend = input { default = false, type = input.plot_visibility }
}
input_group {
"StochRSI cross up OVS (no filter)",
colorBuy = input { default = "LightGreen", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}
input_group {
"StochRSI cross down OVB (no filter)",
colorSell = input { default = "Salmon", type = input.color },
visibleSell = input { default = true, type = input.plot_visibility }
}
input_group {
"StochRSI signal cross up Trend filter",
colorBuy1 = input { default = "rgba(50, 205, 50,0.8)", type = input.color },
visibleBuy1 = input { default = true, type = input.plot_visibility }
}
input_group {
"StochRSI signal cross down Trend filter",
colorSell1 = input { default = "rgba(255, 0, 0,0.8)", type = input.color },
visibleSell1 = input { default = true, type = input.plot_visibility }
}
input_group {
"Area",
colorAreaUp = input { default = "rgba(60, 179, 113,0.8)", type = input.color },
colorAreaDown = input { default = "rgba(199, 21, 133,0.8)", type =
input.color },
visibleArea = input { default = true, type = input.plot_visibility }
}
input_group {
"Ma cross up Trend filter",
colorArrowUp = input { default = "rgba(60, 179, 113,0.8)", type =
input.color },
visibleArrowUp = input { default = true, type = input.plot_visibility }
}
input_group {
"Ma cross down Trend filter",
colorArrowDown = input { default = "rgba(199, 21, 133,0.8)", type = input.color
},
visibleArrowDown = input { default = true, type = input.plot_visibility }
}
input_group {
"Ma cross up StochRSI filter",
colorMASRUp = input { default = "rgba(60, 179, 113,0.4)", type = input.color },
visibleMASRUp = input { default = true, type = input.plot_visibility }
}
input_group {
"Ma cross down StochRSI filter",
colorMASRDown = input { default = "rgba(199, 21, 133,0.4)", type =
input.color },
visibleMASRDown = input { default = true, type = input.plot_visibility }
}
local avgFast = averages[MaFast_average]
local titleFast = inputs[MaFast_title]
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)
LL = lowest(RES,K_period)
HH = highest(RES,K_period)
K = (RES - LL) / (HH - LL)
Per_K = (sma(K,Smooth))*100
Per_D = sma(Per_K,D_period)
--plot(Per_K,"Per_K","Cyan",1)
--plot(Per_D,"Per_D","Orange",1)
end
if(visibleArrowUp == true) then
plot_shape(MaFast0 > MaSlow0 and MaFast0[1] < MaSlow0[1] and MaFast0 >
MaTrend0 and MaSlow0 > MaTrend0 ,
"Call2",
shape_style.arrowup,
shape_size.huge,
colorArrowUp,
shape_location.belowbar,
0,
"Xup",
colorArrowUp
)
end
end