Simple ZigZag - MetaTrader 5 Script - MQL5 #15970 - MT4/MT5 Resources


A simplified version of the popular ZigZag indicator. This algorithm runs significantly faster, uses no intermediate calculation buffers, contains no nested loops, and therefore does not redraw itself. This indicator has only one parameter that needs to be configured, which is very important in the optimization process of the intelligent trading system based on it.
Automation of many graphical structures, including simple graphical structures such as channels, trends (higher highs/lower lows) or Fibonacci grids, requires the definition of "fine movements" where price moves from a local minimum to a local maximum and from a local maximum to a local minimum.
The ZigZag indicator included in the standard MetaTrader delivery set effectively solves this task.
However, the traditional zigzag has many disadvantages.
With all this in mind, I developed a simpler algorithm to define fine movements.
proposed algorithm

This indicator solves the task visually by highlighting local maxima and minima and plotting the fine transitions between them.

This tool allows you to develop simple EAs based on Fibonacci corrections. One of the provided screenshots shows clearly discernible trends and corrective movements, which are crucial for developing EAs using Fibonacci corrections.
Attachment download
📎 simplezigzag.mq5 (6.19 KB)
Source: MQL5 #15970
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •