Skip to content
All library documents

Finding and Displaying DeMark Pivot Points with a Dimension Measure

Article MQL5 code base

Summary

This document explains a charting script that identifies upper and lower DeMark pivot points and labels each point with a dimension. The dimension is determined by comparing a bar’s high or low with neighboring bars, expanding the comparison outward until the candidate no longer remains an extreme. Users can set a minimum dimension and the number of bars to process; points meeting the threshold are marked on the chart, while points whose dimension cannot be determined at the boundary receive a separate marker.

The revision mainly reorganizes the implementation into a class, adds parameter checks, and provides a button to remove the script’s chart objects. A chart example is mentioned, but the text provides no trading rules, backtest, or evidence that these pivots predict price movement. The labels are descriptive technical-analysis output, so traders would need to define and independently test any strategy built around them. The article also includes platform-specific implementation and setup guidance.

Key ideas

  • The script detects local highs and lows by comparing each bar with progressively more distant neighbors.
  • A minimum dimension filters which pivot points are displayed and labeled.
  • The number of bars processed can be limited, with checks for available history and low settings.
  • A cleanup control removes objects created by the script from the chart.
  • The document provides no performance evidence or rules for trading the detected pivots.

Tags

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