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

Formation Defined Moving Support and ResistanceThe script was originally coded in 2018 with Pine Script version 3, and it was in protected code status. It has been updated and optimised for Pine Script v5 and made completely open source.
The Formation Defined Moving Support and Resistance indicator is a sophisticated tool for identifying dynamic support and resistance levels based on specific price formations and level interactions. This indicator goes beyond traditional static support and resistance by updating levels based on predefined formation patterns and market behaviour, providing traders with a more responsive view of potential support and resistance zones.
Features:
The indicator detects essential price levels:
Lower Low (LL)
Higher Low (HL)
Higher High (HH)
Lower High (LH)
Equal Lower Low (ELL)
Equal Higher Low (EHL)
Equal Higher High (EHH)
Equal Lower High (ELH)
By identifying these key points, the script builds a foundation for tracking and responding to changes in price structure.
Pre-defined Formations and Comparisons:
The indicator calculates and recognises nine different pre-defined formations, such as bullish and bearish formations, based on the sequence of price levels.
These formations are compared against previous levels and formations, allowing for a sophisticated understanding of recent market movements and momentum shifts.
This formation-based approach provides insights into whether the price is likely to maintain, break, or reverse key levels.
Dynamic Support and Resistance Levels:
The indicator offers an option to toggle Moving Support and Resistance Levels.
When enabled, the support and resistance levels dynamically adjust:
Upon a change in the detected formation.
When the bar’s closing price breaks the last defined support or resistance level.
This feature ensures that the support and resistance levels adapt quickly to market changes, giving a more accurate and responsive perspective.
Customisable Price Source:
Users can choose the price source for level detection, selecting between close or high/low prices.
This flexibility allows the indicator to adapt to different trading styles, whether the focus is on closing prices for more conservative levels or on highs and lows for more sensitive level tracking.
This indicator can benefit traders relying on dynamic support and resistance rather than fixed, historical levels. It adapts to recent price actions and market formations, making it useful for identifying entry and exit points, trend continuation or reversal, and setting trailing stops based on updated support and resistance levels.
Indicator

