Skip to content
All library documents

Scoring and Managing Supply and Demand Zones with Stateful Rules

Article MQL5 articles

Summary

This installment describes a modular framework for managing supply and demand zones as stateful objects. Its decision pipeline evaluates automatically detected candidates, monitors accepted zones as they age and interact with price, then resolves pending interactions into outcomes such as confirmed bounces or breakouts. Candidate quality is scored on a normalized scale using structural symmetry, relative volume, and ATR-scaled price displacement; configurable weights and a minimum admission score govern which zones enter the lifecycle system.

After admission, a zone’s confidence can decline with age, rise after clean reactions, or fall after deep penetration. A pending reaction is confirmed using consecutive closes, distance moved away from the zone, and a timeout. Manually drawn zones bypass automated scoring to preserve analyst intent, while event logging records behavior without changing decisions. The article presents an implementation architecture and configurable rules, not evidence of trading profitability; the scoring choices and parameters require evaluation across instruments and conditions.

Key ideas

  • Automatically detected zone candidates are scored for volume participation, price departure, and swing symmetry before admission.
  • Accepted zones can gain or lose confidence as they age and interact with price.
  • Pending reactions are resolved into bounce or breakout outcomes using explicit confirmation and timeout rules.
  • Manually drawn zones bypass the automated admission score, and logging remains observational.
  • The framework is an extensible implementation example rather than validated evidence of profitable trading.

Tags

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