本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。
//@version=6
indicator("S.T.R.I.K.E. EMA Shadow", overlay = true)
// Shadow colors and transparency.
bullShadow = input.color(color.new(color.lime, 80), "Bullish shadow")
bearShadow = input.color(color.new(color.red, 80), "Bearish shadow")
// Fixed EMAs using the chart's closing prices.
ema21 = ta.ema(close, 21)
ema55 = ta.ema(close, 55)
// Customize line appearance in the Style tab.
fastPlot = plot(ema21, title = "21 EMA", color = color.teal, linewidth = 2)
slowPlot = plot(ema55, title = "55 EMA", color = color.orange, linewidth = 2)
// Fill only the space between the EMAs.
shadowColor = ema21 > ema55 ? bullShadow : ema21 < ema55 ? bearShadow : na
fill(fastPlot, slowPlot, color = shadowColor, title = "EMA Shadow", editable = false)