Initialize the strategy. Override this method. Declare indicators (with `backtesting.backtesting.Strategy.I`). Precompute what needs to be precomputed or can be precomputed in a vectorized fashion before the strategy starts. If you extend composable
(self)
| 180 | |
| 181 | @abstractmethod |
| 182 | def init(self): |
| 183 | """ |
| 184 | Initialize the strategy. |
| 185 | Override this method. |
| 186 | Declare indicators (with `backtesting.backtesting.Strategy.I`). |
| 187 | Precompute what needs to be precomputed or can be precomputed |
| 188 | in a vectorized fashion before the strategy starts. |
| 189 | |
| 190 | If you extend composable strategies from `backtesting.lib`, |
| 191 | make sure to call: |
| 192 | |
| 193 | super().init() |
| 194 | """ |
| 195 | |
| 196 | @abstractmethod |
| 197 | def next(self): |