Sniffer
╭━━━╮╱╱╱╱╭━╮╭━╮
┃╭━╮┃╱╱╱╱┃╭╯┃╭╯
┃╰━━┳━╮╭┳╯╰┳╯╰┳━━┳━╮
╰━━╮┃╭╮╋╋╮╭┻╮╭┫┃━┫╭╯
┃╰━╯┃┃┃┃┃┃┃╱┃┃┃┃━┫┃
╰━━━┻╯╰┻╯╰╯╱╰╯╰━━┻╯
Overview
A vast majority of modern data analysis & modelling techniques rely upon the idea of hidden patterns, wether it is some type of visualisation tool or some form of a complex machine learning algorithm, the one thing that they have in common is the belief, that patterns tell us what’s hidden behind plain numbers. The same philosophy has been adopted by many traders & investors worldwide, there’s an entire school of thought that operates purely based on chart patterns. This is where Sniffer comes in, it is a tool designed to simplify & quantify the job of pattern recognition on any given price chart, by combining various factors & techniques that generate high-quality results.
This tool analyses bars selected by the user, and highlights bar clusters on the chart that exhibit similar behaviour across multiple dimensions. It can detect a single candle pattern like hammers or dojis, or it can handle multiple candles like morning/evening stars or double tops/bottoms, and many more. In fact, the tool is completely independent of such specific candle formations, instead, it works on the idea of vector similarity and generates a degree of similarity for every single combination of candles. Only the top-n matches are highlighted, users get to choose which patterns they want to analyse and to what degree, by customising the feature-space.
Background
In the world of trading, a common use-case is to scan a price chart for some specific candlestick formations & price structures, and then the chart is further analysed in reference to these events. Traders are often trying to answer questions like, when was the last time price showed similar behaviour, what are the instances similar to what price is doing right now, what happens when price forms a pattern like this, what were some of other indicators doing when this happened last(RSI, CCI, ADX etc), and many other abstract ideas to have a stronger confluence or to confirm a bias.Having such a context can be vital in making better informed decisions, but doing this manually on a chart that has thousands of candles can have many disadvantages. It’s tedious, human errors are rather likely, and even if it’s done with pin-point accuracy, chances are that we’ll miss out on many pieces of information. This is the thought that gave birth to Sniffer .
Sniffer tries to provide a general solution for pattern-based analysis by deploying vector-similarity computation techniques, that cover the full-breadth of a price chart and generate a list of top-n matches based on the criteria selected by the user. Most of these techniques come from the data science space, where vector similarity is often implemented to solve classification & clustering problems. Sniffer uses same principles of vector comparison, and computes a degree of similarity for every single candle formation within the selected range, and as a result generates a similarity matrix that captures how similar or dissimilar a set of candles is to the input set selected by the user.
How It Works
A brief overview of how the tool is implemented:
- Every bar is processed, and a set of features are mapped to it.
- Bars selected by the user are captured, and saved for later use.
- Once the all the bars have been processed, candles are back-tracked and degree of similarity is computed for every single bar(max-limit is 5000 bars).
- Degree of similarity is computed by comparing attributes like price range, candle breadth & volume etc.
- Similarity matrix is sorted and top-n results are highlighted on the chart through boxes of different colors.
A brief overview of the features space for bars:
- Range: Difference between high & low
- Body: Difference between close & open
- Volume: Traded volume for that candle
- Head: Upper wick for green candles & lower wick for red candles
- Tail: Lower wick for green candles & upper wick for red candles
- BTR: Body to Range ratio
- HTR: Head to Range ratio
- TTR: Tail to Range ratio
- HTB: Head to Body ratio
- TTB: Tail to Body ratio
- ROC: Rate of change for HL2 for four different periods
- RSI: Relative Strength Index
- CCI: Commodity Channel Index
- Stochastic: Stochastic Index
- ADX: DMI+, DMI- & ADX
A brief overview of how degree of similarity is calculated:
- Each bar set is compared to the inout bar set within the selected feature space
- Features are represented as vectors, and distance between the vectors is calculated
- Shorter the distance, greater the similarity
- Different distance calculation methods are available to choose from, such as Cosine, Euclidean, Lorentzian, Manhattan, & Pearson
- Each method is likely to generate slightly different results, users are expected to select the method & the feature space that best fits their use-case
How To Use It
- Usage of this tool is relatively straightforward, users can add this indicator to their chart and similar clusters will be highlighted automatically
- Users need to select a time range that will be treated as input, and bars within that range become the input formation for similarity calculations
- Boxes will be draw around the clusters that fit the matching criteria
- Boxes are color-coded, green color boxes represent the top one-third of the top-n matches, yellow boxes represent the middle third, red boxes are for bottom third, and white box represents user-input
- Boxes colors will be adjusted as you adjust input parameters, such as number of matches or look-back period
User Settings
Users can configure the following options:
- Select the time-range to set input bars
- Select the look-back period, number of candles to backtrack for similarity search
- Select the number of top-n matches to show on the chart
- Select the method for similarity calculation
- Adjust the feature space, this enables addition of custom features, such as pattern recognition, technical indicators, rate of change etc
- Toggle verbosity, shows degree of similarity as a percentage value inside the box
Top Features
- Pattern Agnostic: Designed to work with variable number of candles & complex patterns
- Customisable Feature Space: Users get to add custom features to each bar
- Comprehensive Comparison: Generates a degree of similarity for all possible combinations
Final Note
- Similarity matches will be shown only within last 4500 bars.
- In theory, it is possible to compute similarity for any size candle formations, indicator has been tested with formations of 50+ candles, but it is recommended to select smaller range for faster & cleaner results.
- As you move to smaller time frames, selected time range will provide a larger number of candles as input, which can produce undesired results, it is advised to adjust your selection when you change time frames. Seeking suggestions on how to directly receive bars as user input, instead of time range.
- At times, users may see array index out of bound error when setting up this indicator, this generally happens when the input range is not properly configured. So, it should disappear after you select the input range, still trying to figure out where it is coming from, suggestions are welcome.
Credits
- @HeWhoMustNotBeNamed for publishing such a handy PineScript Logger, it certainly made the job a lot easier. Indicator
