Tools
True Zig Zag
A study you add to a chart. Ready-made charts are in the chartbook shop.
Description
The built-in Sierra Chart Zig Zag repaints. Its latest swing is still being adjusted, yet it is written in the same way as swings that are already finished. As price continues, that swing can move, change price, or be removed. A custom formula or an automated strategy then reads a value that was not final, and the historical record no longer matches what was present when the bar closed.
True Zig Zag was written for that problem. A developing swing is kept apart from finished swings and is not treated as formed until price reverses by the configured amount. When a closed bar reaches that amount, the swing is locked. Subgraph values on a closed bar are not changed afterward.
The solid line shows finished swings. The dashed line shows the swing in progress, from the last locked pivot to the current extreme. The horizontal line marks the price required to lock that extreme. A high in progress places that line below the extreme. A low in progress places it above. If price extends the extreme, both lines move with it. After the swing locks, a new dashed swing begins in the opposite direction.
Key Notes
- Confirmation occurs on bar close. The forming bar moves the dashed line only when Update Developing Leg Intrabar is enabled.
- A locked pivot is not moved, resized, or deleted.
- The horizontal price uses the same reversal amount as the swing. No separate distance is used.
- Reset At Session Start discards the unfinished swing at the new session. Locked swings remain.
- Last Swing, Unconfirmed Swing, and Projection Price are recorded on each closed bar and are not revised. A value of 0 means none is available yet.
Important Inputs
| Input | What it does |
|---|---|
| Reversal Mode | Percentage or Ticks. It starts on Percentage. Percentage uses Reversal Percent of the extreme. Ticks uses Reversal Ticks times the symbol tick size. |
| Reversal Percent | The reversal distance as a percent of the extreme. It starts at 0.5, which is a move of 0.5 percent. The range is 0 to 100. This is used when Reversal Mode is Percentage. |
| Reversal Ticks | The reversal distance in ticks of the chart symbol. It starts at 10. The range is 0 to 1000000. This is used when Reversal Mode is Ticks. |
| Minimum Bars Between Pivots | How many bars must sit between one pivot and the next. It starts at 0, which allows every reversal. A reversal closer than this to the previous pivot is ignored. |
| Show Confirmed Line | The confirmed zig zag. It starts on Yes. This, the developing leg, and the projection can each be hidden on its own. |
| Show Developing Leg | The dashed leg that follows the unconfirmed extreme. It starts on Yes. |
| Show Projection | The price that must print to confirm the current extreme. It follows the developing leg only. It starts on Yes. |