Donchian Zig-Zag

The following indicator returns a line bouncing of the extremities of a Donchian channel, with the aim of replicating a "zig-zag" indicator. The indicator can both be lagging or lagging depending on the settings user uses.

Various extended lines are displayed in order to see if the peaks and troughs made by the Donchian zig-zag can act as potential support/resistance lines.

User Settings

  • Length : Period of the Donchian channel indicator, higher values will return fewer changes of directions from the zig-zag line
  • Bounce Speed : Determine the speed of bounces made by the zig-zag line, with higher values making the zig-zag line converge faster toward the extremities of the Donchian channel.
  • Gradient : Determine whether to use a gradient to color the area between each Donchian channel extremities, "On" by default.
  • Transparency : Transparency of the area between each Donchian channel extremities.


It is clear that this is not a very common indicator to see, as such usages can be limited and very hypothetical. Nonetheless, when a bounce speed value of 1 is used, the zig-zag line will have the tendency to lag behind the price, and as such can provides crosses with the prices which can provide potential entries.

The advantage of this approach against most indicators relying on crosses with the price is that the linear nature of the indicator allows avoiding retracements, thus potentially holding a position for the entirety of the trend.

Altho this indicator would not necessarily be the most adapted to this kind of usage.

When using a bounce speed superior to 1, we can see the predictive aspects of the indicator:

We can link the peaks/troughs made by the zig-zag with the precedent ones made to get potential support and resistance lines, while such a method is not necessarily accurate it still allows for an additional to interpret the indicator.


We presented an indicator aiming to replicate the behaviour of a zig-zag indicator. While somehow experimental, it has the benefits of being innovative and might inspire users in one way or another.
הערות שחרור: Updated Creative Commons License.
סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר סקריפט זה פרסם אותו עם קוד פתוח, כך שסוחרים יוכלו להבין ולאמת זאת. הידד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום הנו בכפוף ל כללי הבית . אתה יכול להגדירו כמועדף ולהשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?
Our Website to get access to our invite-only scripts:

Lux Algo Documentation:

Join our Discord Group:


+3 השב
I really love this.. great idea!
let's see if I can use this as a base to add Fib retracement conditions to the zig zag.
+6 השב
Great idea, thanks!
+3 השב
LuxAlgo Pratik_4Clover
@Pratik_4Clover, Cheers!
+1 השב
This is absolutely glorious, and congrats on the pick!
+2 השב
This publication is now featured in our Editors' Picks: .
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
+2 השב
Very unique idea for interpret in a different idea; Keep it up mate <3
+2 השב
Bravo! I am impressed with the result.
+2 השב
בית סורק מניות סורק מט"ח סורק מטבעות-קריפטו יומן כלכלי איך זה עובד‏ תכונות גרף מחירון הפנה חבר כללי הבית מרכז תמיכה כלים לאתרים וברוקרים יישומונים פתרונות גרפיים ספריית גרפים קלי משקל בלוג וחדשות טוויטר‏
פרופיל הגדרות פרופיל חשבון וחיוב חברים מופנים מטבעות לשוניות התמיכה שלי מרכז תמיכה הודעות פרטיות צ'אט התנתק