Pine Script V5 Request.security Function Documentation May 2026

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.security(syminfo.tickerid, "60", close, lookahead = barmerge.lookahead_on) You can fetch data from any symbol – even FX, crypto, or stocks – and combine them: pine script v5 request.security function documentation

Join our Newsletter

Sign up to our weekly newsletters for updates on articles, interviews and events

Sign up