request.security(syminfo.tickerid, "60", close, lookahead = barmerge.lookahead_on) You can fetch data from any symbol – even FX, crypto, or stocks – and combine them:
request.security(syminfo.tickerid, "60", close, lookahead = barmerge.lookahead_off) ❌ pine script v5 request.security function documentation
✅
get_htf_ma(ma_len) => request.security(syminfo.tickerid, "1D", ta.sma(close, ma_len)) plot(get_htf_ma(20)) | v4 | v5 | |----|----| | security(sym, tf, expr) | request.security(sym, tf, expr) | | Gaps via set parameter | Explicit gaps= parameter | | No tuple support | Tuple support ✅ | | Lookahead implicit | lookahead= explicit | 🧠 Pro Tip: Accessing Previous HTF Values Because HTF data only changes when a new HTF bar forms: request