Verify the requested symbol, timeframe and expression first. Then inspect gaps, unavailable history, invalid-context handling and dynamic request behavior before treating na as a platform failure.
What you may be seeing
- request.security() returns na on some or all bars
- The script raises an invalid symbol, timeframe or request error
- Results differ after changing the chart symbol or timeframe
Most likely causes
- The requested symbol or timeframe is invalid or lacks data
- Gap mapping legitimately returns na where no requested bar exists
- The expression or dynamic request creates an unsupported or excessive context
Try this first
- Test the exact ticker ID and timeframe with a simple close expression
- Confirm that the requested market has data for the relevant dates
- Review gaps and lookahead settings for the intended mapping
- Handle expected na values and invalid contexts explicitly
If that didn’t fix it
- Use ticker.new() or ticker.modify() to construct the intended context
- Request a small tuple of required values once instead of many separate calls
- Use request.security_lower_tf() when arrays of lower-timeframe intrabars are required
Verify the fix
A minimal request returns expected values on known bars, and the production script handles legitimate missing data without false signals.
Why this happens
Verify the requested symbol, timeframe and expression first. Then inspect gaps, unavailable history, invalid-context handling and dynamic request behavior before treating na as a platform failure.
request.security() evaluates an expression in another context and maps the result back to chart bars. Missing source bars, an invalid symbol or timeframe, an unsupported request pattern, or deliberate gap behavior can all produce an error or na.