OPEN-SOURCE SCRIPT
Market Structure HH/HL/LH/LL + MTF Trend Table

WHAT IT DOES
This indicator marks swing structure - higher highs, higher lows,
lower highs, lower lows - draws a horizontal level line from every
swing point, and adds a multi-timeframe trend table that stays
visible regardless of the chart's timeframe.
WHAT IS DIFFERENT ABOUT IT
Two design decisions set it apart from the usual structure scripts.
First, swings are detected on closing prices by default, not on
wicks. The structure drawn on a candle chart is therefore identical
to the structure of the same instrument's line chart. Most structure
tools read highs and lows, which means the picture changes the moment
you switch chart type. A wick-based mode is available as an option
for those who want it.
Second, the structure drawing is bound to the chart's own timeframe.
Every timeframe is enabled separately and carries its own maximum
line length in bars - 30 for weekly, 40 for daily, 200 for 4H by
default - so higher timeframe levels do not clutter an intraday
chart. The trend table is independent of that and always reports
weekly, daily and 4H no matter where you are.
HOW THE LEVELS BEHAVE
Each swing point receives a line that extends to the right until one
of two things happens: price closes through it, or the timeframe's
maximum bar count is reached. Breaks are evaluated on closed bars
only, so an intrabar spike that is reversed before the close does not
terminate a level.
Two optional filters change what stays on the chart:
Only unbroken levels - line and label are removed the moment a level
is crossed, leaving only the levels that have not been taken yet.
Only relevant points (enabled by default) - keeps every point of the
current trend leg. In an uptrend that means all HH and HL back to the
low the move originated from, including highs that have already been
broken. The whole set is cleared only when the trend reverses, and
collection then starts in the opposite direction.
THE TREND TABLE
Trend is derived from breaks of structure: a close above the last
swing high sets UP, a close below the last swing low sets DOWN.
Each row compares two states - the trend as of the last closed bar,
and the trend right now. While they agree the cell reads UP or DOWN.
When price is breaking the opposite level and the candle is still
open, the cell reads UP SWITCH DOWN in orange. If the bar closes that
way it becomes a plain DOWN on the next bar; if price recovers before
the close, the switch state disappears by itself and leaves no mark
in the history.
Weekly, daily and 4H are always present. Monthly, 1H, 30m, 15m, 5m
and 1m can be added individually. The table can sit in any of the
four corners, with an offset setting that keeps it clear of
PulseWire's own chart buttons.
SETTINGS - THE INTERFACE IS IN GERMAN
General (Allgemein)
Pivot: Bars links / rechts - pivot strength, bars left and right.
Left filters noise, right controls how quickly a point is
confirmed. They are deliberately separate.
Berechnungsbasis - calculation basis: Close (line chart) or
High/Low (wicks)
Nur relevante Punkte (aktueller Trendabschnitt) - only relevant
points (current trend leg)
Nur ungebrochene Level (gebrochene loeschen) - only unbroken
levels, delete broken ones
Sonst: Linie beim Kreuzen beenden - otherwise end the line at the
cross
Linien anzeigen / Labels anzeigen - show lines / show labels
Max. gespeicherte Strukturpunkte - maximum stored structure points
Structure timeframes (Struktur-Timeframes)
aktiv | max. Linienlaenge in Bars - active | maximum line length
in bars
Bars - bars
Sonstige TFs - other timeframes
Structure appearance (Darstellung Struktur)
Label HH / HL, Label LH / LL - label colors
Linienfarbe / Breite - line color / width
Linienstil - line style: Solide (solid), Gestrichelt (dashed),
Gepunktet (dotted)
Labelgroesse - label size: Winzig (tiny), Klein (small), Normal,
Gross (large)
Trend table (Trend-Tabelle)
Trend-Tabelle anzeigen - show trend table
Position - Links oben (top left), Rechts oben (top right),
Links unten (bottom left), Rechts unten (bottom right)
Abstand vom Rand (Leerzeilen) - offset from the corner, in empty
rows
Textgroesse - text size
Hintergrund - background color
NOTES AND LIMITATIONS
A swing point is confirmed only after the number of bars set under
"rechts" has closed. With the default of 1, the newest point on the
live bar can still move or disappear until that bar closes. This is
inherent to pivot detection rather than a defect. Raise the right
value if you need points to be final once printed.
Requesting a timeframe lower than the chart's for the trend table -
5m rows on a daily chart, for example - returns dependable data only
for the most recent value. Higher timeframes viewed from a lower
chart are not affected by this.
The indicator describes structure. It generates no entries, no
targets, no directional advice and makes no claim about profitability.
-- Deutsch --
Der Indikator markiert die Swing-Struktur (HH, HL, LH, LL), zieht von
jedem Punkt eine Levellinie nach rechts und zeigt eine
Multi-Timeframe-Trendtabelle, die auf jedem Chart-Zeitrahmen sichtbar
bleibt.
Die Pivots rechnen standardmaessig auf Schlusskursen statt auf Wicks.
Dadurch ist das Bild im Kerzenchart identisch mit dem Linienchart -
der Unterschied zu den meisten Struktur-Skripten, die auf Hoch und
Tief lesen. Die Struktur wird nur auf den Zeitrahmen gezeichnet, die
in den Einstellungen aktiv sind, jeweils mit eigener maximaler
Linienlaenge. Jede Linie endet beim Kreuzen oder beim Erreichen
dieser Laenge, wobei der Bruch nur auf geschlossenen Kerzen gewertet
wird.
Der Trend leitet sich aus dem Strukturbruch ab. Laeuft ein Bruch
gerade, ist die Kerze aber noch offen, steht in der Tabelle
UP SWITCH DOWN in Orange. Schliesst die Kerze so, wird daraus ein
sauberes DOWN, dreht der Kurs vorher zurueck, verschwindet der
Hinweis rueckstandsfrei.
Der Indikator beschreibt Struktur. Er liefert keine Einstiege, keine
Ziele und keine Richtungsempfehlung.
This indicator marks swing structure - higher highs, higher lows,
lower highs, lower lows - draws a horizontal level line from every
swing point, and adds a multi-timeframe trend table that stays
visible regardless of the chart's timeframe.
WHAT IS DIFFERENT ABOUT IT
Two design decisions set it apart from the usual structure scripts.
First, swings are detected on closing prices by default, not on
wicks. The structure drawn on a candle chart is therefore identical
to the structure of the same instrument's line chart. Most structure
tools read highs and lows, which means the picture changes the moment
you switch chart type. A wick-based mode is available as an option
for those who want it.
Second, the structure drawing is bound to the chart's own timeframe.
Every timeframe is enabled separately and carries its own maximum
line length in bars - 30 for weekly, 40 for daily, 200 for 4H by
default - so higher timeframe levels do not clutter an intraday
chart. The trend table is independent of that and always reports
weekly, daily and 4H no matter where you are.
HOW THE LEVELS BEHAVE
Each swing point receives a line that extends to the right until one
of two things happens: price closes through it, or the timeframe's
maximum bar count is reached. Breaks are evaluated on closed bars
only, so an intrabar spike that is reversed before the close does not
terminate a level.
Two optional filters change what stays on the chart:
Only unbroken levels - line and label are removed the moment a level
is crossed, leaving only the levels that have not been taken yet.
Only relevant points (enabled by default) - keeps every point of the
current trend leg. In an uptrend that means all HH and HL back to the
low the move originated from, including highs that have already been
broken. The whole set is cleared only when the trend reverses, and
collection then starts in the opposite direction.
THE TREND TABLE
Trend is derived from breaks of structure: a close above the last
swing high sets UP, a close below the last swing low sets DOWN.
Each row compares two states - the trend as of the last closed bar,
and the trend right now. While they agree the cell reads UP or DOWN.
When price is breaking the opposite level and the candle is still
open, the cell reads UP SWITCH DOWN in orange. If the bar closes that
way it becomes a plain DOWN on the next bar; if price recovers before
the close, the switch state disappears by itself and leaves no mark
in the history.
Weekly, daily and 4H are always present. Monthly, 1H, 30m, 15m, 5m
and 1m can be added individually. The table can sit in any of the
four corners, with an offset setting that keeps it clear of
PulseWire's own chart buttons.
SETTINGS - THE INTERFACE IS IN GERMAN
General (Allgemein)
Pivot: Bars links / rechts - pivot strength, bars left and right.
Left filters noise, right controls how quickly a point is
confirmed. They are deliberately separate.
Berechnungsbasis - calculation basis: Close (line chart) or
High/Low (wicks)
Nur relevante Punkte (aktueller Trendabschnitt) - only relevant
points (current trend leg)
Nur ungebrochene Level (gebrochene loeschen) - only unbroken
levels, delete broken ones
Sonst: Linie beim Kreuzen beenden - otherwise end the line at the
cross
Linien anzeigen / Labels anzeigen - show lines / show labels
Max. gespeicherte Strukturpunkte - maximum stored structure points
Structure timeframes (Struktur-Timeframes)
aktiv | max. Linienlaenge in Bars - active | maximum line length
in bars
Bars - bars
Sonstige TFs - other timeframes
Structure appearance (Darstellung Struktur)
Label HH / HL, Label LH / LL - label colors
Linienfarbe / Breite - line color / width
Linienstil - line style: Solide (solid), Gestrichelt (dashed),
Gepunktet (dotted)
Labelgroesse - label size: Winzig (tiny), Klein (small), Normal,
Gross (large)
Trend table (Trend-Tabelle)
Trend-Tabelle anzeigen - show trend table
Position - Links oben (top left), Rechts oben (top right),
Links unten (bottom left), Rechts unten (bottom right)
Abstand vom Rand (Leerzeilen) - offset from the corner, in empty
rows
Textgroesse - text size
Hintergrund - background color
NOTES AND LIMITATIONS
A swing point is confirmed only after the number of bars set under
"rechts" has closed. With the default of 1, the newest point on the
live bar can still move or disappear until that bar closes. This is
inherent to pivot detection rather than a defect. Raise the right
value if you need points to be final once printed.
Requesting a timeframe lower than the chart's for the trend table -
5m rows on a daily chart, for example - returns dependable data only
for the most recent value. Higher timeframes viewed from a lower
chart are not affected by this.
The indicator describes structure. It generates no entries, no
targets, no directional advice and makes no claim about profitability.
-- Deutsch --
Der Indikator markiert die Swing-Struktur (HH, HL, LH, LL), zieht von
jedem Punkt eine Levellinie nach rechts und zeigt eine
Multi-Timeframe-Trendtabelle, die auf jedem Chart-Zeitrahmen sichtbar
bleibt.
Die Pivots rechnen standardmaessig auf Schlusskursen statt auf Wicks.
Dadurch ist das Bild im Kerzenchart identisch mit dem Linienchart -
der Unterschied zu den meisten Struktur-Skripten, die auf Hoch und
Tief lesen. Die Struktur wird nur auf den Zeitrahmen gezeichnet, die
in den Einstellungen aktiv sind, jeweils mit eigener maximaler
Linienlaenge. Jede Linie endet beim Kreuzen oder beim Erreichen
dieser Laenge, wobei der Bruch nur auf geschlossenen Kerzen gewertet
wird.
Der Trend leitet sich aus dem Strukturbruch ab. Laeuft ein Bruch
gerade, ist die Kerze aber noch offen, steht in der Tabelle
UP SWITCH DOWN in Orange. Schliesst die Kerze so, wird daraus ein
sauberes DOWN, dreht der Kurs vorher zurueck, verschwindet der
Hinweis rueckstandsfrei.
Der Indikator beschreibt Struktur. Er liefert keine Einstiege, keine
Ziele und keine Richtungsempfehlung.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
