Skip to content
All library documents

Custom Bollinger Bands with Alternative Moving Average Methods

Article MQL5 code base

Summary

This document introduces a MetaTrader 5 Bollinger Bands indicator that lets users choose the moving-average method for the middle band. The available choices are simple, exponential, smoothed, and linear weighted averages, while the upper and lower bands are formed by adding and subtracting a multiple of standard deviation. Period, chart shift, and deviation are configurable inputs, with defaults described in the code.

The material is an indicator implementation, not a trading strategy or performance study. It provides no market examples or evidence that changing the averaging method improves signals. The code also leaves the smoothed method unfinished and appears to use an exponential-average call that may not match the custom calculation interface, so users should review and validate the implementation before relying on its plotted bands.

Key ideas

  • The indicator offers four moving-average methods for the Bollinger middle band.
  • The outer bands are calculated by offsetting the middle band by a standard-deviation multiple.
  • The period, shift, and deviation are configurable.
  • The source provides no evidence that any averaging method improves trading results.
  • The smoothed option is incomplete, and the calculation code warrants review.

Tags

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