Free trial
Contents

mean

Statistical Mean (same as SMA)

mean(source, period)

Parameters

Name Type Description
source field Data series to calculate mean of
period int Number of periods for averaging

Formula

Mean = Σ(field) / period

Examples

// price above 20-period mean
close > mean(close, 20);
// volume above 50-period average
volume > mean(volume, 50);

Returns

float — may be NULL

Range

period must be 2-400

Notes

Functionally identical to SMA; provided for statistical clarity