Skip to content
All library documents

Using Price Differences to Approximate Derivatives and Spot Turning Points

Article MQL5 code base

Summary

The document explains a simple finite-difference indicator for price charts. It first notes that estimating a derivative from the current bar and a future bar requires an unknown future price. Instead, it compares a prior bar with the current bar, producing a price change over a user-set delay. This gives a historical measure of direction rather than a forecast.

The proposed signal comes from comparing consecutive readings: a change from negative to positive is interpreted as a local minimum, while a change from positive to negative suggests a local maximum. The indicator’s basic trading rule is to buy when its line crosses above zero and sell when it crosses below. The text offers no backtest, performance evidence, or guidance on parameter selection, transaction costs, or false signals, so the crossover should be treated as an unvalidated heuristic.

Key ideas

  • A finite difference estimates price change using two observed bars separated by a configurable delay.
  • The indicator describes past price movement and does not reveal an unknown future price.
  • A sign change between adjacent readings is used to identify a possible local minimum or maximum.
  • The suggested trading rule buys on an upward zero crossing and sells on a downward crossing.
  • The document provides no performance testing or practical risk controls.

Tags

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