Diagnostics
T414
TA window length out of range
T414
The indicator window length is outside the range the function accepts. Choose a value in the range shown.
Failing example
script "conf"
data chart = subscribe(data.ohlcv)
plot out = plot.line(title: "out")
fn avg(src: float, len: int) -> float? {
return ta.sma(src, len)
}
on chart.update {
out.plot(avg(chart.close ?? 0.0, -1) ?? 0.0)
}Corrected example
script "fixed"
data chart = subscribe(data.ohlcv)
on chart.update { let average = ta.ema(chart.close, 3) }