backtrader.indicators.dv2 module¶
DV2 Indicator Module - RSI(2) alternative.
This module provides the DV2 indicator developed by David Varadi as an alternative to RSI(2).
- Classes:
DV2: DV2 indicator (RSI(2) alternative).
Example
- class MyStrategy(bt.Strategy):
- def __init__(self):
self.dv2 = bt.indicators.DV2(self.data)
- def next(self):
- if self.dv2[0] > 50:
self.buy()