OPEN-SOURCE SCRIPT
Hopiplaka Goldbach Swings

Core Functionality
Swing Detection: Uses Left and Right Buffer inputs to identify pivot highs and lows using ta.pivothigh() and ta.pivotlow().
Three Reference Points: For every potential swing, it calculates:
Minute: minute(time)
Hour + Minute: hour(time) + minute(time)
|Hour - Minute|: abs(hour(time) - minute(time))
Goldbach/CE Master List: Checks all three references against the master list: 0, 3, 7, 11, 14, 17, 23, 29, 35, 41, 44, 47, 50, 53, 56, 59, 65, 71, 77, 83, 89, 97, 100.
Tolerance: A user-defined tolerance (0 or 1) allows for near-matches.
Display Rules
Conditional Labels: By default, labels only appear if at least one reference point matches a Goldbach number. I've added a toggle to show all swings in gray if you wish to see non-matching pivots.
Color Coding:
Green: Swing High with a Goldbach match.
Red: Swing Low with a Goldbach match.
Gray: Swings with no match (only if "Show All" is enabled).
Inverse Rule (> 60): If a matched Goldbach number is greater than 60, the label displays its complement to 100 (e.g., 89 is displayed as 11). The original reference value (e.g., 89) is still shown for context.
Usage Notes
The script is an overlay, meaning it draws directly on the price chart.
It uses the chart's current timezone to calculate hours and minutes.
You can adjust the Left/Right Buffer to fine-tune the "strength" of the swings (larger buffers result in fewer, more significant pivots)
Swing Detection: Uses Left and Right Buffer inputs to identify pivot highs and lows using ta.pivothigh() and ta.pivotlow().
Three Reference Points: For every potential swing, it calculates:
Minute: minute(time)
Hour + Minute: hour(time) + minute(time)
|Hour - Minute|: abs(hour(time) - minute(time))
Goldbach/CE Master List: Checks all three references against the master list: 0, 3, 7, 11, 14, 17, 23, 29, 35, 41, 44, 47, 50, 53, 56, 59, 65, 71, 77, 83, 89, 97, 100.
Tolerance: A user-defined tolerance (0 or 1) allows for near-matches.
Display Rules
Conditional Labels: By default, labels only appear if at least one reference point matches a Goldbach number. I've added a toggle to show all swings in gray if you wish to see non-matching pivots.
Color Coding:
Green: Swing High with a Goldbach match.
Red: Swing Low with a Goldbach match.
Gray: Swings with no match (only if "Show All" is enabled).
Inverse Rule (> 60): If a matched Goldbach number is greater than 60, the label displays its complement to 100 (e.g., 89 is displayed as 11). The original reference value (e.g., 89) is still shown for context.
Usage Notes
The script is an overlay, meaning it draws directly on the price chart.
It uses the chart's current timezone to calculate hours and minutes.
You can adjust the Left/Right Buffer to fine-tune the "strength" of the swings (larger buffers result in fewer, more significant pivots)
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.