Class RsiStrategy
java.lang.Object
com.quantfinlib.backtest.strategies.RsiStrategy
- All Implemented Interfaces:
TradingStrategy
RSI mean reversion: buy when RSI crosses up through the oversold level,
sell when it crosses down through the overbought level.
-
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
-
RsiStrategy
public RsiStrategy(int period, double oversold, double overbought)
-
-
Method Details
-
name
- Specified by:
namein interfaceTradingStrategy
-
init
- Specified by:
initin interfaceTradingStrategy
-
onBar
- Specified by:
onBarin interfaceTradingStrategy
-