Skip to content
All library documents

Mogalef Price Corridor Using Regression and Standard Deviation

Article MQL5 code base

Summary

The Mogalef indicator defines a central channel line with linear regression applied to a weighted OHLC price: open, high, low, and twice the close. It places upper and lower boundaries around that center using the standard deviation of closing prices, scaled by a multiplier. The user can set the regression period, deviation period, and channel-width multiplier.

The author’s premise is that price often returns inside the corridor after moving beyond it, then gravitates toward the center line. The page also gives a condition under which the current center remains between the prior bands; in that case, it carries forward the previous center and boundaries. This describes a channel-based mean-reversion concept, but the document provides no backtest, sample, or performance evidence. It does not specify entry, exit, or risk rules, and the proposed tendency should be treated as an unverified belief rather than a demonstrated market property.

Key ideas

  • The center line is a linear regression of a weighted OHLC price series.
  • The upper and lower boundaries use closing-price standard deviation multiplied by a configurable factor.
  • The indicator has separate settings for regression length, deviation length, and channel width.
  • The author expects price to return inside the corridor and then move toward its center.
  • The document supplies no testing evidence or complete trade-management rules.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.