Structure Ledger Pro Market Structure Alerts
- Indicators
-
Yuki Nakayama
I am Yuki, an independent developer in Japan. I build indicators and utilities for MetaTrader 5 and publish them here on the MQL5 Market. Every tool has a free edition, so you can see how it behaves on your own charts before you consider the paid one. - Version: 1.0
- Activations: 5
Structure Ledger PRO lays out confirmed swings and changes in structure, and shows where the current price sits within the range and against the higher timeframes. It works from bars that have already closed, is meant for traders who already have their own trading method, and shows no buy or sell arrows. BOS, CHoCH, confirmed swing highs and lows and the equal highs and lows where liquidity tends to rest are drawn exactly as in Structure Ledger. This edition adds sweep and reclaim marks, premium and discount, higher-timeframe structure, alerts, a CSV ledger of every mark and five buffers for your own EA.
How traders use it
Traders use it to read three things. The current direction comes from the last BOS or CHoCH, which the panel also shows. The two levels to watch are the last confirmed swing high and swing low: a close above the high or below the low gives the next BOS or CHoCH, and a wick through either does not count. The bands of equal highs and lows show where liquidity tends to rest, and the panel gives their distance from price in ATR. In this edition, alerts can tell you when a new BOS, CHoCH, sweep or reclaim is placed, so you do not have to watch the chart, and the CSV ledger and the five buffers let you test your own rules against what was known at each bar. Each swing is marked only once it is confirmed, one or more bars after the high or low formed, and a faint dotted line runs from the dot to the bar that confirmed it, so the chart shows when each swing became known, not only where it was. If you are looking for a tool that tells you when to buy or sell, this is not it.
The structure it draws
A small dot, the same colour for highs and lows, marks each confirmed swing on the bar where the high or low formed, and a faint dotted line runs from the dot to the bar that confirmed it; hovering over the dot shows the time of the swing, the time it was confirmed and the number of bars in between. A solid line with the word BOS runs from the broken swing to the bar that broke it; a dashed line with the word CHoCH marks the first break against the current direction. A thin, softly shaded band covers a cluster of equal highs (EQH) or equal lows (EQL). A swing is confirmed when a later bar closes having traded 2.0 x ATR14 away from it; BOS and CHoCH count the close only; a band appears once two confirmed swings gather within 0.5 x ATR. Up structure, down structure, liquidity and the swing dots each have an adjustable colour. It draws no order blocks, fair value gaps or kill zones, and shows no buy or sell arrows or exit levels. The dots, lines and words can be drawn behind the candles and behind other chart objects, such as another tool's trade panel (input Draw lines and labels in the background, off by default; this indicator's own panel stays in front). The panel can be switched off as well (input Show panel, on by default); the marks, alerts, ledger and buffers keep working, and to clear another tool's panel the two inputs are used together.
Sweeps and reclaims
When a wick trades through the outer edge of an equal-highs or equal-lows band, a light dot is placed on that edge at the bar that did it. If a later bar closes back inside the band within three bars, a short vertical line across the band marks the reclaim. Both marks are drawn in a neutral grey-blue rather than the up or down colour, because a sweep says where price went, not which way it will go next. Repeated sweeps of the same band are thinned to one dot every ten bars.
Premium and discount
The range between the last confirmed swing high and swing low is split at its middle: the upper half is shaded as premium, the lower half as discount, with a dashed line at 50 percent. It is a reference: the range is rebuilt when a new swing is confirmed, its right edge follows the newest bar, and it is not painted over a liquidity band.
Higher timeframes
Two higher timeframes (H4 and D1 by default) are read from their closed bars with the same rules; each must be above the chart's own timeframe. The level of the last BOS or CHoCH on each is drawn as a dotted line labelled [H4] or [D1], and the panel shows their structure direction. These lines are references that move when the higher timeframe confirms a new event, and they are not drawn in the Strategy Tester.
Alerts
BOS, CHoCH, sweep and reclaim can each send a popup, a push notification, an email or a sound, and an optional alert fires when price comes within 0.25 x ATR of a band, with a 60-minute cooldown and a limit of 50 a day by default. Alerts are sent only for marks placed on live bars, not for the marks redrawn when the indicator is attached, and the events of one bar go out as a single message per route. Popups are on by default; push, email and sound are off until you turn them on. The Alerts button on the panel opens a log of the last 20 alerts with the result of each push.
The ledger and buffers
Every mark is written as one row to a CSV file in MQL5\Files\StructureLedger, one file per symbol and timeframe: the kind of mark, its bar, level, origin, ATR, whether it was placed live or while rereading history, and the server time at which it was written. Re-attaching does not duplicate rows. Five buffers (direction, BOS or CHoCH, nearest equal highs above, nearest equal lows below, sweep or reclaim) can be read with iCustom; the value of a closed bar is written once and not rewritten.
Marks stay where they were placed
Every mark is placed only after its confirming bar has closed. In Strategy Tester replays (1-minute OHLC, default inputs) on GOLD M15 over four weeks and GOLD H1 and EURUSD H1 over two and a half weeks, no structure, sweep or reclaim mark placed on a closed bar was moved, recoloured or retitled as later bars arrived, and no closed-bar buffer value was rewritten. Those replays did not cover real ticks, live charts over longer periods, broker corrections of past bars or inputs other than the defaults. The premium and discount shading and the higher-timeframe lines are references and move by design, and the right edge of a live band follows the newest bar.
The chart keeps the latest 30 structure labels, 12 bands and 80 swing dots (adjustable); older ones drop off as new ones arrive. On attach it rereads the last 1500 closed bars (adjustable, the first 200 as warm-up).
What this tool is not
Structure Ledger PRO is an information tool. It does not tell you when or where to trade and makes no claim about results. It uses no DLL and makes no web requests; push and email go through the terminal's own settings, and it reads only the symbol of its own chart and that symbol's higher timeframes.
How traders use it
Traders use it to read three things. The current direction comes from the last BOS or CHoCH, which the panel also shows. The two levels to watch are the last confirmed swing high and swing low: a close above the high or below the low gives the next BOS or CHoCH, and a wick through either does not count. The bands of equal highs and lows show where liquidity tends to rest, and the panel gives their distance from price in ATR. In this edition, alerts can tell you when a new BOS, CHoCH, sweep or reclaim is placed, so you do not have to watch the chart, and the CSV ledger and the five buffers let you test your own rules against what was known at each bar. Each swing is marked only once it is confirmed, one or more bars after the high or low formed, and a faint dotted line runs from the dot to the bar that confirmed it, so the chart shows when each swing became known, not only where it was. If you are looking for a tool that tells you when to buy or sell, this is not it.
The structure it draws
A small dot, the same colour for highs and lows, marks each confirmed swing on the bar where the high or low formed, and a faint dotted line runs from the dot to the bar that confirmed it; hovering over the dot shows the time of the swing, the time it was confirmed and the number of bars in between. A solid line with the word BOS runs from the broken swing to the bar that broke it; a dashed line with the word CHoCH marks the first break against the current direction. A thin, softly shaded band covers a cluster of equal highs (EQH) or equal lows (EQL). A swing is confirmed when a later bar closes having traded 2.0 x ATR14 away from it; BOS and CHoCH count the close only; a band appears once two confirmed swings gather within 0.5 x ATR. Up structure, down structure, liquidity and the swing dots each have an adjustable colour. It draws no order blocks, fair value gaps or kill zones, and shows no buy or sell arrows or exit levels. The dots, lines and words can be drawn behind the candles and behind other chart objects, such as another tool's trade panel (input Draw lines and labels in the background, off by default; this indicator's own panel stays in front). The panel can be switched off as well (input Show panel, on by default); the marks, alerts, ledger and buffers keep working, and to clear another tool's panel the two inputs are used together.
Sweeps and reclaims
When a wick trades through the outer edge of an equal-highs or equal-lows band, a light dot is placed on that edge at the bar that did it. If a later bar closes back inside the band within three bars, a short vertical line across the band marks the reclaim. Both marks are drawn in a neutral grey-blue rather than the up or down colour, because a sweep says where price went, not which way it will go next. Repeated sweeps of the same band are thinned to one dot every ten bars.
Premium and discount
The range between the last confirmed swing high and swing low is split at its middle: the upper half is shaded as premium, the lower half as discount, with a dashed line at 50 percent. It is a reference: the range is rebuilt when a new swing is confirmed, its right edge follows the newest bar, and it is not painted over a liquidity band.
Higher timeframes
Two higher timeframes (H4 and D1 by default) are read from their closed bars with the same rules; each must be above the chart's own timeframe. The level of the last BOS or CHoCH on each is drawn as a dotted line labelled [H4] or [D1], and the panel shows their structure direction. These lines are references that move when the higher timeframe confirms a new event, and they are not drawn in the Strategy Tester.
Alerts
BOS, CHoCH, sweep and reclaim can each send a popup, a push notification, an email or a sound, and an optional alert fires when price comes within 0.25 x ATR of a band, with a 60-minute cooldown and a limit of 50 a day by default. Alerts are sent only for marks placed on live bars, not for the marks redrawn when the indicator is attached, and the events of one bar go out as a single message per route. Popups are on by default; push, email and sound are off until you turn them on. The Alerts button on the panel opens a log of the last 20 alerts with the result of each push.
The ledger and buffers
Every mark is written as one row to a CSV file in MQL5\Files\StructureLedger, one file per symbol and timeframe: the kind of mark, its bar, level, origin, ATR, whether it was placed live or while rereading history, and the server time at which it was written. Re-attaching does not duplicate rows. Five buffers (direction, BOS or CHoCH, nearest equal highs above, nearest equal lows below, sweep or reclaim) can be read with iCustom; the value of a closed bar is written once and not rewritten.
Marks stay where they were placed
Every mark is placed only after its confirming bar has closed. In Strategy Tester replays (1-minute OHLC, default inputs) on GOLD M15 over four weeks and GOLD H1 and EURUSD H1 over two and a half weeks, no structure, sweep or reclaim mark placed on a closed bar was moved, recoloured or retitled as later bars arrived, and no closed-bar buffer value was rewritten. Those replays did not cover real ticks, live charts over longer periods, broker corrections of past bars or inputs other than the defaults. The premium and discount shading and the higher-timeframe lines are references and move by design, and the right edge of a live band follows the newest bar.
The chart keeps the latest 30 structure labels, 12 bands and 80 swing dots (adjustable); older ones drop off as new ones arrive. On attach it rereads the last 1500 closed bars (adjustable, the first 200 as warm-up).
What this tool is not
Structure Ledger PRO is an information tool. It does not tell you when or where to trade and makes no claim about results. It uses no DLL and makes no web requests; push and email go through the terminal's own settings, and it reads only the symbol of its own chart and that symbol's higher timeframes.
