File Includes: Indicator - Zig Zag
Category: Indicator > Swing Identificator
The ZigZag indicator finds Swing Highs and Swing Lows. A Swing High is a high higher than the highs before and after it; a swing low is a low lower than the lows before and after it. The color and weight of the lines drawn with this indicator may be adjusted by editing the properties of the indicator.
The Zig Zag indicator is used primarily to help you see changes by punctuating the most significant reversals.
It is very important to understand that the last "leg" displayed in a Zig Zag chart can change based on changes in the underlying plot (e.g., prices). This is the only indicator in this book where a change in the security's price can change a previous value of the indicator.
Since the Zig Zag indicator can adjust its values based on subsequent changes in the underlying plot, it has perfect hindsight into what prices have done. Please don't try to create a trading system based on the Zig Zag indicator - its hindsight is much better than its foresight!
IF SWITCH = 0 THEN BEGIN
IF HIGH > HIGH AND HIGH > HIGH THEN BEGIN
SWITCH = 1;
IF SWITCH = 1 THEN BEGIN
IF LOW < LOW AND LOW < LOW THEN BEGIN
SWITCH = 0;