Skip to content
All library documents

MQL5 Indicator Drawing Styles and Their Buffer Patterns

Article MQL5 articles

Summary

The article surveys MQL5’s 18 indicator drawing styles and contrasts them with the smaller MQL4 set. It explains the Plot concept and introduces a Buffer-Pattern notation: data buffers and color buffers are arranged in index order, with the number and order depending on the selected style. For indicators with multiple plots, bind buffers in the order implied by each plot’s pattern; auxiliary calculation buffers should follow display buffers.

A demonstration indicator lets users select drawing styles and adjust plot properties, illustrating styles such as lines, histograms, candles, bars, and color variants. The article also examines how drawing styles handle empty values, grouping them by behavior and showing examples. Its focus is MQL5 indicator implementation and visualization rather than trading signals or performance; the supplied examples are demonstrations, not evidence that any style improves analysis or trading results.

Key ideas

  • MQL5 defines 18 drawing styles, including styles that use color buffers.
  • Each drawing style has a buffer pattern specifying buffer count, type, and order.
  • For multiple plots, bind display buffers in the sequence required by their patterns.
  • Place auxiliary calculation buffers after buffers used to display plots.
  • Empty values are handled differently across drawing styles and can affect what appears on a chart.

Tags

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