Simple Moving Average (SMA)
Calculates the arithmetic mean of prices over a specified period. Smooths out price fluctuations to identify the trend direction.
Live Demo
Pick a market regime to see how SMA(5) reacts:
Usage
import {} from 'trading-signals';
// SMA yields results once 5 inputs have been added
const = new (5);