Skip to content

介绍

原文: https://www.backtrader.com/recipes/indicators/intro/

本节托管一组不属于backtrader核心的指标实现。

要使用它们:

  • 将代码复制到您选择的文件中,或直接复制到策略上方
  • 如果复制到文件,请从文件中导入

    py from myfile import TheIndicator

  • 并在你的策略中使用它

    py class MyStrategy(bt.Strategy): def __init__(self): self.myind = TheIndicator(self.data, param1=value1, ...)


我们一直在努力

apachecn/AiLearning

【布客】中文翻译组