OPEN-SOURCE SCRIPT
Aggiornato Historical Context Levels

Historical Context Levels displays supplied distributions of high, low and finishing moves as reference levels on a compatible chart. It separates the research sample from chart placement: change the anchor to translate the levels, while keeping their sample counts unchanged.
The indicator does not discover patterns or calculate conditional history from TradingView bars. It reads an explicitly supplied data snapshot. The default demonstration uses ten invented observations and is marked SYNTHETIC DEMO; it is provided so anyone can explore the controls without an account or external data purchase.
Inputs and use
Choose Synthetic demo to explore the example. For your own research, choose Imported data and paste compatible MLV4 or MLV5 text into Research data. Set the chart anchor and check the product and source information. US500 data requires a chart quoted in compatible index points; an ETF price is not interchangeable. The recognised product families are US500, AUS200, UK100, BTC and VIX. Recognition does not eliminate provider basis differences.
The three layers measure different things:
- HIGH: proportion of supplied observations whose high was at or above the offset.
- LOW: proportion whose low was at or below the offset.
- EDGE: proportion whose finish was at or above a nonnegative offset, or at or below a negative offset. At zero both inclusive counts are displayed.
These are frequencies from the supplied sample, not estimated future touch probabilities. A finish is different from an intraday excursion. Source window, anchor and filter definitions must be read alongside any percentage.
Select Levels to see each observation or five supplied percentile placements. Compact labels combine nearby text while retaining the individual lines. Hover to inspect individual values and counts. MLV5 adds Profile and Levels + Profile: these show sample frequencies in bands, not volume or cumulative reach.
Worked synthetic example
The ten demonstration offsets are -20, -10, 0, 10, 20, 30, 40, 50, 60 and 70 points. Seven finish at or above +10, so the +10 level displays 70%. Two finish at or below -10, so the -10 level displays 20%. The demo reference is 7,633; changing it does not change the observations or these fractions.
Distinct functionality
The renderer carries separate sample sizes and inclusive counts for high, low and finishing distributions, explicit source references, product-scale checks and frequency profiles. It supports re-anchoring and dense-label grouping without changing supplied statistics. Its role is transparent display of externally prepared research, not a conventional price-derived indicator.
Limitations
Inputs are author-supplied and not independently authenticated. Structural validation cannot prove that research conditions, sample counts or outcomes are correct. Data does not refresh automatically. Replacing the data does not replace the chart anchor or display settings. Displayed chart prices are tick-rounded; counts refer to original offsets. Lines extend from the latest bar, and optional backward extension does not mean the information was available on earlier bars. There is no strategy backtest or automated trading functionality. Profiles require MLV5. Range-width payloads are unsupported.
Before using real research, specify its instrument, sample window, outcome period, reference and conditions. Historical observations do not guarantee future outcomes.
The indicator does not discover patterns or calculate conditional history from TradingView bars. It reads an explicitly supplied data snapshot. The default demonstration uses ten invented observations and is marked SYNTHETIC DEMO; it is provided so anyone can explore the controls without an account or external data purchase.
Inputs and use
Choose Synthetic demo to explore the example. For your own research, choose Imported data and paste compatible MLV4 or MLV5 text into Research data. Set the chart anchor and check the product and source information. US500 data requires a chart quoted in compatible index points; an ETF price is not interchangeable. The recognised product families are US500, AUS200, UK100, BTC and VIX. Recognition does not eliminate provider basis differences.
The three layers measure different things:
- HIGH: proportion of supplied observations whose high was at or above the offset.
- LOW: proportion whose low was at or below the offset.
- EDGE: proportion whose finish was at or above a nonnegative offset, or at or below a negative offset. At zero both inclusive counts are displayed.
These are frequencies from the supplied sample, not estimated future touch probabilities. A finish is different from an intraday excursion. Source window, anchor and filter definitions must be read alongside any percentage.
Select Levels to see each observation or five supplied percentile placements. Compact labels combine nearby text while retaining the individual lines. Hover to inspect individual values and counts. MLV5 adds Profile and Levels + Profile: these show sample frequencies in bands, not volume or cumulative reach.
Worked synthetic example
The ten demonstration offsets are -20, -10, 0, 10, 20, 30, 40, 50, 60 and 70 points. Seven finish at or above +10, so the +10 level displays 70%. Two finish at or below -10, so the -10 level displays 20%. The demo reference is 7,633; changing it does not change the observations or these fractions.
Distinct functionality
The renderer carries separate sample sizes and inclusive counts for high, low and finishing distributions, explicit source references, product-scale checks and frequency profiles. It supports re-anchoring and dense-label grouping without changing supplied statistics. Its role is transparent display of externally prepared research, not a conventional price-derived indicator.
Limitations
Inputs are author-supplied and not independently authenticated. Structural validation cannot prove that research conditions, sample counts or outcomes are correct. Data does not refresh automatically. Replacing the data does not replace the chart anchor or display settings. Displayed chart prices are tick-rounded; counts refer to original offsets. Lines extend from the latest bar, and optional backward extension does not mean the information was available on earlier bars. There is no strategy backtest or automated trading functionality. Profiles require MLV5. Range-width payloads are unsupported.
Before using real research, specify its instrument, sample window, outcome period, reference and conditions. Historical observations do not guarantee future outcomes.
Note di rilascio
Added Raw values mode: paste signed point moves directly, without an MLV4/MLV5 export.In Settings > Inputs, select Raw values, choose the product and High, Low or Finish (Edge), then paste 1–200 point moves separated by commas, newlines or tabs. Select Levels and Entered anchor price, then enter the appropriate Chart anchor price.
High counts observations at or above each offset; Low counts at or below; Edge counts finishes at or below negative offsets and at or above nonnegative offsets. These are inclusive historical sample frequencies, not forecasts. Raw values are user-supplied; dates and filters are unspecified. Use point offsets, not absolute prices or percentages.
Malformed, blank or oversized input is rejected. Raw mode supports Levels only. Imported MLV4/MLV5 data and Synthetic demo remain available; profiles require MLV5.
Note di rilascio
Removed “Prototype” from the indicator’s chart title and replaced the publication preview with a worked US500 Low example. Calculations and input modes are unchanged.The preview uses eight completed historical global-low offsets: -125, -153, -29, -61, -106, -165, -148 and -56 points. Conditions, combined with AND: FTSE (PRIOR DAY) <= -100; AUS200 OVERNIGHT FUTURES DISLOCATION (PRE) <= -1; S&P500 (DAY PRIOR) >= 1. No weekday filter.
The 7,658.33 anchor is Friday’s displayed Trade Nation close, used provisionally for the Monday 21 September preview. It is not Monday’s actual global-session open. The lines translate historical distances to this provisional reference; they do not describe the earlier candles shown. Percentages are frequencies in the eight-observation sample, not future probabilities.
Note di rilascio
Preview correction: removed an unrelated arrow drawing from the example chart. The eight US500 historical lows, provisional 7,658.33 anchor and calculations are unchanged. See the preceding release note for the sample conditions and reference limitations.Note di rilascio
Cleaner first use: new instances now start in Raw values mode with empty observations and no plotted levels. A short setup card explains how to choose the product and layer, paste signed point moves, and set an anchor price. Synthetic demo remains available under Data source as an optional example. Invalid non-empty input still displays validation guidance. Level calculations and imported-data support are unchanged. The publication chart remains the worked US500 example; its saved inputs are not the defaults for a fresh instance.Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Historical Context Levels: setup tutorial → youtu.be/fHUmVW-Szuo
So You Want to be a Day Trader Substack: sywbdt.substack.com/
So You Want to be a Day Trader Substack: sywbdt.substack.com/
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Historical Context Levels: setup tutorial → youtu.be/fHUmVW-Szuo
So You Want to be a Day Trader Substack: sywbdt.substack.com/
So You Want to be a Day Trader Substack: sywbdt.substack.com/
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.