Data

forge.indicatorclassSince Forge API 1
Signaturepython
forge.indicator.Data(*,timeframe: str | None = None,symbol: str | None = None,bars: str | Mapping[str, Any] | None = None,price: str | None = None,gaps: str = 'hold',day_boundary: str | None = None,**params: Any) -> None

Another series an indicator reads: a timeframe, a symbol, a bar type or a price.

Parameters

NameTypeDefault
timeframestr | NoneNone
symbolstr | NoneNone
barsstr | Mapping[str, Any] | NoneNone
pricestr | NoneNone
gapsstr'hold'
day_boundarystr | NoneNone
**paramsAny

h4 = fg.Data(timeframe="H4"), gbp = fg.Data(symbol="GBPUSD", timeframe="1D"), boxes = fg.Data(bars="renko", brick=10). bars is a bar type name or a mapping with bar_type and params; timeframe is C1's spelling or a free one (7m, 4h, 1D); price is bid, ask, mid, last or quote; symbol is a symbol name or the name of a symbol setting (so is timeframe, for a timeframe setting). The declaration never touches data. A timeframe left out on time or Heikin-Ashi bars means the chart's own.

A value of this series becomes visible on the first bar of the indicator whose close is at or after that value's own close; there is no switch that shows it earlier. gaps="hold" repeats the last closed value and gaps="nan" shows a value only on the bar where it arrived. There is no look-ahead setting: fg.Data(lookahead=True) is refused.

Used in