从 pinescript 中的某个时间戳开始绘制系列

Start plotting series starting from certain timestamp in pinescript

有没有办法从某个时间戳开始绘制一系列(即 ema(close,some_period) )?
我知道 plot() 中有 'show_last' 参数,但我不知道如何计算从我的时间戳到现在有多少柱 show_last 是整数?

谢谢!

这将开始绘制来自特定 date/time

的 EMA
//@version=4
study("My Script", overlay = true)

tz = 0 //timezone
timeadj = time + tz * 60 * 60 * 1000 //adjust the time (unix)
t1 = timeadj >= timestamp(2021, 04, 19, 0, 0) ? 1 : 0 //get the starting time

ema = ema(close, 50)
ema_1 = t1 ? ema :na //start ema from the timestamp
plot(ema_1)

barss = barssince(t1 != t1[1]) //get the bars since timestamp
// plot(barss)