Structure Ledger Market Structure Liquidity
- 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
Structure Ledger draws market structure from bars that have already closed: break of structure (BOS), change of character (CHoCH), confirmed swing highs and lows, and the equal highs and lows where liquidity tends to rest. It is a smart money concepts tool that reads structure from closed bars only and takes nothing from the bar still forming.
What it draws
A small dot marks each confirmed swing. 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), with its word placed just past its right end. Up structure, down structure and liquidity 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.
How a mark is decided
A swing high is confirmed when a later bar closes having traded k x ATR below it (2.0 x ATR14 by default), a swing low the other way round, so a swing becomes known one or more bars after it formed. BOS and CHoCH use the close only: a close beyond the last confirmed swing counts, a wick through it does not. Equal highs or lows are confirmed swings within 0.5 x ATR of the cluster's centre; a band appears once two have gathered, padded by 0.25 x ATR, and retires after 250 bars without a new swing joining it or when price trades through its outer edge and does not close back inside within three bars. A retired band stops extending and keeps only its faint fill. The defaults are meant to be used as they are; if you change anything, start with k (smaller gives finer structure) and eps.
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 and H1, EURUSD H1 and BTCUSD D1, covering 3 days to 5 months per run, no mark placed on a closed bar was moved, recoloured or retitled as later bars arrived; older marks only dropped off at the on-chart limits, and re-attaching the indicator redrew the same marks. Those replays did not cover real ticks, live charts over longer periods, broker corrections of past bars or inputs other than the defaults. The only parts that keep changing are the right edge of a live band, which follows the newest bar together with its word, and the band fill and the small plates under the structure words, which are matched to the background again if you change the chart colours.
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), so a later attach shows the same marks within that window, and each mark is logged as one line in the Experts tab.
The panel
A compact dark panel shows the current structure direction, the last BOS or CHoCH with its bar time, and the distance in ATR from the current price to the nearest liquidity band above and below. Its Alerts row carries a PRO label because this edition sends no notifications; a PRO edition of Structure Ledger will be listed separately with its own description.
What this tool is not
Structure Ledger is an information tool for the timeframe you are watching. It does not tell you when or where to trade, makes no claim about results, uses no DLL, makes no web requests, and reads only the symbol and timeframe of its own chart.
Every input and every row of the panel is explained in the user guide on the author's blog: Structure Ledger user guide
What it draws
A small dot marks each confirmed swing. 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), with its word placed just past its right end. Up structure, down structure and liquidity 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.
How a mark is decided
A swing high is confirmed when a later bar closes having traded k x ATR below it (2.0 x ATR14 by default), a swing low the other way round, so a swing becomes known one or more bars after it formed. BOS and CHoCH use the close only: a close beyond the last confirmed swing counts, a wick through it does not. Equal highs or lows are confirmed swings within 0.5 x ATR of the cluster's centre; a band appears once two have gathered, padded by 0.25 x ATR, and retires after 250 bars without a new swing joining it or when price trades through its outer edge and does not close back inside within three bars. A retired band stops extending and keeps only its faint fill. The defaults are meant to be used as they are; if you change anything, start with k (smaller gives finer structure) and eps.
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 and H1, EURUSD H1 and BTCUSD D1, covering 3 days to 5 months per run, no mark placed on a closed bar was moved, recoloured or retitled as later bars arrived; older marks only dropped off at the on-chart limits, and re-attaching the indicator redrew the same marks. Those replays did not cover real ticks, live charts over longer periods, broker corrections of past bars or inputs other than the defaults. The only parts that keep changing are the right edge of a live band, which follows the newest bar together with its word, and the band fill and the small plates under the structure words, which are matched to the background again if you change the chart colours.
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), so a later attach shows the same marks within that window, and each mark is logged as one line in the Experts tab.
The panel
A compact dark panel shows the current structure direction, the last BOS or CHoCH with its bar time, and the distance in ATR from the current price to the nearest liquidity band above and below. Its Alerts row carries a PRO label because this edition sends no notifications; a PRO edition of Structure Ledger will be listed separately with its own description.
What this tool is not
Structure Ledger is an information tool for the timeframe you are watching. It does not tell you when or where to trade, makes no claim about results, uses no DLL, makes no web requests, and reads only the symbol and timeframe of its own chart.
Every input and every row of the panel is explained in the user guide on the author's blog: Structure Ledger user guide
