backtrader.bokeh.analyzers.recorder module¶
Data recording analyzer.
Records data during strategy execution for subsequent plotting or analysis.
- class backtrader.bokeh.analyzers.recorder.RecorderAnalyzer[源代码]¶
基类:
AnalyzerData recording analyzer.
Records OHLCV data and indicator data during strategy execution.
- 参数:
indicators -- Whether to record indicator data
observers -- Whether to record observer data
示例
cerebro.addanalyzer(RecorderAnalyzer, indicators=True)
# Get data after running result = cerebro.run() recorder = result[0].analyzers.recorderanalyzer data = recorder.get_analysis()
- params = (('indicators', True), ('observers', False))¶
- __init__()[源代码]¶
Initialize recorder analyzer.
Sets up storage for data sources, indicators, and observers based on parameter configuration.