OPEN-SOURCE SCRIPT
Volume Profile ML [PickMyTrade]

🔷 WHAT IT MEASURES
🔸 A rolling volume profile — traded volume binned across price, weighted triangularly around each bar's typical price rather than spread evenly across its whole range
🔸 Nine properties of every ARRIVAL at a high or low volume node — its share of row volume, rank percentile, local thickness, approach displacement, distance from the Point of Control, position within the profile, volume surge on approach, profile concentration, and position within the Value Area
🔸 An arrival resolves as a hold or a break by real price movement, checked in that order — undecided arrivals are discarded, not counted as failures
🔸 The Point of Control, Value Area, and every high and low volume node redraw on a rolling cadence as the window moves
――――――――――――――――――――――――――――――――――――――
🔷 THE ML ENGINE
🔸 A Lorentzian K-nearest-neighbour classifier, weighted by distance rather than counted equally, trained continuously as arrivals resolve — no repainting, no lookahead
🔸 Nothing about a node's absolute price is used as a feature — only how price approached it and what the node itself looked like
🔸 The vote shrinks toward the chart's own base rate when few neighbours are close, so a thin library never reads as confident
🔸 When the nearest analogues in the library aren't actually close, the script says so — "no analogue" instead of a percentage built on a bad match
🔸 Below a configurable warmup count it reads LEARNING, not a guess
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 A circle marks a high-conviction read, a triangle a standard one — shape carries strength, colour carries direction
🔸 Blue for acceptance, orange for rejection, grey for anything that hasn't earned a direction yet, the same three colours across the profile, the vote, and the dashboard
🔸 An info table with Point of Control, Value Area, library size, the chart's own base rate, and the live analogue distance against its configured ceiling
🔸 3 alertconditions, worded as observations of what the classifier's reading — never as trade instructions
――――――――――――――――――――――――――――――――――――――

🔷 INPUTS
Profile Lookback / Rows — bars the profile is built from, and how finely it's binned. Default 240 / 48.
Rebuild Cadence — bars between profile recalculations. Default 5.
HVN / LVN Percentile — the volume percentile a row must clear to count as a high or low volume node. Default 80 / 20.
Re-arm Distance — minimum bars before the same node can register a new arrival. Default 10, floored at the resolution timeout.
K Neighbours / Library Cap — how many analogues vote, and how many resolved arrivals are retained. Default 9 / 100.
Shrinkage Weight — how hard a thin neighbourhood is pulled toward the base rate. Default 4.0.
Max Analogue Distance — the ceiling above which the vote reads "no analogue" instead of a percentage. Default 4.0.
Reject / Break Threshold — how far price must travel back, or close beyond, a node to resolve a test. Default 0.8 / 0.5 ATR.
Resolution Timeout — bars before an unresolved arrival is discarded. Default 25.
Conviction Threshold — vote at or above which an arrival is marked high conviction. Default 0.65.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
🔸 The library is built forward from the chart's own loaded history — scroll back to load more and the script relearns from the new starting bar, so earlier votes can differ from what you saw before. This is bar history dependence, not repainting — no value changes after its own bar closes within a single run.
🔸 On instruments with no volume feed the profile itself carries no meaning, and the dashboard says so rather than showing an empty one anyway
🔸 Below the warmup count a node's own read is thin — the library size travels with every vote so that's never hidden
🔸 This script reports how historical arrivals resolved. It does not predict, and it is not a trading system on its own.
――――――――――――――――――――――――――――――――――――――
Built in Pine Script v6. Open source — Mozilla Public License 2.0.
🔸 A rolling volume profile — traded volume binned across price, weighted triangularly around each bar's typical price rather than spread evenly across its whole range
🔸 Nine properties of every ARRIVAL at a high or low volume node — its share of row volume, rank percentile, local thickness, approach displacement, distance from the Point of Control, position within the profile, volume surge on approach, profile concentration, and position within the Value Area
🔸 An arrival resolves as a hold or a break by real price movement, checked in that order — undecided arrivals are discarded, not counted as failures
🔸 The Point of Control, Value Area, and every high and low volume node redraw on a rolling cadence as the window moves
――――――――――――――――――――――――――――――――――――――
🔷 THE ML ENGINE
🔸 A Lorentzian K-nearest-neighbour classifier, weighted by distance rather than counted equally, trained continuously as arrivals resolve — no repainting, no lookahead
🔸 Nothing about a node's absolute price is used as a feature — only how price approached it and what the node itself looked like
🔸 The vote shrinks toward the chart's own base rate when few neighbours are close, so a thin library never reads as confident
🔸 When the nearest analogues in the library aren't actually close, the script says so — "no analogue" instead of a percentage built on a bad match
🔸 Below a configurable warmup count it reads LEARNING, not a guess
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 A circle marks a high-conviction read, a triangle a standard one — shape carries strength, colour carries direction
🔸 Blue for acceptance, orange for rejection, grey for anything that hasn't earned a direction yet, the same three colours across the profile, the vote, and the dashboard
🔸 An info table with Point of Control, Value Area, library size, the chart's own base rate, and the live analogue distance against its configured ceiling
🔸 3 alertconditions, worded as observations of what the classifier's reading — never as trade instructions
――――――――――――――――――――――――――――――――――――――
🔷 INPUTS
Profile Lookback / Rows — bars the profile is built from, and how finely it's binned. Default 240 / 48.
Rebuild Cadence — bars between profile recalculations. Default 5.
HVN / LVN Percentile — the volume percentile a row must clear to count as a high or low volume node. Default 80 / 20.
Re-arm Distance — minimum bars before the same node can register a new arrival. Default 10, floored at the resolution timeout.
K Neighbours / Library Cap — how many analogues vote, and how many resolved arrivals are retained. Default 9 / 100.
Shrinkage Weight — how hard a thin neighbourhood is pulled toward the base rate. Default 4.0.
Max Analogue Distance — the ceiling above which the vote reads "no analogue" instead of a percentage. Default 4.0.
Reject / Break Threshold — how far price must travel back, or close beyond, a node to resolve a test. Default 0.8 / 0.5 ATR.
Resolution Timeout — bars before an unresolved arrival is discarded. Default 25.
Conviction Threshold — vote at or above which an arrival is marked high conviction. Default 0.65.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
🔸 The library is built forward from the chart's own loaded history — scroll back to load more and the script relearns from the new starting bar, so earlier votes can differ from what you saw before. This is bar history dependence, not repainting — no value changes after its own bar closes within a single run.
🔸 On instruments with no volume feed the profile itself carries no meaning, and the dashboard says so rather than showing an empty one anyway
🔸 Below the warmup count a node's own read is thin — the library size travels with every vote so that's never hidden
🔸 This script reports how historical arrivals resolved. It does not predict, and it is not a trading system on its own.
――――――――――――――――――――――――――――――――――――――
Built in Pine Script v6. Open source — Mozilla Public License 2.0.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Automate TradingView alerts to brokers no coding needed. Trade futures, forex, or crypto, copy trades across unlimited accounts, & control risk with ease.
For Tradovate: bit.ly/4a1KBrY
For all other supported brokers: bit.ly/4qEbU2G
For Tradovate: bit.ly/4a1KBrY
For all other supported brokers: bit.ly/4qEbU2G
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Automate TradingView alerts to brokers no coding needed. Trade futures, forex, or crypto, copy trades across unlimited accounts, & control risk with ease.
For Tradovate: bit.ly/4a1KBrY
For all other supported brokers: bit.ly/4qEbU2G
For Tradovate: bit.ly/4a1KBrY
For all other supported brokers: bit.ly/4qEbU2G
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.