@ldrick/trade-indicators
Version:
Trade Indicators
12 lines (11 loc) • 471 B
JavaScript
import { ma } from './ma.js';
import { wamean } from './wamean.js';
/**
* The Weighted Moving Average (WMA) takes newer values weighted into account
* and reacts closer to the prices compared to the Simple Moving Average (SMA).
* It can be used to identify support and resistance levels.
* Also prices above the WMA can indicate uptrends, prices below can indicate downtrends.
*
* @public
*/
export const wma = (values, period = 20) => ma(values, period, wamean);