Momentum strategies generate signals based on a momentum indicator.
The AwesomeOscillatorStrategy uses the ao values that are generated by the AwesomeOscillator indicator function to provide a SELL action when the ao is below zero, and a BUY action when ao is above zero.
actions := indicator.AwesomeOscillatorStrategy(asset)
The RsiStrategy uses the rsi values that are generated by the Rsi indicator function to provide a BUY action when rsi is below the buyAt parameter, and a SELL action when rsi is above the sellAt parameter.
actions := indicator.RsiStrategy(asset, 70, 30)
The RSI strategy is usually used with 70-30, or 80-20 values. The DefaultRsiStrategy function uses the 70-30 values.
actions := indicator.DefaultRsiStrategy(asset)
The function signature of RsiStrategy does not match the StrategyFunction type, as it requires an additional sellAt, and buyAt parameters. The MakeRsiStrategy function can be used to return a StrategyFunction instance based on the given sellAt, and buyAt values.
strategy := indicator.MakeRsiStrategy(80, 20)
actions := strategy(asset)
The Rsi2Strategy uses the rsi values that are generated by the Rsi2 indicator function to provide a BUY action when 2-period RSI moves below 10, and a SELL action when the 2-period RSI moved above 90, and a HOLD action otherwise.
actions := indicator.Rsi2Strategy(asset)
The WilliamsRStrategy uses the wr values that are generated by the WilliamsR indicator function to provide a SELL action when the wr is below -20, and a BUY action when wr is above -80.
actions := indicator.WilliamsRStrategy(asset)
The information provided on this project is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.
Copyright (c) 2021 Onur Cinar. All Rights Reserved.
The source code is provided under MIT License.