# Statistical Indicators

Regression channels, regime CUSUM tests, correlation oscillators, and curve extrapolators. This category documents **13** MetaTrader 5 library indicators.

[← Back to Indicator Library Reference](/indicators/library/intro.md) · [Interactive Indicator Showcase](/indicators/.md)

## Quick Index[​](#quick-index "Direct link to Quick Index")

| Indicator                                                     | Placement            | Version | Summary                                               |
| ------------------------------------------------------------- | -------------------- | ------- | ----------------------------------------------------- |
| [AIMS CUSUM Regimes](#aims-cusum-regimes)                     | Main-Chart Overlay   | `1.00`  | AIMS CUSUM Change-Point Detection MT5                 |
| [AIMS Recursive Least Squares](#aims-recursive-least-squares) | Main-Chart Overlay   | `1.00`  | AIMS Recursive Least Squares (RLS) Forecast MT5       |
| [AIMS Rolling KPSS](#aims-rolling-kpss)                       | Subwindow Oscillator | `1.00`  | AIMS Rolling KPSS Stationarity Statistic MT5          |
| [AIMS Forecast Oscillator](#aims-forecast-oscillator)         | Subwindow Oscillator | `1.00`  | AIMS Chande Forecast Oscillator (%F) MT5              |
| [AIMS Autocorrelation](#aims-autocorrelation)                 | Subwindow Oscillator | `1.00`  | AIMS Rolling Autocorrelation & Significance Bands MT5 |
| [AIMS Arctan Oscillator](#aims-arctan-oscillator)             | Subwindow Oscillator | `1.00`  | ArcTan Z-Score Reversal Oscillator                    |
| [AIMS Isotonic Reg Osc](#aims-isotonic-reg-osc)               | Subwindow Oscillator | `1.00`  | Isotonic Regression PAVA Oscillator                   |
| [AIMS Normalized Resonator](#aims-normalized-resonator)       | Subwindow Oscillator | `1.00`  | Normalized Bandpass Resonator Oscillator              |
| [AIMS Correlated Sine Osc](#aims-correlated-sine-osc)         | Subwindow Oscillator | `1.00`  | Correlated Sine Oscillator                            |
| [AIMS Harmonic Resonance Osc](#aims-harmonic-resonance-osc)   | Subwindow Oscillator | `1.00`  | Harmonic Resonance Oscillator (Ehlers Bandpass)       |
| [AIMS Extrapolated Trend](#aims-extrapolated-trend)           | Main-Chart Overlay   | `1.00`  | Extrapolated Previous Trend (OLS Regression)          |
| [AIMS Linear Reg Histogram](#aims-linear-reg-histogram)       | Main-Chart Overlay   | `1.00`  | Linear Regression Channel & Bin Histogram             |
| [AIMS Cubic Bezier Extrap](#aims-cubic-bezier-extrap)         | Main-Chart Overlay   | `1.00`  | Cubic Bezier Curve Extrapolation                      |

***

## Indicator Specifications[​](#indicator-specifications "Direct link to Indicator Specifications")

### AIMS CUSUM Regimes[​](#aims-cusum-regimes "Direct link to AIMS CUSUM Regimes")

* **Placement:** Main-Chart Overlay
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** AIMS CUSUM Change-Point Detection MT5
* **Plot Labels:** `CUSUM Regime Level`, `Bullish Pressure`, `Bearish Pressure`, `Regime Change Up`, `Regime Change Down`

#### Parameters[​](#parameters "Direct link to Parameters")

| Parameter                 | Variable       | Type     | Default |
| ------------------------- | -------------- | -------- | ------- |
| Rolling Statistics Period | `InpLength`    | `int`    | `50`    |
| Detection Threshold (h)   | `InpThreshold` | `double` | `4.0`   |
| Allowable Slack (k)       | `InpSlack`     | `double` | `0.5`   |

***

### AIMS Recursive Least Squares[​](#aims-recursive-least-squares "Direct link to AIMS Recursive Least Squares")

* **Placement:** Main-Chart Overlay
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** AIMS Recursive Least Squares (RLS) Forecast MT5
* **Plot Labels:** `RLS Mean`, `Upper RLS Band`, `Lower RLS Band`, `Mean Reversion Buy`, `Mean Reversion Sell`

#### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter                        | Variable         | Type     | Default |
| -------------------------------- | ---------------- | -------- | ------- |
| Forgetting Factor (0.80 - 0.999) | `InpLambda`      | `double` | `0.98`  |
| Band StdDev Multiplier           | `InpBandMult`    | `double` | `2.0`   |
| Show Mean Reversion Signals      | `InpShowSignals` | `bool`   | `true`  |

***

### AIMS Rolling KPSS[​](#aims-rolling-kpss "Direct link to AIMS Rolling KPSS")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** AIMS Rolling KPSS Stationarity Statistic MT5
* **Plot Labels:** `KPSS Statistic`

#### Parameters[​](#parameters-2 "Direct link to Parameters")

| Parameter                     | Variable       | Type             | Default      |
| ----------------------------- | -------------- | ---------------- | ------------ |
| Rolling Window Length         | `InpWindowLen` | `int`            | `50`         |
| Stationarity Test Type        | `InpTestType`  | `ENUM_KPSS_TYPE` | `KPSS_LEVEL` |
| Newey-West Bartlett Bandwidth | `InpBandwidth` | `int`            | `4`          |

***

### AIMS Forecast Oscillator[​](#aims-forecast-oscillator "Direct link to AIMS Forecast Oscillator")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** AIMS Chande Forecast Oscillator (%F) MT5
* **Plot Labels:** `Chande Forecast Osc %`, `Signal Line`

#### Parameters[​](#parameters-3 "Direct link to Parameters")

| Parameter               | Variable     | Type                | Default   |
| ----------------------- | ------------ | ------------------- | --------- |
| Regression Length       | `InpLength`  | `int`               | `14`      |
| Signal Smoothing Length | `InpSigLen`  | `int`               | `3`       |
| Signal MA Type          | `InpSigType` | `ENUM_CFO_SIG_TYPE` | `CFO_SMA` |
| Show Signal Line        | `InpShowSig` | `bool`              | `true`    |

***

### AIMS Autocorrelation[​](#aims-autocorrelation "Direct link to AIMS Autocorrelation")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** AIMS Rolling Autocorrelation & Significance Bands MT5
* **Plot Labels:** `Autocorrelation`, `Upper Significance (+2/sqrt(n))`, `Lower Significance (-2/sqrt(n))`

#### Parameters[​](#parameters-4 "Direct link to Parameters")

| Parameter         | Variable    | Type              | Default       |
| ----------------- | ----------- | ----------------- | ------------- |
| Analyzed Series   | `InpSeries` | `ENUM_ACF_SERIES` | `ACF_RETURNS` |
| Sample Window (n) | `InpWindow` | `int`             | `200`         |
| Primary Lag       | `InpLag`    | `int`             | `1`           |

***

### AIMS Arctan Oscillator[​](#aims-arctan-oscillator "Direct link to AIMS Arctan Oscillator")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** ArcTan Z-Score Reversal Oscillator
* **Plot Labels:** `Reversal Potential`, `ATO Line`

#### Parameters[​](#parameters-5 "Direct link to Parameters")

| Parameter                  | Variable     | Type  | Default |
| -------------------------- | ------------ | ----- | ------- |
| Smoothing & Z-Score Length | `InpLength`  | `int` | `21`    |
| Pre-Gain \[-10..10]        | `InpPreGain` | `int` | `0`     |

***

### AIMS Isotonic Reg Osc[​](#aims-isotonic-reg-osc "Direct link to AIMS Isotonic Reg Osc")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Isotonic Regression PAVA Oscillator
* **Plot Labels:** `Isotonic Oscillator`, `Bull Cross`, `Bear Cross`

#### Parameters[​](#parameters-6 "Direct link to Parameters")

| Parameter                 | Variable    | Type  | Default |
| ------------------------- | ----------- | ----- | ------- |
| Isotonic Period \[2..200] | `InpLength` | `int` | `20`    |

***

### AIMS Normalized Resonator[​](#aims-normalized-resonator "Direct link to AIMS Normalized Resonator")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Normalized Bandpass Resonator Oscillator
* **Plot Labels:** `Normalized Resonator`, `Signal Line`, `Bullish Cross`, `Bearish Cross`

#### Parameters[​](#parameters-7 "Direct link to Parameters")

| Parameter                              | Variable          | Type     | Default |
| -------------------------------------- | ----------------- | -------- | ------- |
| Center Cycle Period                    | `InpCenterPeriod` | `int`    | `100`   |
| Passband Delta (0.01..1.0)             | `InpBandwidth`    | `double` | `0.5`   |
| Peak Normalization Lookback Multiplier | `InpLookbackMult` | `double` | `1.0`   |
| Signal EMA Period                      | `InpSignalLen`    | `int`    | `9`     |
| Overbought Threshold                   | `InpOverbought`   | `double` | `0.8`   |
| Oversold Threshold                     | `InpOversold`     | `double` | `-0.8`  |

***

### AIMS Correlated Sine Osc[​](#aims-correlated-sine-osc "Direct link to AIMS Correlated Sine Osc")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Correlated Sine Oscillator
* **Plot Labels:** `Correlated Sine`, `Bull Zero Cross`, `Bear Zero Cross`

#### Parameters[​](#parameters-8 "Direct link to Parameters")

| Parameter        | Variable        | Type     | Default |
| ---------------- | --------------- | -------- | ------- |
| Cycle Period     | `InpPeriod`     | `int`    | `20`    |
| Phase Multiplier | `InpSmoothMult` | `double` | `1.0`   |

***

### AIMS Harmonic Resonance Osc[​](#aims-harmonic-resonance-osc "Direct link to AIMS Harmonic Resonance Osc")

* **Placement:** Subwindow Oscillator
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Harmonic Resonance Oscillator (Ehlers Bandpass)
* **Plot Labels:** `Harmonic Resonance`, `Dynamic Overbought`, `Dynamic Oversold`, `Overbought Signal`, `Oversold Signal`

#### Parameters[​](#parameters-9 "Direct link to Parameters")

| Parameter                  | Variable        | Type     | Default |
| -------------------------- | --------------- | -------- | ------- |
| Reference Period           | `InpRefPeriod`  | `int`    | `30`    |
| Short Harmonic Multiplier  | `InpShortMult`  | `double` | `0.5`   |
| Medium Harmonic Multiplier | `InpMedMult`    | `double` | `1.0`   |
| Long Harmonic Multiplier   | `InpLongMult`   | `double` | `2.0`   |
| Bandpass Bandwidth         | `InpBandwidth`  | `double` | `0.10`  |
| Normalization Lookback     | `InpNormLength` | `int`    | `50`    |
| Overbought Threshold       | `InpObLevel`    | `double` | `80.0`  |
| Oversold Threshold         | `InpOsLevel`    | `double` | `20.0`  |

***

### AIMS Extrapolated Trend[​](#aims-extrapolated-trend "Direct link to AIMS Extrapolated Trend")

* **Placement:** Main-Chart Overlay
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Extrapolated Previous Trend (OLS Regression)
* **Plot Labels:** `Extrapolated Previous Trend`

#### Parameters[​](#parameters-10 "Direct link to Parameters")

| Parameter                   | Variable       | Type              | Default     |
| --------------------------- | -------------- | ----------------- | ----------- |
| Regression Period Timeframe | `InpSessionTf` | `ENUM_TIMEFRAMES` | `PERIOD_D1` |

***

### AIMS Linear Reg Histogram[​](#aims-linear-reg-histogram "Direct link to AIMS Linear Reg Histogram")

* **Placement:** Main-Chart Overlay
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Linear Regression Channel & Bin Histogram
* **Plot Labels:** `LinReg Mid`, `LinReg Upper`, `LinReg Lower`

#### Parameters[​](#parameters-11 "Direct link to Parameters")

| Parameter                     | Variable      | Type     | Default |
| ----------------------------- | ------------- | -------- | ------- |
| Regression Lookback           | `InpLength`   | `int`    | `100`   |
| Histogram Bins (3..20)        | `InpBins`     | `int`    | `10`    |
| Residual StdDev Multiplier    | `InpMult`     | `double` | `2.0`   |
| Draw Right-Side Bin Histogram | `InpShowHist` | `bool`   | `true`  |

***

### AIMS Cubic Bezier Extrap[​](#aims-cubic-bezier-extrap "Direct link to AIMS Cubic Bezier Extrap")

* **Placement:** Main-Chart Overlay
* **Version:** `1.00`
* **Platform:** MetaTrader 5 (MQL5)
* **Summary:** Cubic Bezier Curve Extrapolation
* **Plot Labels:** `Cubic Bezier Curve`, `Extrapolated Projection`

#### Parameters[​](#parameters-12 "Direct link to Parameters")

| Parameter                   | Variable        | Type  | Default |
| --------------------------- | --------------- | ----- | ------- |
| Bezier Anchor Window (Bars) | `InpWindow`     | `int` | `60`    |
| Forward Extrapolation Bars  | `InpExtrapBars` | `int` | `5`     |

***
