Another ZigZag, yes...
I believe though this concerns another angle/principle, therefore I wanted to share
How does it work?
Given:
Let's say this is the latest found 'lower low' (LL - blue dot under bar):

This bar has been triggered because 3 bars closed under low of previous 'trigger bar' (TB )

The high and low of this new TB will act as triggers
(aqua blue lines, seen in image above)
Then there are 2 options:
- again 3 bars closes under the latest TB , in that case the TB moves to that new LL.
- 3 bars closes higher than the high of previous TB

The high and low of this new TB act again as trigger

If a new TB LL/HH is found, the script checks previous LL/HH
and searches the highest/lowest point in between.
If necessary, the temporary highest/lowest will be adjusted:

Another example:


The last 2 points can change (repaint).
Yellow coloured lines/labels are set and won't change anymore.
Concluded:
In case of these settings:
*source for level breach -> close
*X breaches -> 3
once a new TB is found, the high and low act as trigger lines
- when 3 bars closes under that low, a new LL is found, this will be the new TB
- when 3 bars closes above that high, a new HH is found, this will be the new TB
and so on...
Settings:
This ZZ can be used for Harmonic patterns, Trend evaluation, support/resistance,...

In this script, I also used new features
- text_font_family = font.family_monospace -> link
- display=display.pane -> link
Cheers!
I believe though this concerns another angle/principle, therefore I wanted to share
How does it work?
Given:
- source for level breach -> close
- X breaches -> 3
Let's say this is the latest found 'lower low' (LL - blue dot under bar):
This bar has been triggered because 3 bars closed under low of previous 'trigger bar' (TB )
The high and low of this new TB will act as triggers
(aqua blue lines, seen in image above)
Then there are 2 options:
- again 3 bars closes under the latest TB , in that case the TB moves to that new LL.
- 3 bars closes higher than the high of previous TB
The high and low of this new TB act again as trigger
If a new TB LL/HH is found, the script checks previous LL/HH
and searches the highest/lowest point in between.
If necessary, the temporary highest/lowest will be adjusted:
Another example:
The last 2 points can change (repaint).
Yellow coloured lines/labels are set and won't change anymore.
Concluded:
In case of these settings:
*source for level breach -> close
*X breaches -> 3
once a new TB is found, the high and low act as trigger lines
- when 3 bars closes under that low, a new LL is found, this will be the new TB
- when 3 bars closes above that high, a new HH is found, this will be the new TB
and so on...
Settings:
- source for level breach -> close or high/low - H/L
- X breaches -> 1 -> 10
- line style -> solid, dotted, dashed
- show level breaches -> new found TB (blue/lime coloured)
- show Support/Resistance (lines at the right)
- repaint warning can be removed
- show labels/lines
This ZZ can be used for Harmonic patterns, Trend evaluation, support/resistance,...
In this script, I also used new features
- text_font_family = font.family_monospace -> link
- display=display.pane -> link
Cheers!
Informacje o Wersji
Added extra prevention of repaint (yellow lines/labels), using barstate.isconfirmedThank you neviswealth for making me aware 🙏🏻
Informacje o Wersji
Added "line color" option Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Who are PineCoders?
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Who are PineCoders?
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.