Skip to content
All library documents

DeMark Reversal Signals from Multi-Bar Price Comparisons

Article Strategy library · Author: ChaoZhang

Summary

This indicator and strategy derive directional states by comparing a selected price series with its value several bars earlier across a configurable lookback. It counts how often the current comparison is higher or lower, then assigns a bullish reversal state when all comparisons are lower and a bearish state when all are higher. When neither condition holds, the broader signal can still reflect which count dominates. Crossings into bullish or bearish reversal states trigger long or short entries.

The parameters allow selection of the source series, resolution, comparison length, and lag length, along with settings related to repainting and bar colors. The published configuration uses BTC/USD on Bitfinex, with a two-hour chart and 15-minute base data, over a three-month period. No performance results or interpretation of the settings are provided. The code requests data from another resolution and offsets the requested series, so timing and repaint behavior should be checked carefully. The script also exposes a repainting option, but the shown logic does not visibly use that parameter, and it contains no explicit stop or position-sizing rules.

Key ideas

  • The method counts higher and lower comparisons between selected prices separated by a configurable lag.
  • A full run of lower comparisons marks a bullish reversal state, while a full run of higher comparisons marks a bearish one.
  • State crossovers generate long and short strategy entries.
  • The indicator includes configurable source, resolution, lookback, and lag inputs.
  • The backtest setup is described, but no results or risk controls are reported.

Tags

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