TICK script: use from() values after chaining functions

Thanks for you answer. My description was a little bit wrong, because I have to compare the forecasted value with the next incoming value after the original value (to compare the forecast and the real value).
The values are incoming every 10 seconds, so I have to shift the predicted value to the time of the original value + 10 seconds. I think this can be done by the eval function below:

var hw = data
    |holtWinters('value', 1, 0, 10m)
        .as('pred')
    |eval(10s-(time-'data.time'))
        .keep('pred')
    |shift(eval)

but it’s not proper yet, console output:

invalid TICKscript: unsupported literal type func(time.Duration, ...time.Duration) (kapacitor.TimeDimension, error)