Momentum strategies generate signals based on a momentum indicator.
NOTE: All configuration objects for all strategies are optional. If no configuration object is passed, the default configuration will be used. Likewise, you may also partially pass a configuration object, and the default values will be used for the missing properties.
The awesomeOscillatorStrategy uses the ao values that are generated by the Awesome Oscillator indicator function to provide a SELL action when the ao is below zero, and a BUY action when ao is above zero.
import { aoStrategy } from 'indicatorts';
const defaultConfig = { fast: 5, slow: 34 };
const actions = aoStrategy(asset, defaultConfig);
// Alternatively:
// const actions = awesomeOscillatorStrategy(asset, defaultConfig);
The ichimokuCloudStrategy uses the ao values that are generated by the Ichimoku Cloud indicator function to provide a BUY action when the leadingSpanA is greather than leadingSpanB, and a SELL action when the leadingSpanA is less than leadingSpanB, and a HOLD action when leadingSpanA is equal to leadingSpanB.
import { ichimokuCloudStrategy } from 'indicatorts';
const defaultConfig = { short: 9, medium: 26, long: 52, close: 26 };
const actions = ichimokuCloudStrategy(asset, defaultConfig);
The rsi2Strategy uses the rsi values that are generated by the RSI 2 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.
import { rsi2Strategy } from 'indicatorts';
const actions = rsi2Strategy(asset);
The stochasticOscillatorStrategy uses the ao values that are generated by the Stochastic Oscillator indicator function to provide a BUY action when k and d are less than 20, a SELL action when the k and d are greather than 80, a HOLD action otherwise.
import { stochStrategy } from 'indicatorts';
const defaultConfig = { kPeriod: 14, dPeriod: 3 };
const actions = stochStrategy(asset, defaultConfig);
// Alternatively:
// const actions = stochasticOscillatorStrategy(asset, defaultConfig);
The williamsRStrategy uses the wr values that are generated by the Williams R indicator function to provide a SELL action when the wr is below -20, and a BUY action when wr is above -80.
import { willRStrategy } from 'indicatorts';
const defaultConfig = { period: 14 };
const actions = willRStrategy(asset, defaultConfig);
// Alternatively:
// const actions = williamsRStrategy(asset, defaultConfig);
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) 2022 Onur Cinar. All Rights Reserved.
The source code is provided under MIT License.