stock-indicator
Version:
Stock Indicator Library
14 lines (13 loc) • 881 B
TypeScript
import { TMixed } from "../common";
/**
* DMA - Different of Moving Average
* @param {number} CLOSE - closing prices of the stock
* @param {number} N1 - number of periods for the first moving average, must be greater than 1 and less than or equal to the length of the CLOSE array,default is 10
* @param {number} N2 - number of periods for the second moving average, must be greater than N1 and less than or equal to the length of the CLOSE array,default is 50
* @param {number} M - number of periods for the moving average of the DIF, must be greater than 1 and less than or equal to the length of the DIF array,default is 10
* @returns {{DIF: TMixed[], DIFMA: TMixed[]}} - DIF and DIFMA arrays, DIFMA is the moving average of the DIF array
*/
export declare function DMA(CLOSE: number[], N1?: number, N2?: number, M?: number): {
DIF: TMixed[];
DIFMA: TMixed[];
};