Skip to content

Latest commit

 

History

History
140 lines (87 loc) · 6.07 KB

index.md

File metadata and controls

140 lines (87 loc) · 6.07 KB

Trend Strategies

Trend strategies generate signals based on a trend indicator.

Absolute Price Oscillator Strategy

The [absolutePriceOscillatorStrategy] uses the values that are generated by the Absolute Price Oscillator (APO) indicator to provide a BUY action when the AO is greather than zero, and SELL action when AO is less than zero, otherwise HOLD action.

import {absolutePriceOscillatorStrategy} from 'indicatorts';

const actions = absolutePriceOscillatorStrategy(fastPeriod, slowPeriod, asset);

The [defaultAbsolutePriceOscillatorStrategy] uses the values that are generated by the defaultAbsolutePriceOscillator.

import {defaultAbsolutePriceOscillatorStrategy} from 'indicatorts';

const actions = defaultAbsolutePriceOscillatorStrategy(asset);

Aroon Strategy

The aroonStrategy uses the values that are generated by the Aroon Indicator to provide a BUY action when the up is greather than down, and SELL action when up is less than down, otherwise HOLD action.

import {aroonStrategy} from 'indicatorts';

const actions = aroonStrategy(asset);

Balance of Power Strategy

The balanceOfPowerStrategy uses the values that are generated by the Balance of Power (BOP) indicator to provide a BUY action when the BOP is greather than zero, and SELL action when BOP is less than zero, otherwise HOLD action.

import {balanceOfPowerStrategy} from 'indicatorts';

const actions = balanceOfPowerStrategy(asset);

Chande Forecast Oscillator Strategy

The chandeForecastOscillatorStrategy uses cfo values that are generated by the Chande Forecast Oscillator (CFO) indicator function to provide a BUY action when cfo is below zero, and SELL action when cfo is above zero.

import {chandeForecastOscillatorStrategy} from 'indicatorts';

const actions = chandeForecastOscillatorStrategy(asset);

KDJ Strategy

The kdjStrategy function uses the k, d, j values that are generated by the Random Index (KDJ) indicator function to provide a BUY action when k crosses above d and j. It is stronger when below 20%. Also the SELL action is when k crosses below d and j. It is strong when above 80%.

import {kdjStrategy} from 'indicatorts';

const actions = kdjStrategy(asset);

MACD Strategy

The macdStrategy uses the macd, and signal values that are generated by the Moving Average Convergence Divergence (MACD) indicator function to provide a BUY action when macd crosses above signal, and SELL action when macd crosses below signal.

import {macdStrategy} from 'indicatorts';

const actions = macdStrategy(asset);

Parabolic SAR Strategy

The parabolicSarStrategy uses the values that are generated by the Parabolic SAR indicator function to provide a BUY action when the trend is FALLING, and SELL action when the trend is RISING, and HOLD action when the trend is STABLE.

import {parabolicSarStrategy} from 'indicatorts';

const actions = parabolicSarStrategy(asset);

Typical Price Strategy

The typicalPriceStrategy uses the values that are generated by the Typical Price indicator function to provide a BUY action when the value is greather than the previous value, and SELL action when the value is less than the previous value, and HOLD action when value is equal to the previous value.

import {typicalPriceStrategy} from 'indicatorts';

const actions = typicalPriceStrategy(asset);

Volume Weighted Moving Average (VWMA) Strategy

The vwmaStrategy function uses SMA and VWMA indicators to provide a BUY action when VWMA is above SMA, and a SELL signal when VWMA is below SMA, a HOLD signal otherwse.

import { vwmaStrategy } from 'indicatorts';

const actions = vwmaStrategy(period, asset);

The defaultVwmaStrategy function can be used with the default period of 20.

import { defaultVwmaStrategy } from 'indicatorts';

const actions = defaultVwmaStrategy(asset);

Vortex Strategy

The vortexStrategy uses the values that are generated by the Vortex Indicator indicator function to provide a BUY action when the plusVi is greather than the minusVi, and SELL action when the plusVi is less than the minusVi, and HOLD action when the plusVi is equal to the minusVi.

import {vortexStrategy} from 'indicatorts';

const actions = vortexStrategy(asset);

Disclaimer

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.

License

Copyright (c) 2022 Onur Cinar. All Rights Reserved.

The source code is provided under MIT License.