Skip to content
All library documents

Using Price Change and Divergence Across Lookback Periods

Article MQL5 code base

Summary

The document describes an indicator that displays the relative change in the current price compared with a price from a chosen number of bars earlier. It gives two default lookback lengths and illustrates their time span on a five-minute chart, where the shorter setting covers eight hours and the longer one covers a day. The indicator can be read in relation to its zero line, with positive and negative deviations representing change in opposite directions.

It also suggests comparing indicator extremes with price extremes to look for divergence. This is a brief description of possible readings, not a complete trading strategy: it does not define signal thresholds, entry or exit rules, risk controls, or validation results. The stated chart-time examples depend on the specified timeframe, and the document provides no evidence that zero-line readings or divergences predict future returns.

Key ideas

  • The indicator compares current price with price at a selected earlier bar.
  • Its default lookbacks are 96 and 288 bars, corresponding to eight hours and one day on a five-minute chart.
  • Positive and negative readings indicate deviation on either side of the zero line.
  • Divergence can be assessed by comparing price extremes with indicator extremes.
  • No trading rules or evidence of predictive performance are provided.

Tags

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