PineScript calculate EMA for One Candle in Future in Tradingview
问题 I want to calculate an exponential-moving-average (EMA) with the EMA for one Candle in the future just by duplicating the last candle. Means I want to plot an EMA with an offset of 1 and the value, that is in the offset 1 bar is calculated based on the current candle. Unfortunately I think I have a wrong understanding of the series, why it doesn't work. But hopefully my code shows what I wanted to do: CustomEma(source, length) => alpha = 2 / (length + 1) ema = 0.0 // iterate through the