XauLabs Swing PointsENGLISH
What it does
It marks confirmed swing highs and swing lows, labels each one relative to the previous one of the same type — HH, HL, LH, LL — and connects them with a zigzag. That labelled sequence is the raw material of every structure-based method: HH + HL is the skeleton of an uptrend, LH + LL the skeleton of a downtrend, anything mixed is no man's land.
How it works (full method)
Confirmation. A swing high is confirmed only when the highs of the N bars before AND the N bars after are all lower (mirrored for swing lows). N is user-defined, default 7, range 5–21.
Labelling. On confirmation, the new swing high is compared to the previous confirmed swing high: higher gives HH, lower gives LH. The first one, with no predecessor, is labelled H. Swing lows are compared to previous swing lows: HL or LL, first one labelled L. Highs are never compared to lows.
Zigzag. Each confirmed pivot is joined to the previous confirmed pivot by a straight line, regardless of type. The result is the chart's skeleton with the intermediate noise removed.
Two levels of structure. Major structure uses the main sensitivity and is the default view. An optional minor structure, with its own smaller sensitivity (default 3), plots the internal waves inside each major leg. It is off by default: the skeleton first, the ripples afterwards. Reading a minor swing as if it were a major one is the most common way to end up flipping bias several times a day.
No repainting
Labels appear N bars after the extreme they mark, are drawn at the true historical position of that extreme, and never move or disappear afterwards. What history shows is what would have been visible live. The confirmation delay is the cost, and it is stated rather than hidden.
On-chart output
HH / HL / LH / LL labels on every confirmed major pivot.
Zigzag connecting major pivots.
Optional minor pivot dots.
A badge in the top-right corner showing the two most recent readings, with selectable text size.
Two alert conditions: major swing high confirmed, major swing low confirmed.
Suggested use
Start on H4. Read the badge: HH · HL means the bullish skeleton is intact. Structure has to be read on one sensitivity, applied consistently — not on whichever swing supports the trade you already want to take.
This is an educational structure-reading tool. It gives no buy or sell signals and makes no performance claim. Trading involves substantial risk of loss.
FRANÇAIS
Ce que fait l'indicateur
Il marque les sommets et creux de swing confirmés, étiquette chacun par rapport au précédent du même type — HH, HL, LH, LL — et les relie par un zigzag. Cette séquence étiquetée est la matière première de toute méthode structurelle : HH + HL forme le squelette d'une tendance haussière, LH + LL celui d'une tendance baissière, tout ce qui est mixte est une zone grise.
Comment il fonctionne (méthode complète)
Confirmation. Un sommet n'est confirmé que si les N bougies avant ET les N bougies après ont toutes un plus haut inférieur (symétrique pour les creux). N est réglable, 7 par défaut, plage 5–21.
Étiquetage. À la confirmation, le nouveau sommet est comparé au sommet confirmé précédent : plus haut donne HH, plus bas donne LH. Le premier, sans prédécesseur, est étiqueté H. Les creux sont comparés aux creux : HL ou LL, le premier étiqueté L. Un sommet n'est jamais comparé à un creux.
Zigzag. Chaque pivot confirmé est relié au pivot confirmé précédent par une droite, quel que soit son type. On obtient le squelette du graphique, débarrassé du bruit intermédiaire.
Deux niveaux de structure. La structure majeure utilise la sensibilité principale : c'est la vue par défaut. Une structure mineure optionnelle, avec sa propre sensibilité plus courte (3 par défaut), trace les vagues internes de chaque jambe majeure. Elle est désactivée par défaut : le squelette d'abord, les vagues ensuite. Lire un swing mineur comme s'il était majeur est la façon la plus courante de changer de biais cinq fois par jour.
Aucun repaint
Les étiquettes apparaissent N bougies après l'extrême qu'elles marquent, sont tracées à la vraie place historique de cet extrême, et ne bougent ni ne disparaissent ensuite. Ce que montre l'historique est ce qui aurait été visible en direct. Le délai de confirmation est le prix à payer, et il est affiché plutôt que masqué.
Affichage
Étiquettes HH / HL / LH / LL sur chaque pivot majeur confirmé.
Zigzag reliant les pivots majeurs.
Points de pivots mineurs, optionnels.
Un badge dans le coin supérieur droit affichant les deux dernières lectures, avec taille de texte réglable.
Deux conditions d'alerte : sommet majeur confirmé, creux majeur confirmé.
Utilisation suggérée
Commencer en H4. Lire le badge : HH · HL signifie que le squelette haussier est intact. La structure se lit sur une seule sensibilité, appliquée avec constance — pas sur le swing qui arrange le trade qu'on a déjà envie de prendre.
Outil éducatif de lecture de structure. Il ne donne aucun signal d'achat ou de vente et ne formule aucune promesse de performance. Le trading comporte un risque de perte important. Indicator

