Utility Functions

Mathematical utility functions that support technical analysis calculations. These are the building blocks used by many indicators and are also useful for custom analysis.

Average / Mean

Calculates the arithmetic mean of a set of values

Interactive Demo

Current Result:
Not enough data
Values & Results (0 total):

Code Example

import { getAverage } from 'trading-signals';

const values = [10, 20, 30, 40, 50];
const avg = getAverage(values);

console.log(avg); // 30

⚠️ Important Disclaimer

Signals by technical trading indicators are not guarantees. Always use proper risk management, confirm signals with multiple indicators, and never rely on a single indicator for trading decisions. This library is for educational purposes and does not constitute financial advice.