OPEN-SOURCE SCRIPT
Level Watch & Touch Ledger [MQLSoftware]

OVERVIEW
Level Watch & Touch Ledger keeps an audit trail of what price actually did at the levels you draw yourself. You type in up to eight prices and the script records every time price came to each one, what happened next, and how far past the line it ran before turning. It discovers nothing on its own: it never scans, clusters or ranks levels, and it produces no entries, stops, targets or position sizing. It answers one question about levels you already care about — has this one actually been respected on this chart, or does it only look important?
CONCEPTS
A plain touch counter is close to useless, because price grinding sideways on a level logs a touch every bar and the count becomes noise. The engine here is a re-arm gate: after an event resolves, a level goes quiet until price has closed a configurable ATR distance away and a cooldown has passed. Only then can it register another touch. That turns an ordinary consolidation into a small number of events instead of forty.
Each event resolves exactly once, on a closed bar, and is frozen. REJECTED means price closed back on the side it approached from by the outcome margin; BROKEN means it closed through by that margin; CHOP means neither happened inside the outcome window. A latched outcome is never rewritten, so the table cannot quietly improve as new bars arrive.
Overshoot is measured on rejections only. A break is declared once price closes beyond the level by the outcome margin, so a broken event's overshoot is floored by your own setting and would describe the input rather than the market. A bar that gaps clean over a level never touches the zone, so gaps are detected separately and recorded as breaks — otherwise a level's failures go uncounted and gap-prone symbols look more reliable than they are.
FEATURES
Eight independent level slots, each with its own ledger. A state readout per level, from OUT OF RANGE and WARMING UP through ARMED, PENDING and COOLDOWN. Touch count and bars since the last one. The rejected / broken / chop split. A rejection rate whose denominator includes chop. Median and 75th-percentile rejection overshoot in ATR. Shaded touch zones, level lines, and a marker on every recorded touch. Alerts on touch and outcome, plus a proximity ladder that fires only as price closes in, never as it walks away.
HOW TO USE
Type a price into Level 1 and read the row. Zone half-width sets how close counts as a touch; re-arm distance is the main lever on how many events you get; outcome window and margin decide how decisively price must move. Rates and overshoot both stay behind one minimum-sample input and read "collecting" until the level has enough resolved events — four touches give you an audit trail, not a statistic. A median overshoot of zero is a real answer, not a missing one: half the rejections turned before price reached your line.
Counts, rates, outcomes and markers are closed-bar figures and are never revised. The DIST column, the shaded zone width and the proximity alerts are live and update inside the forming bar; they are visual context, not signals.
CONCLUSION
This is a measurement tool for levels you supply, not a level finder and not a signal generator. Samples on a hand-drawn level are small by nature, and nothing here is a probability, an expectancy or a forecast — the figures describe what this chart's loaded bars did at your lines, shown with the sample size that produced them.
Level Watch & Touch Ledger keeps an audit trail of what price actually did at the levels you draw yourself. You type in up to eight prices and the script records every time price came to each one, what happened next, and how far past the line it ran before turning. It discovers nothing on its own: it never scans, clusters or ranks levels, and it produces no entries, stops, targets or position sizing. It answers one question about levels you already care about — has this one actually been respected on this chart, or does it only look important?
CONCEPTS
A plain touch counter is close to useless, because price grinding sideways on a level logs a touch every bar and the count becomes noise. The engine here is a re-arm gate: after an event resolves, a level goes quiet until price has closed a configurable ATR distance away and a cooldown has passed. Only then can it register another touch. That turns an ordinary consolidation into a small number of events instead of forty.
Each event resolves exactly once, on a closed bar, and is frozen. REJECTED means price closed back on the side it approached from by the outcome margin; BROKEN means it closed through by that margin; CHOP means neither happened inside the outcome window. A latched outcome is never rewritten, so the table cannot quietly improve as new bars arrive.
Overshoot is measured on rejections only. A break is declared once price closes beyond the level by the outcome margin, so a broken event's overshoot is floored by your own setting and would describe the input rather than the market. A bar that gaps clean over a level never touches the zone, so gaps are detected separately and recorded as breaks — otherwise a level's failures go uncounted and gap-prone symbols look more reliable than they are.
FEATURES
Eight independent level slots, each with its own ledger. A state readout per level, from OUT OF RANGE and WARMING UP through ARMED, PENDING and COOLDOWN. Touch count and bars since the last one. The rejected / broken / chop split. A rejection rate whose denominator includes chop. Median and 75th-percentile rejection overshoot in ATR. Shaded touch zones, level lines, and a marker on every recorded touch. Alerts on touch and outcome, plus a proximity ladder that fires only as price closes in, never as it walks away.
HOW TO USE
Type a price into Level 1 and read the row. Zone half-width sets how close counts as a touch; re-arm distance is the main lever on how many events you get; outcome window and margin decide how decisively price must move. Rates and overshoot both stay behind one minimum-sample input and read "collecting" until the level has enough resolved events — four touches give you an audit trail, not a statistic. A median overshoot of zero is a real answer, not a missing one: half the rejections turned before price reached your line.
Counts, rates, outcomes and markers are closed-bar figures and are never revised. The DIST column, the shaded zone width and the proximity alerts are live and update inside the forming bar; they are visual context, not signals.
CONCLUSION
This is a measurement tool for levels you supply, not a level finder and not a signal generator. Samples on a hand-drawn level are small by nature, and nothing here is a probability, an expectancy or a forecast — the figures describe what this chart's loaded bars did at your lines, shown with the sample size that produced them.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
🟣 Free tools, guides & product resources:
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
🟣 Free tools, guides & product resources:
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.