XauLabs Trend & Range**ENGLISH**
**What it does**
This indicator answers one question, and only one: is the market currently trending up, trending down, or ranging? It reads pure price structure — confirmed swing highs and swing lows — and states a verdict on the chart.
**How it works (full method)**
1. **Swing detection.** A swing high is confirmed only when the highs of the N bars before AND the N bars after are all lower (mirrored for swing lows). N is user-defined, default 7, range 5–21. Confirmation therefore arrives N bars after the actual extreme; the marker is then plotted at its true historical position and never moves again.
2. **Memory.** The script keeps the last two confirmed highs and the last two confirmed lows.
3. **Classification.**
- Uptrend: last high > previous high AND last low > previous low.
- Downtrend: last high < previous high AND last low < previous low.
- Range: anything else, including any state with fewer than two confirmed highs and two confirmed lows.
4. **Close-based invalidation** (optional, on by default). Any bar closing below the last confirmed swing low arms an invalidation flag. While that flag is armed, no uptrend is displayed: the state is forced to Range, even if the swing sequence otherwise qualifies as higher highs and higher lows. The flag is cleared only when a new swing low is confirmed. The logic is mirrored for downtrends, using a close above the last confirmed swing high. Wicks piercing the level do not count — only the close does. This mechanism can only suppress a trend reading, never create one: a trend must always earn its own structure.
**Why the delay is deliberate**
Signals never appear and later vanish. What the history shows is what would have been visible live. The cost is the N-bar confirmation delay, and it is stated openly rather than hidden behind a repainting display.
**On-chart output**
- Background tint: green uptrend, red downtrend, grey range.
- Triangles marking each confirmed swing high and low.
- A two-line state badge in the top-right corner, with selectable size and language (EN/FR).
- One alert condition: state change.
**Suggested use**
Start on H4. When the state reads Range, trend-following setups are structurally out of place — the indicator is meant to be used as a context filter before any entry logic, not as an entry trigger itself. The lower the sensitivity value, the faster and noisier the reading; the higher, the slower and more stable.
**Originality**
Most trend tools average price (moving averages, oscillators) and therefore lag by construction. This one reads structure only, applies a strict non-repainting confirmation rule, and adds a close-based invalidation layer so that a broken structure is downgraded to Range immediately rather than after the next swing forms. Open source: every rule above is verifiable line by line in the code.
This is an educational structure-reading tool. It gives no buy or sell signals and makes no performance claim. Trading involves substantial risk of loss.
---
**FRANÇAIS**
**Ce que fait l'indicateur**
Il répond à une seule question : le marché est-il en tendance haussière, baissière, ou en range ? Il lit la structure pure du prix — sommets et creux confirmés — et affiche son verdict.
**Comment il fonctionne (méthode complète)**
1. **Détection des pivots.** Un sommet n'est confirmé que si les N bougies avant ET les N bougies après ont toutes un plus haut inférieur (symétrique pour les creux). N est réglable, 7 par défaut, plage 5–21. La confirmation arrive donc N bougies après l'extrême réel ; le marqueur est ensuite tracé à sa vraie place historique et ne bouge plus jamais.
2. **Mémoire.** Le script conserve les deux derniers sommets et les deux derniers creux confirmés.
3. **Classification.**
- Hausse : dernier sommet > précédent ET dernier creux > précédent.
- Baisse : dernier sommet < précédent ET dernier creux < précédent.
- Range : tout le reste, y compris tant que moins de deux sommets et deux creux sont confirmés.
4. **Invalidation en clôture** (optionnelle, active par défaut). Toute bougie qui clôture sous le dernier creux confirmé arme une invalidation. Tant qu'elle est armée, aucune tendance haussière n'est affichée : l'état reste Range, même si la séquence de pivots remplit par ailleurs la condition sommets et creux ascendants. L'invalidation ne se désarme qu'à la confirmation d'un nouveau creux. Le mécanisme est symétrique en tendance baissière, avec une clôture au-dessus du dernier sommet confirmé. Une mèche qui perce le niveau ne suffit pas — seule la clôture compte. Ce mécanisme peut uniquement supprimer une lecture de tendance, jamais en créer une : une tendance doit toujours prouver sa propre structure.
**Pourquoi le délai est assumé**
Aucun signal n'apparaît puis ne disparaît. Ce que montre l'historique est ce qui aurait été visible en direct. La contrepartie est le délai de confirmation de N bougies, affiché ouvertement plutôt que masqué derrière un affichage qui se repeint.
**Affichage**
- Fond teinté : vert en hausse, rouge en baisse, gris en range.
- Triangles marquant chaque sommet et creux confirmé.
- Un badge d'état à deux lignes dans le coin supérieur droit, avec taille et langue (EN/FR) réglables.
- Une condition d'alerte : changement d'état.
**Utilisation suggérée**
Commencer en H4. Quand l'état affiche Range, les setups de suivi de tendance sont structurellement hors sujet — l'indicateur est conçu comme un filtre de contexte en amont d'une logique d'entrée, pas comme un déclencheur d'entrée. Plus la sensibilité est basse, plus la lecture est rapide et bruitée ; plus elle est haute, plus elle est lente et stable.
**Originalité**
La plupart des outils de tendance moyennent le prix (moyennes mobiles, oscillateurs) et retardent par construction. Celui-ci lit uniquement la structure, applique une règle de confirmation stricte sans repeinture, et ajoute une couche d'invalidation en clôture pour qu'une structure cassée redevienne Range immédiatement plutôt qu'au pivot suivant. Code ouvert : chaque règle ci-dessus est vérifiable ligne par ligne.
Outil éducatif de lecture de structure. Il ne donne aucun signal d'achat ou de vente et ne formule aucune promesse de performance. Le trading comporte un risque de perte important. Indicator

