ZigZag Redraw Monitor
- Indicatori
- Sergei Ivashko
- Versione: 1.1
The indicator calculates ZigZag using the classic algorithm with three parameters: Depth, Deviation, and Backstep. Its main function is detecting and visualizing repaints — moments when the last ZigZag point shifts to a new bar.
Upon loading, the indicator performs a simulation over the specified history depth. The algorithm sequentially recalculates ZigZag for each bar, comparing the current position of the last point with the previous one. If a shift is detected, a repaint line appears on the chart connecting the old and new extremum positions.
After simulation completes, the indicator switches to monitoring mode: each new tick is checked for repaint of the last point. An alert can be triggered upon detection.
Key Features
• Historical simulation with adjustable depth to find past repaints
• Real-time repaint tracking with optional alert
• Visualization of each repaint with a line on the chart
• Statistics: total repaint count, separate counts for High and Low
• Repaint percentage calculation relative to total ZigZag points
• Interactive control panel with parameter changes without reloading
• Settings persistence between sessions via terminal global variables
• Proper operation in strategy tester visual mode
Key Parameters
Depth — extremum search depth. Determines the minimum number of bars to form a ZigZag point. Default value: 12.
Deviation — deviation in points. Minimum price change to confirm a new extremum. Default value: 5.
Backstep — minimum number of bars between adjacent extremums. Default value: 3.
History — history analysis depth in bars. Determines how many bars will be simulated to find past repaints. Default value: 500.
Show Redraws — display repaint lines on the chart. Can be disabled for cleaner visualization while keeping statistics.
Save All — repaint saving mode. When enabled, all detected repaints are saved. When disabled, only the last one is displayed.
Alert — enable alerts when a repaint is detected in real time.
Additional Information
The control panel allows changing all ZigZag parameters and tracking settings directly from the chart. The +/- buttons change values with automatic recalculation. Toggle buttons control display modes and alerts. The Reset button returns all parameters to default values.
Upon loading, the indicator performs a simulation over the specified history depth. The algorithm sequentially recalculates ZigZag for each bar, comparing the current position of the last point with the previous one. If a shift is detected, a repaint line appears on the chart connecting the old and new extremum positions.
After simulation completes, the indicator switches to monitoring mode: each new tick is checked for repaint of the last point. An alert can be triggered upon detection.
Key Features
• Historical simulation with adjustable depth to find past repaints
• Real-time repaint tracking with optional alert
• Visualization of each repaint with a line on the chart
• Statistics: total repaint count, separate counts for High and Low
• Repaint percentage calculation relative to total ZigZag points
• Interactive control panel with parameter changes without reloading
• Settings persistence between sessions via terminal global variables
• Proper operation in strategy tester visual mode
Key Parameters
Depth — extremum search depth. Determines the minimum number of bars to form a ZigZag point. Default value: 12.
Deviation — deviation in points. Minimum price change to confirm a new extremum. Default value: 5.
Backstep — minimum number of bars between adjacent extremums. Default value: 3.
History — history analysis depth in bars. Determines how many bars will be simulated to find past repaints. Default value: 500.
Show Redraws — display repaint lines on the chart. Can be disabled for cleaner visualization while keeping statistics.
Save All — repaint saving mode. When enabled, all detected repaints are saved. When disabled, only the last one is displayed.
Alert — enable alerts when a repaint is detected in real time.
Additional Information
The control panel allows changing all ZigZag parameters and tracking settings directly from the chart. The +/- buttons change values with automatic recalculation. Toggle buttons control display modes and alerts. The Reset button returns all parameters to default values.
