@ldrick/trade-indicators
Version:
Trade Indicators
9 lines (8 loc) • 457 B
TypeScript
import { either as E, readonlyNonEmptyArray as RNEA } from 'fp-ts';
/**
* The Simple Moving Average (SMA) calculates the arithmetic mean of prices over an period.
* It can be used to identify support and resistance levels.
* Also prices above the SMA can indicate uptrends, prices below can indicate downtrends.
* @public
*/
export declare const sma: (values: readonly number[], period?: number) => E.Either<Error, RNEA.ReadonlyNonEmptyArray<number>>;