backtrader.feeds.vchart module¶
Visual Chart Binary Data Feed Module - VisualChart binary files.
This module provides the VChartData feed for reading VisualChart binary on-disk data files.
- Classes:
VChartData: Reads VisualChart binary data files.
示例
>>> data = bt.feeds.VChartData(dataname='data.fd')
>>> cerebro.adddata(data)
- class backtrader.feeds.vchart.VChartData[源代码]¶
基类:
DataBaseSupport for Visual Chart binary on-disk files for both daily and intradaily formats.
备注
dataname: to file or open file-like an objectIf a file-like object is passed, the
timeframeparameter will be used to determine which is the actual timeframe.Else the file extension (
.fdfor daily and.minfor intraday) will be used.
- __init__(*args, **kwargs)¶
Initialize a LineMultiple instance.
Sets up the internal state for managing multiple lines, including line type indicator, lines collection, clock reference, and line iterator tracking.
- Initializes:
_ltype: Line type indicator (None for base LineMultiple). lines: Collection of line objects (creates if not exists). _clock: Clock reference for synchronization. _lineiterators: Dictionary tracking registered lineiterators. _minperiod: Minimum period requirement (defaults to 1).
- frompackages = ()¶
- packages = ()¶
- class backtrader.feeds.vchart.VChartFeed[源代码]¶
基类:
FeedBaseVisualChart feed class.
Wrapper class for VChartData feed functionality.
- DataCls¶
VChartData的别名
- params = (('basepath', ''), ('period', 14), ('movav', None), ('_movav', None), ('lookback', 1), ('upperband', 70.0), ('lowerband', 30.0), ('safediv', False), ('safepct', False), ('fast', 5), ('slow', 34), ('signal', 9), ('mult', 2.0), ('matype', 0), ('dataname', None), ('name', ''), ('compression', 1), ('timeframe', 5), ('fromdate', None), ('todate', None), ('sessionstart', None), ('sessionend', None), ('filters', []), ('tz', None), ('tzinput', None), ('qcheck', 0.0), ('calendar', None))¶