Mason’s Line IndicatorThe Macon Strategy is an idea conceived by Didier Darcet , co-founder of Gavekal Intelligence Software. Inspired by the Water Level, an instrument used by masons to check the horizontality or verticality of a wall. This method aims to measure the psychology of financial markets and determine if the market is balanced or tilting towards an unfavorable side, focusing on the behavioral risk of markets rather than economic or political factors.
The strategy examines the satisfaction and frustration of investors based on the distance between the low and high points of the market over a period of one year. Investor satisfaction is influenced by the current price of the index and the path taken to reach that price. The distance to the low point provides satisfaction, while the distance to the high point generates frustration. The balance between the two dictates investors’ desire to hold or sell their positions.
To refine the strategy, it is important to consider the opinion of a group of investors rather than just one individual. The members of a hypothetical investor club invest successively throughout the past year. The overall satisfaction of the market on a given day is a democratic expression of all participants.
If the overall satisfaction is below 50%, investors are frustrated and sell their positions. If it is above, they are satisfied and hold their positions. The position of the group of investors relative to the high and low points represents the position of the air bubble in the water level. Market performance is measured day by day based on participant satisfaction or dissatisfaction.
In conclusion, memory, emotions, and decision-making ability are closely linked, and their interaction influences investment decisions. The Macon Strategy highlights the importance of the behavioral dimension in understanding financial market dynamics. By studying investor behavior through this strategy, it is possible to better anticipate market trends and make more informed investment decisions.
Presentation of the Mason’s Line Indicator:
The main strategy of this indicator is to measure the average satisfaction of investors based on the position of an imaginary air bubble in a tube delimited by the market’s highs and lows over a given period. After calculating the satisfaction level, it is then normalized between 0 and 1, and a moving average can be used to visualize trends.
Key features:
Calculation of highs and lows over a user-defined period.
Determination of the position of the air bubble in the tube based on the closing price.
Calculation of the average satisfaction of investors over a selected period.
Normalization of the average satisfaction between 0 and 1.
Visualization of normalized or non-normalized average satisfaction levels, as well as their corresponding moving averages.
User parameters:
Period for min and max (days) : Sets the period over which highs and lows will be calculated (1 to 365 days).
Period for average satisfaction (days) : Determines the period over which the average satisfaction of investors will be calculated (1 to 365 days).
Period for SMA : Sets the period of the simple moving average used to smooth the data (1 to 1000 days).
Bubble_value : Adjustment of the air bubble value, ranging from 0 to 1, in increments of 0.025.
Normalized average satisfaction : Option to choose whether to display the normalized or non-normalized average satisfaction.
Please note that the Mason’s Line Indicator is not a guarantee of future market performance and should be used in conjunction with proper risk management. Always ensure that you have a thorough understanding of the indicator’s methodology and its limitations before making any investment decisions. Additionally, past performance is not indicative of future results.
Indicator
