Discussing the article: "Developing Smart Chart Objects in MQL5 (Part 2): Automating Trendline Discovery and Lifecycle Management"
MetaQuotes:
How do YOU define touch, bounce and break? Thank you.
Check out the new article: Developing Smart Chart Objects in MQL5 (Part 2): Automating Trendline Discovery and Lifecycle Management.
Author: Francis Nyoike Thumbi
Avery Horton #:
How do YOU define touch, bounce and break? Thank you.
A touch occurs when price enters the configured ATR/proximity threshold around the trendline. A bounce is confirmed after the required consecutive closes move away from the line by the bounce threshold, while a break requires consecutive closes beyond the line by the break threshold. Part 1 covers the lifecycle logic and implementation.
How do YOU define touch, bounce and break? Thank you.
Developing Smart Chart Objects in MQL5 (Part 1): Building a Stateful Trendline Management Framework
- 2026.08.21
- www.mql5.com
This article details a practical framework for converting MetaTrader 5 trendlines from static drawings into managed runtime entities. It covers object discovery, event-driven synchronization of user edits, and confirmation logic based on ATR multipliers and closed candles. A central manager coordinates multiple lines and updates their visual state. Readers can implement consistent, extensible rules for detecting proximity, validating bounces, and confirming breakouts.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Developing Smart Chart Objects in MQL5 (Part 2): Automating Trendline Discovery and Lifecycle Management.
Learn how Smart Trendline Manager separates creation from lifecycle control while handling both manual and auto-generated trendlines. It demonstrates discovery, registration, proximity and touch handling, bounce/break confirmation, post-break resurrection, expiration, and state-driven visualization. This gives you a consistent, configurable way to manage multiple lines through one orchestrated update process.
A trendline can now enter the framework in two ways. It can be drawn manually by the user, or it can be generated automatically from market structure. Although the entry paths are different, both eventually converge into the same management system. This distinction introduces two separate responsibilities. Registration and ownership handle the transition from a chart object to a managed object. Lifecycle management then takes over. It handles proximity, touches, bounces, breaks, resurrection, expiration, and the related state transitions.
The architecture can be viewed through a simple flow.
Author: Francis Nyoike Thumbi