Data requests reference
The 2 functions and 0 values of data: signature, effects, phase, cost and tested examples.
Read another timeframe of the chart's own symbol (reading another symbol is not available in this release). A request keeps a state for each place it is written, so it may not stand in a loop or where it may not run.
Functions#
data.intrabars#
data.intrabars([tf], [expression], [symbol], [allow_missing])
Evaluates expression on the smaller bars inside each bar of this chart and gives the values as an array.
- Effects: keeps a state for each place it is written (a call site) and advances it when execution reaches the call; reads data the chart did not load for the script; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: one state per call site; allocates: the memory ledger counts what it builds; one request, counted against the requests a script may make (20).
data.series#
data.series(tf, expression, symbol, [gaps], [future], [allow_missing], [live])
Evaluates expression on another timeframe of the chart's own symbol and gives its value on the bars of this chart; naming another symbol stops the script with an error in this release. By default it gives the last closed value, so a bar never shows a value that was not known when it closed.
- Effects: keeps a state for each place it is written (a call site) and advances it when execution reaches the call; reads data the chart did not load for the script; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: one state per call site; allocates: the memory ledger counts what it builds; one request, counted against the requests a script may make (20).
- Examples: Higher timeframe average.