CS3124
warning name is ChartDeck data of the chart’s own market: inside a request expression it reads na. Read it outside the request (its value is already aligned to the chart’s bars).
#What it means
This is a warning. ChartDeck's record data (trade prints flow.prints, liquidation levels liq.levels / liq.heat, the order book book.*, volume at price vap.*, the economic calendar cal.*, and the lists fp.rows, fp.delta_at, fp.since, flow.big_trades, flow.big_since, flow.big_threshold, liq.events and liq.events_since) belongs to the chart’s own market and bars. A request expression runs on other bars, which carry no records, so inside it these read na, false or an empty array. The data series (oi.close, funding.rate, flow.cvd, the per-bar fp.*, flow.big_* and liq.long_liq_usd / liq.short_liq_usd ...) are different: they read the requested market and timeframe inside a request.
#Typical cause
- A record function used inside the expression of
request.tf,request.market,request.lower_tforrequest.market_lower_tf, for examplerequest.tf("1D", array.size(flow.prints(100000))).
#How to fix it
Call the record function outside the request. Where a requested timeframe's footprints start is fp.since("1") (with that timeframe), called outside the request. For a higher-timeframe view, keep its result in a state variable and reset it when the higher bar changes (timeframe.change("1D")).
#Example
//@chartscript 1
indicator("Big prints per day")
const daily = request.tf("1D", array.size(flow.prints(100000)))
plot(daily)Fixed
//@chartscript 1
indicator("Big prints per day")
state count: int = 0
if (timeframe.change("1D")) {
count = 0
}
count += array.size(flow.prints(100000))
plot(count)#Related
- CS3123 — name belongs to the code around this request; the request expression runs on other bars and reads it as na. Pass a market / timeframe instead, or compute the value inside the request.
- CS3122 — name changes on the chart bars (how), so a request cannot recompute it on the requested bars: there it is na (kw) or the chart’s current value. Compute it in a function called inside the request.