//@version=6 indicator("Workshop 16 Confirmed Context", overlay=true) higher = input.timeframe("1W", "Higher timeframe") length = input.int(10, "Context average", minval=1) if (timeframe.in_seconds(higher) <= timeframe.in_seconds(timeframe.period)) runtime.error("Choose a strictly higher timeframe") context = request.security(syminfo.tickerid, higher, ta.sma(close, length)[1], lookahead=barmerge.lookahead_on) plot(context, "Completed context average", color=color.blue, style=plot.style_stepline)