Class BollingerBandsStrategy
java.lang.Object
com.quantfinlib.backtest.strategies.BollingerBandsStrategy
- All Implemented Interfaces:
TradingStrategy
Bollinger Band mean reversion: buy when the close dips below the lower band,
sell when it recovers to the middle band or stretches above the upper band.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.quantfinlib.backtest.TradingStrategy
stopLossPct, takeProfitPct
-
Constructor Details
-
BollingerBandsStrategy
public BollingerBandsStrategy(int period, double k) -
BollingerBandsStrategy
public BollingerBandsStrategy()
-
-
Method Details
-
name
- Specified by:
namein interfaceTradingStrategy
-
init
- Specified by:
initin interfaceTradingStrategy
-
onBar
- Specified by:
onBarin interfaceTradingStrategy
-