I’d like to use the timeframe(n) instruction inside an if block, like the code below but it throws an error: htf=1 if htf then timeframe(15mn) x = ExponentialAverage[9](close) endif Is there any workaround ? Thx