Agreed Upon DOLAGREED UPON DOL
Marks the unmitigated fair value gap that price is most likely to reach regardless of
which way the market resolves.
THE IDEA
Most targets require you to be right about direction. An agreed-upon draw on liquidity
does not. It is a gap positioned so that both outcomes route through it:
- if price continues, it runs straight through the gap on its way to the liquidity
beyond
- if price reverses, it must first rebalance the gap before it can deliver the
other way
Either branch touches it. That is what "agreed" means - both directions have agreed on
it. You are not betting on direction, you are collecting the level that gets hit either
way.
THE FOUR CONDITIONS
A gap is marked AGREED only when all four hold on its own timeframe:
1. it is an unmitigated fair value gap
Nothing else qualifies. Not session highs, not previous day levels, not
intermediate highs or lows. Only an untouched three-candle imbalance.
2. unswept liquidity exists BEYOND it, on its own side
The continuation branch needs somewhere to run to.
3. unswept liquidity exists on the OPPOSITE side of price
The reversal branch needs somewhere to run to.
4. the path to it is clear
Nothing between price and the gap - no unswept swing, no other unmitigated gap,
no session or daily level. If something sits in between, that nearer level is
where the market decides, so the far gap is no longer inevitable.
Miss condition 2 or 3 and only one branch exists, so you are back to betting on
direction. Miss condition 4 and the level is simply further away, not inevitable.
ON THE CHART
- a box around the agreed gap, labelled with the timeframe it came from
- dotted lines showing the liquidity pools the test is using
- "swept" tags wherever a pool is taken out
By default only the nearest agreed gap on each side is drawn. Turn on non-agreed gaps
to see what was rejected - the rejections tell you more about whether the logic matches
your read than the acceptances do.
THE PANEL
TF gaps agreed
15m 3 1
30m 2 0
1H 4 1
REASSESS POOL SWEPT
Per timeframe: how many unmitigated gaps are tracked, and how many currently qualify.
A red "!" next to a timeframe means it sits below your chart timeframe and has been
switched off.
The bottom row lights up when the map changes, because it goes stale as the session
runs:
TARGET HIT price reached the level you were pointing at
POOL SWEPT a liquidity pool was taken, so the conditions have shifted
MAP CHANGED a new candle printed a gap, or one was mitigated
New candles manufacture new gaps all session. A read taken at the open is stale within
the hour. Alerts are available for all three.
TIMEFRAMES
Analysis timeframes must be at or above your chart timeframe. request.security cannot
read down - it returns junk instead of erroring, so anything below the chart is disabled
outright and flagged in the panel.
Defaults are 15m / 30m / 1H, which means a 15m chart or lower. Each timeframe is
analysed self-contained: a 15m gap is judged against 15m swings, a 1H gap against 1H
swings. Results are identical on any chart below them, so you can sit on the 1m all
session and still be reading hourly structure.
WHAT THIS IS NOT
Not a bias tool. An agreed DOL has no direction by design - that is the whole point. It
tells you WHERE, never WHICH WAY.
Not an entry signal. It is a target. Two agreed gaps on opposite sides is not a
conflict, it is a range - wait to see which side fires, then trade toward what is left.
Not a filter for reachability. A gap 600 points away can satisfy all four conditions and
still be out of reach in a session. Judge distance yourself.
SETTINGS WORTH TOUCHING
Swing Left / Right defines what counts as a liquidity pool, so it drives
conditions 2, 3 and 4. Counted in bars of the analysis
timeframe, not your chart. If everything shows as agreed,
raise these first.
Require Clear Path condition 4. Turning it off will produce many more signals
and most of them will not be inevitable.
Session / Daily as
Obstacles the strictest part. An unswept London high anywhere in the
path kills the signal. Turn off first if it is too tight.
Only Nearest Each Side off shows every qualifying gap rather than just the closest.
Индикатор

Cipher B Adaptive v6Cipher B — Adaptive v6
Cipher B — Adaptive is a WaveTrend-style momentum oscillator that re-tunes itself to the coin it is applied to. The same script gives usable overbought/oversold levels and cross signals on BTC daily, a mid-cap alt on 4H or a meme coin on 5 minutes, without changing the settings.
WHY THIS EXISTS
Classic Cipher B oscillators use fixed levels (±53 / ±60) and fixed smoothing (10 / 21). Those numbers were tuned for BTC-like behaviour. On a meme coin the wave regularly runs to ±90, so "overbought" fires far too early and a cross at -55 is not really a dip. On BTC on higher timeframes the wave rarely reaches ±60, so the extreme zones are almost never touched. This script solves that with two independent adaptive layers.
HOW IT WORKS
1. Asset profile (volatility tier)
The script measures annualised realised volatility: the standard deviation of log returns over the lookback, scaled by the number of bars per year for the chart timeframe. Because it is annualised, a 5-minute chart and a daily chart are compared on the same scale. The result is mapped to a 0…1 factor between two thresholds:
• below 75% = Large Cap (BTC / ETH behaviour)
• 75% to 150% = Alt
• above 150% = Meme
The factor stretches the Channel and Average lengths by up to 30% on the noisiest coins, which suppresses whipsaw crosses without adding lag on calm charts. If you disagree with the detection, the Profile input overrides it.
2. Adaptive levels
In Adaptive mode the outer OB/OS levels are the 95th and 5th percentile of WT1 over the last 300 bars, clamped between 40 and 95. The inner levels are the outer level × 0.88, which preserves the original 53/60 geometry. Levels are asymmetric by default: in an uptrend the oversold line sits shallower, so dip signals fire where dips actually end, and the overbought line sits deeper. Turn on Symmetric levels if you prefer mirrored lines. Fixed mode keeps your manual levels and widens them by the profile, up to 35% on meme-tier coins.
3. Waves and money flow
WT1 (blue) and WT2 (dark blue) are the standard WaveTrend pair. The cloud between them is green while momentum is bullish and red while it is bearish; the histogram shows the same distance. The green/red money-flow wave is the Cipher B style RSI-MFI hybrid: sustained green means buying pressure behind the move.
4. Divergence
Pivots are found on the oscillator, not on price. Price is read in the window around each pivot, and a divergence is confirmed once, when the second pivot is confirmed. Markers are drawn on the actual pivot bar and the two pivots are connected with a line. Optional filters: at least one pivot must be inside the OB/OS zone, and the pivots must be within a set number of bars of each other. Hidden (trend-continuation) divergences can be switched on separately.
HOW TO READ THE SIGNALS
• Dim dot: WT1 crosses WT2 in the mid-range. Informational only.
• Solid green / red dot: a cross inside the oversold / overbought zone. This is the classic Cipher B buy / sell dot.
• Gold / orange diamond (STRONG): a zone cross that is either beyond the extreme level or follows a divergence within the last 20 bars.
• Triangle marked DIV: regular divergence. Small triangle marked H: hidden divergence.
• Shaded background: WT1 is beyond the extreme levels.
INFO TABLE
The table shows the detected profile (auto or manual), annualised volatility, the lengths and levels currently in use, WT1 / WT2, zone, momentum and money-flow direction. If a signal looks off on a particular coin, this is where you check what the script decided.
SETTINGS WORTH KNOWING
• Profile: Auto / Large Cap / Alt / Meme.
• Large-cap vol ceiling and Meme vol floor: the tier thresholds. Raise them on very low timeframes if BTC keeps being classed as Alt.
• Max length stretch: set to 0 to disable smoothing adaptation.
• Level mode, Adaptive lookback, Extreme percentile: how the levels are derived. A lower percentile (for example 90) gives more signals.
• Divergence memory: how long a divergence keeps upgrading zone crosses to STRONG.
ALERTS
Ten alert conditions: any cross, zone cross, STRONG signal, regular divergence and hidden divergence, each for both directions.
NOTES
• The first 300 bars of a chart use the fixed levels until enough history exists for the percentile.
• The volatility thresholds and the 365-day annualisation are tuned for crypto. On stocks or forex the profile reads differently; use the Profile override there.
• Cross signals confirm on bar close. Divergence signals confirm a few bars after the pivot (Pivot length), as with any pivot-based method. Nothing is recalculated on past bars after that.
CREDITS
Built on the WaveTrend oscillator by LazyBear and the Cipher B concept popularised by Market Cipher and VuManChu's open-source Cipher B. The volatility profile, percentile levels, tiered signals and pivot-aligned divergence logic are original to this script.
This indicator is an analysis tool, not financial advice. Test it on your own markets and timeframes before relying on it. Индикатор

Daily Key Reversal Levels (ThreeKay)# Higher-Timeframe Major Reversal Levels
## Release 1.0
Higher-Timeframe Major Reversal Levels is a TradingView indicator designed to identify prices where the market showed aggressive rejection on an important timeframe. Instead of plotting every pivot, high, or low, it looks for a pronounced wick, a close away from the wick's extreme, and meaningful follow-through in the opposite direction.
The result is a cleaner map of historically important supply, demand, and support/resistance flip levels.
## What the indicator detects
The indicator uses Daily candles by default. Optional 1-hour, 4-hour, weekly, and monthly sources can be enabled in Settings.
A price becomes a candidate level only when a higher-timeframe candle meets all of these conditions:
1. The rejection wick is large compared with the candle body.
2. The wick occupies a meaningful percentage of the candle's total range.
3. The candle closes away from the rejected extreme.
4. Price follows through in the opposite direction by the required ATR distance.
The tip of an upper rejection wick contributes to a supply zone, while the tip of a lower rejection wick contributes to a demand zone. Touches do not need to occur at the exact same tick: nearby wick rejections inside the ATR-sized price range are grouped, and the displayed line uses their average rejected price.
## Main advantages
- **Filters ordinary swing points:** A pivot alone is not enough. The market must demonstrate forceful rejection and follow-through.
- **Uses higher-timeframe structure:** Important 1H through monthly reactions can be viewed while trading on lower chart timeframes.
- **Adapts to volatility:** ATR-based thresholds scale automatically between different markets and price ranges.
- **Tracks repeated respect:** Each separate reaction strengthens the level and increases its line thickness.
- **Identifies role flips:** A level respected from both sides is colored purple, showing that former support became resistance or vice versa.
- **Shows confluence:** Labels identify the source timeframes, such as ` `.
- **Reduces chart clutter:** Nearby reactions are consolidated using an ATR-based merge tolerance.
- **Supports alerts:** TradingView can notify you when price approaches a qualified level.
## Reading the chart
- **Green — Demand:** Price aggressively rejected lower prices and reversed upward.
- **Red — Supply:** Price aggressively rejected higher prices and reversed downward.
- **Purple — Flip:** The same area has acted as both support and resistance.
- **`x2`, `x3`, etc.:** Number of separate qualifying reactions recorded near the level.
- **` `:** Higher timeframes that confirmed the area.
- **`best 2.40 ATR`:** Largest confirmed move away from the level.
Thicker lines represent levels with more qualifying reactions.
## Recommended setup
1. Open TradingView's Pine Editor.
2. Paste the contents of `Major_Reversal_Levels.pine` into a new indicator.
3. Save the script and select **Add to chart**.
4. Open the indicator's Settings menu.
5. Daily is enabled by default. Enable another source only if you also want its levels displayed universally.
6. Start with the default qualification settings, then adjust strictness for the market being traded.
## Suggested presets
### Balanced — recommended starting point
- Minimum confirming timeframes: `1`
- HTF bars allowed for reversal: `3`
- Minimum reversal move: `1.0 ATR`
- Separate reactions required: `1`
- Level merge tolerance: `0.60 ATR`
- Minimum wick/body ratio: `1.5`
This displays important single-event wick rejections while making repeatedly respected levels visually stronger.
### Strict confluence
- Minimum confirming timeframes: `2`
- Minimum reversal move: `1.5–2.0 ATR`
- Separate reactions required: `2`
- Minimum wick/body ratio: `2.0`
- Wick portion of candle: `0.40–0.50`
Use this when you want fewer levels with stronger historical evidence.
### More sensitive
- Minimum confirming timeframes: `1`
- Minimum reversal move: `0.75 ATR`
- Separate reactions required: `1`
- Minimum wick/body ratio: `1.0`
- Wick portion of candle: `0.30`
This can be useful for markets with smaller candles, but it will produce more levels.
## Settings explained
### Universal timeframe-level visibility
Each toggle controls whether levels detected from that source timeframe are displayed on the chart. For example, enabling Daily and Weekly allows those levels to remain visible while analyzing intraday charts.
**Minimum confirming timeframes** controls timeframe confluence. A value of `1` accepts a level from any enabled source. A value of `2` requires the same price area to be recognized by at least two enabled timeframes.
### Major-level qualification
**HTF bars allowed for reversal** is the number of completed source-timeframe candles used to confirm follow-through after the rejection wick. Increasing it allows slower reversals to qualify but increases confirmation delay.
**Minimum reversal move (ATR)** controls how far price must travel away from the wick before the level is accepted.
**Separate reactions required** determines how many distinct wick-rejection events must occur near the price. Use `1` for major single-event swings or `2–3` for repeatedly defended levels only.
**Level merge tolerance (ATR)** determines how close two rejected prices must be to count as the same area.
**Minimum wick/body ratio** measures the wick relative to the real candle body.
**Wick portion of candle** requires the wick to occupy a minimum percentage of the complete high-to-low range.
**Close away from wick extreme** ensures the candle did not finish near the rejected price.
**Minimum rejection-candle range (ATR)** filters out small candles whose wick may look large only because the body is unusually tiny.
## Alert setup
1. Select **Create Alert** in TradingView.
2. Choose this indicator under Condition.
3. Select **Approaching respected HTF reversal level**.
4. Choose the desired alert frequency and delivery method.
The alert distance is volatility-adjusted using the chart timeframe's ATR. Increase **Alert distance** for earlier warnings or decrease it for tighter notifications.
## Confirmation and repainting behavior
Levels are not accepted immediately when the wick forms. The indicator waits for the selected number of completed higher-timeframe candles to confirm that price genuinely moved away. After confirmation, the line is anchored to the original wick price and time.
This means a newly forming wick will not appear instantly. The delay is intentional and helps prevent weak, unfinished rejections from being labeled as major levels.
## Practical use
Treat the levels as areas of interest rather than automatic entry signals. When price returns to a level, look for confirmation from market structure, volume, momentum, or your normal execution model. Higher reaction counts and multi-timeframe labels indicate stronger historical evidence, but no level is guaranteed to hold.
This indicator is an analytical tool and does not provide financial advice or guarantee trading results.
Индикатор

Hourly Alpha Profile Terminal [The Quant Science]Hourly Alpha Profile Terminal is an advanced quantitative analysis tool developed for the TradingView platform, designed for traders operating on intraday timeframes up to 60 minutes. Its main goal is to unveil the hidden structure of price volatility and directionality on an hourly basis , focusing on a specific day of the week chosen by the user. Instead of relying on traditional momentum indicators, this script historically maps market behavior hour by hour, calculating win rates and risk intensity for all 24 hours of the day.
🔷 What It Does
The script performs real-time statistical and visual analysis directly on the chart through two dedicated quantitative terminals.
The Win Rate Profile Terminal divides the entire day into 24 hourly slots from 00:00 to 23:59, analyzes how many hourly cycles closed bullish compared to the total for the selected day of the week, and returns a success percentage win rate and an explicit directional bias of bullish, bearish, or neutral, accompanied by a visual progress bar.
The Volatility Profile Terminal calculates the logarithmically normalized standard deviation of hourly returns for each time slot, generating a volatility index and risk-based intensity bars to identify precisely which hour of the day experiences the most violent price movements as the peak risk slot.
🔷 How to Use It
To obtain correct data, the indicator requires an intraday timeframe less than or equal to 60 minutes, such as 1m, 5m, 15m, or 60m. If applied to daily, weekly, or higher charts, the terminal blocks execution and displays an error warning.
Add the script to your intraday chart on TradingView, open the indicator settings to select the day of the week you want to analyze, and observe the overlapping tables on the chart to identify hours with high win rates above 55% for trend opportunities or hours with extreme volatility for risk management.
🔷 What It Is Used For
Hourly Seasonality Analysis for discovering during which times of day a given asset historically shows a strong directional tendency.
Entry Timing Optimization for avoiding false breakouts during low-directionality or erratic risk hours and focusing on statistical high-probability slots.
Risk Management and Volatility Mapping for understanding when the market becomes more volatile to prevent excessive slippage or correctly position stop losses based on peak risk hours.
🔷 Who Uses It
Day Traders and Scalpers who need a statistical edge based on recurring market behaviors during trading sessions like the London or New York opens.
Quantitative and Systematic Traders looking to filter operational setups by integrating hourly probability matrices.
Market Analysts seeking an objective and visual reading of market microstructure without cluttering the chart with classic oscillators.
🔷 User Interface Management
Settings: Day to Analyze allows you to choose the day of the week to analyze from Monday to Sunday.
Win Rate Terminal Positio n allows you to position the probability table in your preferred corner of the screen using options like Top Right, Top Left, Bottom Right, Bottom Left, or Center.
Win Rate Terminal Size lets you adjust the text size inside the table to Small, Normal, or Large.
Volatility Terminal Position manages the screen position of the volatility table.
Volatility Terminal Size modifies the text size of the volatility table to fit any screen resolution.
🔷 To be used in combination with the Bias Detector Terminal
This script completes a suite consisting of two scripts:
🔹 Bias Detector Terminal used to find a day with a bias. For example, by analyzing Bitcoin on a Daily timeframe, we find a bias for Saturday.
👉 Bias Detector Terminal:
🔹 Hourly Alpha Profile Terminal let us dive deeper into the market and analyze the Saturday intraday session.
Индикатор

Institutional Swing Pressure Engine [ISPE]Description
Swing Pressure Engine is a multi-factor swing trading indicator designed to identify periods where directional pressure may be building before or during a larger price expansion.
Rather than relying on a single oscillator or breakout condition, ISPE evaluates several independent characteristics of market behavior and combines them into bullish and bearish pressure models.
The indicator analyzes five primary areas:
Compression — Measures whether volatility and price ranges are contracting relative to the instrument’s own historical behavior. It incorporates ATR, Bollinger Band width, realized volatility, rolling range contraction, candle-body compression, and Bollinger/Keltner squeeze conditions.
Flow — Estimates accumulation and distribution using price-and-volume proxies including closing location, relative volume, OBV behavior, directional volume, price response to volume, and absorption-style behavior. These calculations do not identify actual institutional orders; they infer buying and selling pressure from publicly available price and volume data.
Relative Strength — Measures the instrument against a broad-market benchmark and an optional sector benchmark. It evaluates relative performance, downside resilience, upside participation, and beta-adjusted relative behavior.
Structure — Evaluates the technical structure surrounding price, including proximity to support and resistance, moving-average alignment, higher-low/lower-high behavior, trend efficiency, and changes in rejection strength near important levels.
Multi-Timeframe Context — Uses higher-timeframe trend information to determine whether the current setup is aligned with the broader market structure.
These components are combined into separate Bull Pressure and Bear Pressure scores ranging from 0–100.
ISPE also calculates an Expansion score intended to represent the strength of conditions associated with a potential directional move. These values are composite heuristic scores and should not be interpreted as statistically calibrated probabilities.
Market States
The indicator classifies current conditions into states such as:
Dormant
Compressing
Accumulating
Distributing
Pressurized Bull
Pressurized Bear
Bull Pressure Divergence
Bear Pressure Divergence
Bull Expansion Imminent
Bear Expansion Imminent
Bull Expansion
Bear Expansion
Failed Breakout
Expansion Exhaustion
The purpose of these states is to make the underlying calculations easier to interpret at a glance.
Pressure Divergence
One of ISPE’s distinctive features is its Pressure Divergence model.
Pressure divergence occurs when price remains relatively compressed while the internal bullish or bearish pressure score changes significantly.
For example, price may remain nearly unchanged while accumulation, relative strength, structure, and compression increasingly favor the bullish side. ISPE can identify this as bullish pressure divergence before a traditional price breakout occurs.
The same logic is applied inversely to bearish setups.
How to Use
ISPE is primarily intended as a swing-trading research and confirmation tool.
A potentially favorable bullish setup may show:
Elevated compression
Strong accumulation
Strong relative strength
Favorable bullish structure
Positive higher-timeframe alignment
Bull pressure clearly exceeding bear pressure
A bearish setup uses the inverse conditions.
Higher pressure scores do not automatically represent trade signals. They are intended to identify environments that may deserve additional analysis.
The indicator also displays current structural support and resistance, along with potential entry, invalidation, and target reference levels when directional pressure becomes sufficiently elevated.
These levels are generated from current volatility and market structure and should be treated as analytical references rather than guaranteed entry or exit prices.
Adaptive Normalization
Many components of ISPE are normalized against the instrument’s own historical distribution using rolling percentile calculations.
This allows the indicator to adapt to securities with substantially different volatility characteristics.
For example, volatility that is unusually low for one stock may still be very high for another. ISPE therefore evaluates compression relative to the instrument itself rather than relying exclusively on fixed thresholds.
Relative Strength
By default, the indicator compares the current instrument with SPY and an optional sector ETF.
Users should change the sector benchmark where appropriate.
For example, a technology stock may reasonably be compared with XLK, while stocks from other industries should use a more appropriate sector benchmark.
Multi-Timeframe Data
ISPE incorporates higher-timeframe trend information into its pressure model.
Higher-timeframe calculations use confirmed historical higher-timeframe information to reduce repainting behavior from unfinished higher-timeframe bars.
Limitations
ISPE does not predict future prices and does not guarantee profitable trades.
The Bull Pressure, Bear Pressure, and Expansion readings are composite analytical scores rather than verified probabilities of future returns.
Accumulation and distribution calculations are based on price and volume proxies. The script cannot determine whether specific transactions originate from institutions, market makers, retail traders, or other market participants.
Support, resistance, entry, invalidation, and target levels change as market structure and volatility change.
Relative-strength calculations also depend on the selected benchmarks, so inappropriate benchmark selection can reduce their usefulness.
The indicator should therefore be used as one component of a broader trading process rather than as a standalone decision system.
Intended Use
ISPE was designed primarily for identifying and evaluating developing swing-trading environments where volatility compression, directional pressure, relative strength, and market structure begin aligning before or during price expansion.
Its primary purpose is not simply to identify completed breakouts, but to organize several underlying characteristics of a developing setup into a compact directional pressure model. Индикатор

Bias Detector Terminal [The Quant Science]Bias Detector Terminal is a quantitative analysis tool designed to identify day-of-week statistical bias and seasonality. By calculating the historical frequency of bullish closes for each trading day, the terminal provides a clear picture of directional market probabilities.
🔷 What it does
The indicator analyzes daily price history to calculate:
Bullish Ratio: The number of bullish sessions (close > open) relative to total historical bars for each day of the week (Monday to Sunday).
Session Win Rate: The exact percentage of positive closes for every trading day.
Smart Bias Signals: Categorizes each session based on statistical thresholds:
🟢 : Win Rate >= 55%
🔴 : Win Rate <= 45%
⚪ : Win Rate between 45% and 55%
Visual Flow Profile: An inline progress bar for instant visual assessment of buy/sell pressure.
Composite Metrics: A summary row showing the cumulative baseline for all historical data analyzed.
🔷 How to use it
Chart Application: Add the script to the chart of your chosen asset (Stocks, Crypto, Forex, Indices).
Timeframe Setting: Make sure the chart is set to the Daily (1D/Daily) timeframe. The script includes a built-in check that will trigger an error if applied to lower timeframes.
🔷 Interface Customization
Through the indicator settings you can:
Change the console position on screen (Top Right, Top Left, Bottom Right, Bottom Left, Center).
Modify the terminal font size (Small, Normal, Large).
🔷 Use Cases
Weekly Operational Planning: Identify in advance which days of the week historically favor buyers or sellers from a statistical standpoint.
Confluence Filter: Avoid opening short positions on days with a historically high bullish win rate (and vice versa), raising the overall quality of your trade setups.
Seasonality Analysis: Determine if a specific asset exhibits recurring statistical patterns (e.g., Turnaround Tuesday or Friday weakness).
🔷 Target Audience
Quant & Systematic Traders: For those who base their decisions on statistical data rather than gut feeling.
Day Traders & Swing Traders: Useful for aligning intraday operations with the statistical trend of the current day.
Market Analysts: For those who want to integrate high-level visual reporting and quantitative metrics into their TradingView analysis.
Индикатор

Multi-Timeframe MA ForecastMulti-Timeframe MA Forecast
This indicator combines two things that other MA tools don't: it plots a moving average from any timeframe onto your chart using proper multi-timeframe handling, and it projects that average forward under a simple assumption, that price holds at the current value while the calculation window rolls ahead. The result is a forward view of where the MA is headed if price goes nowhere, which is a different and useful question from where the MA has been.
Why forecast a moving average
An MA's slope isn't entirely driven by "recent price action" in the vague sense traders usually mean. At any given bar, the slope is set by one comparison: the price entering the average versus the price leaving it. A rising 50-day SMA can flatten or roll over not because anything new happened today, but because the price from 50 days ago, now dropping out of the window, was unusually high or low. That effect is knowable in advance since it depends on price action that already happened.
This matters because many systematic and algorithmic strategies key off MA slope and MA crossovers as regime filters. If you can see that a large gap is about to roll out of a 200-period window, you can anticipate a slope change before it shows up on the indicator itself, rather than reacting to it after the fact.
The forecast is not a price prediction. It answers a narrower, mechanical question: given the prices already in the pipeline, what does this average do next if price simply holds still.
Why MA slope matters for support and resistance
Slope changes the character of an MA:
- Price above a rising MA: the MA tends to act as support
- Price below a rising MA: the MA tends to act as a magnet , pulling price back up toward it
- Price below a falling MA: the MA tends to act as resistance
- Price above a falling MA: the MA tends to act as a magnet , pulling price back down toward it
A forecasted slope flip is an early signal that the MA's role relative to price may be about to change.
How the timeframe handling works
Set the Timeframe higher, lower, or equal to your chart's. The average is calculated on that timeframe using TradingView's multi-timeframe request functions, so the current bar always reflects the true live value of the higher-timeframe average, including the period still forming.
When the Timeframe is higher than the chart, history is drawn as a stairstep: once a higher-timeframe period closes, its final value is drawn back across the bars of that period. This is retroactive, the value shown mid-period was not knowable until that period actually closed, and it gives the clean, stepped look most MTF overlays use. When the Timeframe is the same as or lower than the chart, there's no period to wait for, so the line simply reflects the true value on every bar as it happens.
Either way, the forecast always starts from the current, fully up-to-date value of the average.
Forecast styling is separate from the MA's
The moving average uses its own Line Thickness and MA Line Style inputs, and the forecast has a matching, independently-set Forecast Line Style. These are exposed as inputs rather than through the native Style tab because the forecast is built from a drawing object rather than a plotted series, and drawing objects can't be styled from that tab. Giving the MA its own matching inputs, rather than mixing native Style-tab controls with input-based ones, keeps both fully and consistently customizable.
Supported MA types
SMA (simple), EMA (exponential), WMA (weighted), and HMA (Hull) are supported, each forecast using that type's own real recurrence rather than a shared approximation. EMA and SMA are the cheapest to compute; WMA and HMA require tracking the full calculation window at every forecast step.
Memory limitations on extreme timeframe ratios
Pulling multi-timeframe history through TradingView's request functions has a memory cost that scales with the ratio between the chart timeframe and MA timeframe, particularly when the MA timeframe is much lower than the chart's. In practice:
- EMA has no meaningful limit, since it doesn't require historical window data
- SMA can handle roughly double the timeframe ratio or MA length that WMA and HMA can, before hitting TradingView's memory ceiling
- Very extreme combinations, for example a 1-hour MA on a weekly chart with a long length, can hit a runtime memory error
If you see a memory error, try a coarser MA timeframe, a shorter MA length, switching to EMA or SMA, or lowering the Forecast % input, all of which reduce the amount of historical data the script needs to hold.
---
Every request.security() call in this script that uses barmerge.lookahead_on does so only on a history-offset expression, per TradingView's documented pattern for retrieving higher-timeframe data without lookahead bias. No un-offset higher-timeframe value is ever requested with lookahead_on. Индикатор

Smooths Heat Seeker Liquidity MapOverview
This indicator maps resting liquidity by detecting confirmed swing highs and lows at three independent lookback lengths, then rendering each one as a zone that visibly fades the longer it goes untouched. Instead of a static box that holds one shade until it's swept, each zone is built from small time-segments, and each segment locks in whatever color the zone's fade formula produces at the moment it's drawn — so a single zone shows a genuine gradient across its own lifetime, brightest where it formed and dimmer toward the present if nothing has happened to it since.
Concepts used
Tiered pivot detection: ta.pivothigh()/ta.pivotlow() run at three separate lookback lengths (Fast/Mid/Slow). A pivot only confirms after "Confirmation Bars" bars have passed with no higher high / lower low, which is what prevents repainting the level's location after the fact.
Age-based color decay: each level stores the bar index it was formed on. Every time a new segment is drawn, the indicator computes how many bars old the level is, runs that through a decay curve (fadeStrength input controls the curve's steepness), and converts the result into a transparency value for that segment only. Because past segments are never redrawn, the visual history of the fade is preserved rather than the whole zone jumping to one shade at once.
Mitigation vs. retest: a level is deleted the instant price crosses it (wick or close, user's choice) — that's treated as the liquidity being consumed. If price merely touches the level without crossing it, and "Refresh Fade On Retest" is on, the level's age resets to zero, so a level that keeps getting defended stays bright while one that's simply being ignored keeps fading toward removal.
Tier-priority merging: if a new pivot lands at the same price as an existing level, the indicator keeps the higher tier rather than creating a duplicate zone, so a level significant on the Slow lookback doesn't get visually diluted by a Fast-tier duplicate sitting on top of it.
How to use it
Add it to any chart/timeframe with default settings. Brighter zones are recent or actively-retested liquidity; dimmer zones are levels the market has drifted away from without touching. Use Fast/Mid/Slow tier colors to separate minor intraday levels from more structurally significant ones, and adjust Fade/Lifetime, Fade Strength, and Cell Width to control how far back the map looks and how coarse or smooth the fade appears.
Originality
This is not a combination of other publications — there's a single detection-and-rendering pipeline here (pivot detection → age tracking → per-segment decay → mitigation/retest handling), and every part of it was written for this script. No code, calculations, or visual techniques are reused from another publication.
Inputs
Fast / Mid / Slow — pivot lookback lengths for the three liquidity tiers
Confirmation Bars — bars required after a swing point before it's confirmed
Mitigate On — wick or close removes a level
Fade/Lifetime, Fade Strength, Cell Width — control how long a zone lives and how its decay curve is shaped
Refresh Fade On Retest — restarts a zone's age on an unmitigated touch
Box Height Multiplier — sets zone thickness as a multiple of ATR
Weak / Mid / Strong colors — one color per tier
This indicator has no signals, alerts, or trade markers — it's a pure visualization of where liquidity currently sits on the chart, and how fresh or stale each level is. Индикатор

Индикатор

Индикатор

IPDA Year Map (M1D)IPDA Year Map draws the window the Interbank Price Delivery Algorithm is said to reference — the 20, 40 and 60 day look-back highs and lows — and puts it on a year of quarterly dividers rather than on a rolling snapshot. Every level carries how many sessions it has left before the candle that set it ages out of that window and stops being a reference at all.
The idea it implements is simple and it is the reason for every design decision below. The algorithm does not see a chart. It references days as data points inside a fixed look-back, and once a level falls outside 60 trading days it is purged. So the useful questions are which levels are still inside the window, where in the window they sit, and when each one leaves. Most range tools answer the first. This one answers all three.
The data range
Three nested look-backs, computed on daily closes: 20 days for the near-term read, 40 for the intermediate, 60 as the outer edge of what is still referenced. Each contributes its high and its low, drawn from the candle that actually set it and running forward to the current bar. Six extremes, and that is the whole object — the script does not go hunting for additional pools, order blocks or gaps to decorate it with.
The levels come from the daily timeframe regardless of what the chart is showing, so a 60-day window exists on a 1 minute chart where only a fortnight of chart candles is loaded.
Each level's origin is found from the offset back to the extreme candle, not from watching the value change. Those are different things and the difference is visible. A rolling minimum moves for two reasons: a lower low prints, or an older and deeper low ages out of the window and the minimum steps up to whatever is left. Only the first is a candle forming a level. Anchoring on "the value changed" attaches the line to the day the old low expired, which can be months after the candle that actually set the price.
One price is one line
A high made inside the last 20 sessions is simultaneously the 20, 40 and 60 day high. Drawn as three separate levels that is three lines and three captions stacked on a single row of pixels, and the top of the chart reads as one anonymous level while the lows — which genuinely differ — read as three.
Levels at the same price are drawn once, captioned with every window that shares them, as in 20·40·60d high. Each side of the range then shows exactly as many lines as it has distinct prices. The caption also tells you when a level stops being the tightest one: a shared high loses the 20 from the front of its name the day the 20-day window moves on without it.
Levels that are merely close rather than identical still collide on screen, so each caption steps out to its own lane along the right of the chart until it is clear of the ones above it. No two captions share a row at any zoom.
Equilibrium
Each window can carry the midpoint of its own high and low — the premium and discount divide of that range. Three switches, one per window.
They are drawn dotted and neutral. Dotted because an equilibrium is a calculated reference and not a price that traded, and neutral because a midpoint is neither bullish nor bearish. Each runs from its own window's left edge rather than from a candle, since no single candle sets a midpoint.
The roll-out countdown
Every level and every equilibrium carries the sessions it has left inside its window, printed on its caption as out 12d. When the count reaches its last session the caption reads out next instead.
The arithmetic is the window length less the level's age, both in trading days. A high set yesterday sits in the 20-day window for 19 more sessions; one set 19 sessions ago leaves at the next close. This is also why a 60-day level can date back around 83 calendar days — 60 trading days is twelve weeks, and 24 of those days are weekend.
Two things it states rather than glosses over. The count is measured from the last completed daily close, so today's session is one of them. And it is the origin candle leaving that is counted — the printed level only actually moves if nothing else still inside the window matches that price.
For a level shared by several windows the countdown belongs to the widest one, because that is when it stops being referenced at all. An equilibrium's countdown is the sooner of its two extremes, since it moves the moment either side of it ages out.
The shift, and the sixty day budget
A market structure shift here is a liquidity raid: a day taking out the highest high, or the lowest low, of the days before it. The look-back is an input. Raise it to ignore the smaller shifts inside a range and find only the major one — in ICT's framing the real shift can sit two or three months back, so a reading of no shift found is an instruction to widen the search before concluding there isn't one.
A confirmed shift stands for its full 60-day budget. A later raid in the same direction inside that budget is a mini shift within the range and does not restart the clock; only a raid in the opposite direction, or one arriving after the budget is spent, places a new anchor. Without that rule a trending market would reset the count every few sessions and the budget would never be seen counting down.
The raid is marked with a vertical, and three more are projected forward from it at 20, 40 and 60 trading days, weekends skipped. The last is the point at which the 60-day budget from that shift is spent. The projection counts weekdays; the panel counts sessions the symbol actually traded, so a weekday the exchange was closed puts the chart marker one session ahead of the panel's count, and the panel says so.
The panel reports the same thing in numbers: when the shift happened, sessions elapsed, and sessions left of the 60. Its header reads IN BUDGET while the count runs, DUE SOON at five or fewer sessions left, and BUDGET SPENT past 60 — at which point the projections come off the chart rather than being extended into a window that no longer exists.
There is only one forward boundary and the arithmetic is worth seeing, because it looks like two:
today + (60 − elapsed) = (shift + elapsed) + (60 − elapsed) = shift + 60
The cast-forward target and the budget expiry are the same date. Drawing both would be drawing one fact twice.
Anchored to the minute
A raid found on chart candles lands on the chart's own grid, so on a 1 hour chart the shift marker can sit up to 59 minutes away from where the level was actually taken. The raid candle is re-read at 1 minute resolution and the marker placed at the first minute the prior extreme was genuinely exceeded.
TradingView only serves intrabar data for recent history. Where it is not available the marker falls back to chart-candle resolution, the tag carries a ~ mark, and the panel says which of the two it used. It never claims a precision it did not get.
Open interest
Where the instrument publishes an open interest series, the panel reports its change over a set window — 20 trading days by default, matching the innermost look-back — against price over the same window, and states a reading only where the arithmetic supports one: a fall of 15% or more on flat price, both falling together, both rising together, or no clear read. Open interest is a daily series whatever the chart shows, so the reading is the same on a 1 minute chart and a daily one.
The two sign readings compare only the direction of two changes, so they sit behind a floor: the open interest change must be abnormal and price must not be flat. The default floor of 10% was measured rather than chosen. Over 400 sessions with the quarterly roll weeks removed, the 90th percentile of the 20-day open interest change was about 14% on NQ and about 7% on ES; 10% sits between them. NQ's open interest runs roughly twice as noisy as ES's, so a chart dedicated to one instrument may want the floor moved.
The contract roll is refused outright. A continuous contract's open interest collapses by a third to a half in a session as the front month is abandoned, then rebuilds over the following week, and a window that spans one cannot be read for positioning. The panel fetches the largest one-day jump inside the window and, above 12%, reads contract roll instead of a signal until the window has cleared it.
Most instruments publish nothing. On those the panel names the symbol it looked for and says the reading is unavailable. It does not print a zero, and it does not infer open interest from volume or anything else.
The year map
Quarterly dividers run across the loaded history and project forward, so the year reads as quadrants rather than as one rolling window. Two spacings are offered — three month and four month — because ICT's IPDA material carries both as worked examples anchored at different points. They are the same rule applied from different places, not rival calendars, which is why this is a choice of grid rather than a claim about which one is correct. The 60-day look-back and look-forward is measured from wherever a shift actually sits, independently of the grid.
Keeping it readable
The vertical tags ride two rails outside the range — budget markers on the inner rail, the calendar on the outer — offset by a fraction of the 60-day range rather than by ATR. On a chart spanning a year an ATR cushion is a rounding error, which puts the tags inside the candles and on the same row as the level captions.
Because the range is the unit of measurement throughout, the spacing holds on any instrument and any timeframe without tuning.
By default every extreme is drawn black. The six levels are liquidity, and liquidity is neither bullish nor bearish — a level tinted by the direction of the last shift would be a bias call the script has no basis for. Which window a level belongs to is in its caption.
Each line family carries its own colour and width: the 60, 40 and 20 day levels, the equilibriums, the shift verticals and the calendar dividers. The defaults are set for a grey chart, where the usual light-grey neutral is the background itself and vanishes, so the secondary families use a dark slate instead. A level shared by several windows takes the colour and width of its tightest one. The panel header field has its own colour.
Non-repainting
Every daily figure is read from confirmed candles. Nothing is revised once its candle has closed, and no level, count or projection moves in hindsight. The lines extend rightward to the current bar while they are live — that is the drawing tracking the present, not its history changing.
Alerts
Three: a new shift confirmed and the 60-day budget restarted, fired on the close of the bar that placed the anchor; five or fewer sessions left of the budget; and the budget spent. The last two are evaluated once per day.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no bias, no trend and no projection of where price is going. A shift marker says a level was taken on that day; it does not say what happens next.
It does not rank the levels against each other or tell you which one price is drawn to. Whether a level inside the window is worth trading is a judgement about context this script does not have — session, higher timeframe draw, and what the day has already done.
It has no opinion on open interest where none is published, and no opinion on direction where the arithmetic does not support one. Both are stated as unavailable rather than filled in.
Settings
Quarterly dividers with their spacing and how far forward they project; the 20, 40 and 60 day bands each on their own switch; equilibrium on its own switch per window; the shift clock panel with its raid look-back and its minute-anchoring toggle; open interest with its comparison window and abnormal-move floor; and label size, tag rail offset, whether tags sit above or below the candles, right offset, the panel header colour, and a colour and width for each line family.
Attribution
IPDA, the 20/40/60 day look-back and the market structure shift are concepts from ICT's public teaching material. This is an original implementation of them. No third-party code is used.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. Индикатор

Stretch z distance from session VWAPStretch z — distance from session VWAP, normalised
Ten dollars from VWAP means something completely different on a dead Tuesday than it does thirty seconds after a number drops. Most "distance from VWAP" tools don't know that — they plot the raw dollar gap and leave you to eyeball whether it looks big today. This pane won't plot a number until it's been made to mean the same thing on any day, in any volatility regime, on any instrument.
The problem with a dollar amount
Raw distance from VWAP isn't comparable across sessions, let alone across symbols. A given point distance on gold during a quiet Asian session and the same point distance thirty seconds after a data release aren't the same event, even though the ruler says they are. The fix is standardisation: divide the raw distance by a measure of how far price normally sits from VWAP right now, and the number stops being "$10" and starts being "how unusual is this, given what unusual looks like today." Do that consistently and the reading also becomes portable — the same z = 2 means roughly the same thing on GC and on NQ, without retuning a single input between them.
Two normalisers, two different claims
You get an explicit choice, because the two options aren't interchangeable and I didn't want to hide that. Dividing by the rolling standard deviation of the spread produces an actual z-score — a statement about how many typical deviations price currently sits from VWAP, with the probabilistic interpretation that implies. Dividing by daily ATR instead produces a distance expressed in units of a familiar, point-based measure — easier to reason about at a glance, portable across timeframes you already think in ATR terms, but it is not a z-score, and the same band thresholds mean something different depending on which one you picked. The tool doesn't pretend these are the same thing wearing different clothes.
Don't trust a variance estimate you just started counting
There are two ways to estimate "normal" dispersion, and each has a real cost. A rolling window (60 bars by default) gives a stable estimate built on a real sample size, but it can straddle a session boundary — at 09:35 that window is still mostly measuring yesterday's regime, not today's. A session-anchored estimate restarts at the open and builds its variance forward, bar by bar, from a running sum and sum-of-squares (with Bessel's correction applied for a proper sample variance) — statistically cleaner, because it only ever describes the session you're actually in, but noisy and untrustworthy for the first handful of bars, when "normal dispersion" is being estimated off three or four data points. Rather than plot a confident-looking number built on a sample too small to support it, the pane suppresses the reading — and the alerts — until the estimate has enough bars behind it to mean something.
A parametric score deserves a non-parametric gut check
A z-score's "how unusual is this" framing leans on the reading behaving roughly like a normal distribution, and a futures spread doesn't always cooperate with that assumption. So alongside the z-score itself, the readout reports where the current |z| ranks against its own trailing 500-bar history — the same question, asked empirically, without needing the distribution to be well-behaved. If the two ever disagree meaningfully, that disagreement is informative on its own.
The bands aren't decorative — they're calibrated
Distance from VWAP isn't universally good or bad; what it means depends entirely on what you're trying to do with it. The readout scores the same z-band differently for three separate trade setups, and the weighting isn't monotonic in the same direction for all three — one setup scores highest when price sits close to VWAP and falls off as stretch increases, while another actually peaks in the 2–3σ band rather than near zero, which lines up with what earlier backtesting on that setup already found. Treating "how stretched is price" as a conditioning variable that different setups respond to differently, rather than a single filter everyone reads the same way, is the actual point of the table — a live, at-a-glance version of a relationship that was originally found by looking backward, not a number invented for the chart.
How I actually use it
Before taking any of the three setups this table tracks, I check the band and the points column, not just the raw z-score — a "big" z-score isn't automatically good or bad news, and the table already tells me which setup it favors and which it doesn't. The percentile column is my sanity check against the regime itself: a 2–3σ reading on a slow, thin session is a genuinely rare event; the same reading thirty seconds into a volatile one might barely be top-quartile, and the percentile is what tells the two apart when the z-score alone can't. The two band-cross alerts do the actual watching — I don't need to sit on the pane all session waiting for the reading to become interesting; it tells me when it has.
(Default window length and weights are set to match a scoring workbook I built earlier in this framework — you don't need that workbook to use this pane, but if the defaults look oddly specific, that's why.)
No time travel
Session VWAP is a standard, non-repainting session-anchored calculation. Daily ATR is retrieved through a security request with lookahead explicitly disabled and offset by one bar before the request, the documented non-repainting pattern for higher-timeframe data. Nothing on the pane, and no alert it fires, depends on information that wasn't available at the time.
What's proven, and what isn't yet
The normalisation logic and the small-sample discipline are sound on their own statistical merits — that part doesn't need a backtest to justify it. The per-setup weights are a different matter: they encode a relationship I'd already found in earlier research on this framework's setups, not a fresh statistical test run by this indicator itself, and the three band edges (1σ, 2σ, 3σ) are conventional defaults rather than something optimised inside this script. A companion scoring workbook in the same framework carries Monte-Carlo-validated adaptive thresholds; this pane trades that adaptivity for a lighter, always-on read, and it's worth knowing which tool you're looking at if the two ever disagree.
Limitations
Runs on any TradingView plan — unlike footprint-based tools, this only needs price and volume, not order-by-order data.
Built for standard candlestick charts; since it emits alertconditions, treat it like any signal-generating script and avoid Heikin Ashi, Renko, or other synthetic chart types.
Session-anchored mode needs roughly 20 bars into the session before its reading is trustworthy; the pane stays blank until then rather than show a number that isn't earned yet.
Default bands and setup weights are tuned for the framework and instrument I built this on; treat them as a starting point, not a universal constant, on a different symbol or session. Индикатор

Индикатор

Premium + Discount Ranges (M1D)Premium + Discount Ranges
Measures the range you are trading inside, the way it is read by eye from the newest swing point on a chosen timeframe across to the swing of the opposite kind, split into premium and discount either side of an equilibrium. Three ranges can run at once, each on its own timeframe, so an execution range can be read inside the higher one that frames it.
Two ways to bound a range
Period takes the timeframe's own high and low so far: one month is one range, it starts empty at the open and is gone at the rollover. It answers where price sits in the month.
Swing takes the newest confirmed swing high across to the newest swing low on that same timeframe, which owes nothing to the calendar and can run across many periods. It answers which structural range price is inside right now.
Each range picks its own mode, and the chart says which: "1M High" is this month's high, "1M Swing High" is the monthly swing high.
What counts as a swing
A swing is a level price actually turned at, not merely a high that sits above its neighbours while price kept running the same way. The candle has to hold the extreme against a chosen number of candles either side of it, and by default it also has to mark the change of direction — a swing high on the turn from an up candle to a down one, a swing low on the turn from down to up. That second condition can be switched off to accept any candle holding the extreme, regardless of what it turned into.
Every swing is read from candles already closed on its own timeframe, one bar clear of the newest bar, so nothing on a forming higher-timeframe candle can confirm or unconfirm it.
The raided edge
A confirmed swing is the last level price turned at, which is not always the edge of the range being traded right now — the moment a boundary is taken, the real range is already wider than the swings describe. Each boundary is carried out to the extreme price has actually reached since its swing confirmed, and draws dotted while it is out there: a level price has not yet turned at is a raid in progress, not structure. It settles back to solid the moment a new swing confirms behind it. This can be switched off to pin both boundaries to confirmed swings only, with price free to trade outside the range.
Direction and shading
The range is read from whichever swing formed most recently. A new swing low means price has already turned up away from it, so the leg is bullish and discount is the side being worked from; a new swing high reads the other way. The first range is shaded premium and discount by default; the shading can optionally lean toward the side being worked from, fading the other side back. Ranges two and three draw as bare levels by default so a bias range never muddies the range being traded.
Anchoring and labels
Every boundary starts at the candle that set it, never drawn back across bars that closed before that price existed. The equilibrium and the shading begin at the later of the two swings, because a range has no midpoint until both ends exist.
Each range's names can follow the global label settings or override them: centred over the range's own span, to the left, to the right, at the swing that set the level, or off. Two names landing on the same price are merged into one label rather than left stacked; two that land close together without being the same level are separated by a blank line rather than overlapping.
The readout
One panel, two blocks. The first names each active range's timeframe, whether it fits under the chart's own timeframe, which way it is working, which half of it price is trading in, and how far through it price has travelled. The second is a calendar statistic rather than a swing one: the average daily, weekly and monthly range over a chosen number of completed periods, how much of that average the current period has already used, and a countdown to the period's close.
Alerts
Six. Price crossing into premium, price crossing into discount, price trading the equilibrium, the range high taken, the range low taken, and a new swing redrawing the range. All six read the range being traded — range one.
Method and repainting
Swings on ranges two and three are read on their own timeframe via a higher-timeframe request; range one's swing test is likewise timeframe-bound to whichever timeframe is chosen for it. Every swing reads only candles already closed, one bar back, so nothing about it depends on lookahead revealing an unclosed bar.
A confirmed boundary moves only when a genuinely new swing prints. The one part of the drawing that is live by design is a boundary carried out to a raid in progress, and it draws dotted so that is visible rather than implied.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no trend line, no bias score and no target projection beyond the range itself. It does not identify order blocks, fair value gaps or liquidity pools — only the swing highs and lows that bound the range and the equilibrium between them.
Settings
Per range: on/off, timeframe, Period or Swing, label placement override, swing strength, premium/discount shading, boundary width. Swing definition: whether a direction turn is required, whether a raided boundary is carried out to price. Shading: premium and discount colours, transparency, whether the shading leans with direction and by how much. Lines: boundary and equilibrium colour and width, how far boundaries extend past the last bar. Labels: side and nudge for the high, low and equilibrium of each range, whether premium/discount get their own names, the collision distance that separates two close labels, whether price is shown in the label, label size and colour. Readout: show/hide, position, size. Average ranges: show/hide, lookback length for each of daily, weekly and monthly, and whether the close countdown is shown.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. Индикатор

KTI (Known Trends Index)█ OVERVIEW
The KTI (Known Trends Index) is a daily composite that counts how many of thirteen calendar-based seasonal stock market trends are in force on each trading day, plots the count as a histogram in a separate pane, and, because every component is a pure function of the calendar, also draws the index forward for every future trading day through January 31 of the following year. The thesis is that days on which several independent seasonal patterns are simultaneously favorable have historically behaved differently from days on which few or none are, and that this condition can be known entirely in advance.
█ HISTORY / BACKGROUND
The index implements the "Known Trends Index" defined by Jay Kaeppel in his book "Seasonal Stock Market Trends" (2008), Table 9.1. Kaeppel built the composite from seasonal patterns he either researched himself or credited to earlier analysts:
Yale Hirsch: the November to May favorable period.
Norman Fosback: the favorable trading days at the turn of each month.
Dick Stoken: the favorable window inside the four-year presidential election cycle.
Peter Eliades: the 212-week cycle.
The remaining components, including the midmonth trading days, the intradecade windows, the September penalty, and the mini summer rally, are from Kaeppel's own research in the same book. The conceptual basis is twofold. Some components have a proposed mechanism: recurring cash flows into the market at the turn and middle of each month from payroll-driven retirement contributions, sentiment effects around market holidays, and the political incentives of the election cycle. Others, such as the fixed-length 40-week and 212-week cycles, have no known cause and are included only because of their historical regularity. Kaeppel deliberately restricted the composite to trends whose status is knowable in advance, excluding his January barometer and MACD-filtered methods, which require waiting for market data.
█ HOW IT WORKS
On every daily bar the script evaluates the thirteen components below and sums them. Each favorable component adds one point; September subtracts one point.
Days of the month: trading day 1, 2, 3, 4, 9, 10, 11, or 12, or the last or next-to-last trading day of the month.
November to May: any day from November 1 through the third trading day of May.
Mini summer rally: the last three trading days of June and the first nine trading days of July.
September: every trading day in September counts minus one.
Election cycle window: October 1 of a midterm year through September 30 of the preelection year.
Election cycle window: November 1 through December 31 of the preelection year.
Election cycle window: June 1 through December 31 of the election year.
March 1 through July 31 of the preelection year.
Midterm election days: five trading days before through three trading days after the midterm election day, which the script computes as the Tuesday after the first Monday of November.
40-week cycle: the first 140 calendar days of each 280-day cycle anchored at the close of April 21, 1967.
212-week cycle: the first 184 calendar days of each 1,484-day cycle anchored at May 16, 1938.
Intradecade windows: October 1 of year 4 through March 31 of year 6; March 1 of year 8 through September 30 of year 9; and, in even-numbered decades only, October 1 of year 2 through December 31 of year 5.
Holiday window: within three trading days before through three trading days after each of the eight major market holidays used in the book (New Year's Day, Presidents' Day, Good Friday, Memorial Day, Independence Day, Labor Day, Thanksgiving, Christmas).
Because several components are defined in trading days rather than calendar days, the script reconstructs the US equity exchange holiday calendar in code rather than hardcoding dates. All date arithmetic uses GMT noon timestamps so that day differences are exact multiples of one day. The calendar engine computes nth-weekday holidays, last-weekday holidays, observed dates for fixed-date holidays (Saturday observed Friday, Sunday observed Monday), the rule that January 1 falling on a Saturday is not observed, and Good Friday from the Gregorian Easter algorithm. Martin Luther King Jr. Day (from 1998) and Juneteenth (from 2022) are treated as market closures for trading-day counting but are not KTI holiday windows, matching the book. Holiday lists, holiday-window boundaries, the midterm election window, and each month's last two trading days are cached once per year and once per month; a trading-day-of-month counter increments per bar.
The entire component evaluation lives in one function that takes an arbitrary date. The historical plot calls it with the current bar's date. The forward projection calls the same function: on the last bar, the script walks the calendar from the first of the current month (so the trading-day counter is exact) through January 31 of the next year, computes the KTI for every future trading day, and draws each nonzero value as a semi-transparent box at its future timestamp. The projection is rebuilt once per day, not on every tick, and rolls forward automatically at each new year.
█ HOW TO USE
Apply the script to a daily chart of a broad US large-cap index or its tracking fund. The book's benchmark was the Dow Jones Industrial Average. The logic is designed for the daily timeframe only, because every component is defined in exchange trading days; on any other timeframe the script plots nothing and the on-chart table shows a warning.
Visual elements:
Columns: the historical KTI reading. Red for readings of 1 or less, gray for 2, blue for 3 to 4, teal for 5 or more. These color bands correspond to the zones Kaeppel used in his Chapter 9 models: readings of 3 or more marked his long zone, 5 or more his most favorable zone, 2 neutral, and 1 or less his least favorable zone.
Dotted horizontal lines at 2 and 5 mark those zone boundaries; a solid line marks zero.
Semi-transparent boxes to the right of the last bar: the projected KTI for each future trading day through January 31 of next year, in the same colors. A small "projected" label marks where history ends. Future days with a reading of zero draw no box.
Top-right table: the current reading and a line-by-line list of which components are active today.
Four alert conditions are provided for crossings into and out of the reading zones (entering 3 or more, entering 5 or more, dropping below 3, dropping to 1 or less).
To see the projection, give the chart right-side margin in the chart settings or by dragging the price scale. The index is a seasonal context tool, not a trade signal generator; readings describe how many calendar patterns are active, nothing more.
█ SETTINGS
Show active components (default: on): toggles the top-right table listing the current reading and each active component.
Project KTI through Jan 31 of next year (default: on): toggles the forward-drawn boxes and the "projected" label.
█ WHAT MAKES IT ORIGINAL
The script is a complete, self-contained implementation of Kaeppel's published composite rather than a single seasonal filter. Three things distinguish it from typical seasonality scripts. First, it computes the exchange holiday calendar internally, including the Easter computation for Good Friday and observed-date rules, so components defined in trading days ("third trading day of May," "three trading days before Thanksgiving," "five trading days before the midterm election") are evaluated exactly rather than approximated with calendar days. Second, the same date-parameterized function produces both the historical plot and the forward projection, so the projected values are guaranteed to equal what the indicator will print when those dates arrive, barring an unscheduled exchange closure. Third, the forward projection itself: because Kaeppel restricted the index to trends knowable in advance, the script draws the full seasonal map for the year ahead, which is the property that makes this composite useful and which a bar-by-bar indicator cannot show.
█ NOTES / LIMITATIONS
Daily timeframe only. On any other resolution the plot returns na and the table displays a warning.
The projection is date-bounded: it always ends on January 31 of the year after the chart's last bar and is redrawn when a new daily bar prints.
Unscheduled exchange closures (for example September 2001, the 2012 hurricane closure, national days of mourning) are not modeled. Trading-day counts in those specific weeks, historical or future, can be off by one day.
Market closures on election days before 1970 are not modeled, which slightly shifts the earliest historical midterm windows.
The book's "six months" after each 212-week cycle start is implemented as 184 calendar days, chosen to match the entry and exit dates published in the book.
The 40-week component contributes nothing before its April 1967 anchor and the 212-week component nothing before May 1938, matching the periods over which Kaeppel defined them.
The holiday calendar is the US equity exchange calendar, so the script is meaningful only on US index or US ETF symbols with regular sessions.
The projection uses up to roughly 270 boxes when run early in a year; the script reserves 500 box objects, so no ceiling is hit, but other drawing-heavy scripts on the same pane are unaffected either way.
No claim is made about future results. The index counts calendar conditions; whether the historical tendencies Kaeppel documented persist is unknowable, a caution he repeats throughout the source text.
Индикатор

PyraTime True Trend Line (PTTL)PTTL builds a dynamic, vector-based geometric framework utilizing two extreme market pivots (A and B) and projects their mathematical structure forward in price and time. Because it processes its own internal OHLCV data array, it bypasses native TradingView history constraints, allowing historical vectors to act on live price action without breaking down.
Why This Works
Standard trend lines are notoriously subjective, often skewed by the user pulling lines to fit a narrative. PTTL removes user bias by hard-locking purely to mathematical extremes.
Furthermore, instead of relying on a generalized Volume Profile across the entire screen, PTTL isolates its Vector POC strictly within the A-B impulse leg. This explicitly traps the liquidity nodes associated only with the trend currently being analyzed, rather than mixing it with unrelated historical chop.
How This Works
The Core Buffer: The indicator continuously records high, low, close, and volume data into a 5,000-bar rolling array. This isolates the calculations from TradingView's visual history and prevents data from dropping out when zooming or scrolling.
Dynamic Geometry: In Auto mode, PTTL perpetually hunts for the most significant A and B pivots. Because this window is dynamic, historical structure migrates as stronger dominant highs/lows appear.
Harmonic Divisions: By treating the maximum price deviation from the true A-B line as a 100% boundary, the tool mathematically slices the resulting channel into exact geometric fractions (1/8, 1/3, 1/2, etc.) to highlight internal support/resistance nodes.
Time & Price Squaring (AB=CD): PTTL measures the span of the A-B impulse and demands that the Point C retracement validates within a strict time window. Once validated, it targets an identical price/time expansion (Target D), actively grading the setup as Pending, Success, or Failed based on real-time price intersection.
Settings Guide
Mode Selection: Choose between Auto (dynamically scanning) and Manual (locking Point A to a user-defined timestamp).
Manual — One-Click Anchor: Anchor Point A to a specific timestamp and price. Pivot B Search Window dictates how many bars forward the tool should scan before permanently locking Point B into place.
Auto Mode Settings: Adjust the Scan Window to define how many bars back the tool searches for major swings, and set a Minimum AB Span to ensure it doesn't anchor to microscopic, noisy swings.
Features & Visibility: Toggle overlays like the True Trend Line, Vector POC, Parallel Channel, and Reflection angle.
AB=CD Settings: Configure the time allowance for Point C to form. If Hide Failed Patterns is on, invalidated geometries clear immediately to keep the chart clean.
Projection Settings: Decide whether Time Cycles scale against the duration of the A-B leg (× AB duration) or project forward uniformly (Fixed bars).
Alert Triggers: Fire native TradingView alerts the moment price crosses the True Trend Line, the maximum-deviation Channel rail, or the isolated Vector POC. Индикатор

Индикатор

Liquidity Radar Engine Pools Sweeps and Next DrawThis script answers one question continuously: which pool of resting liquidity was taken most recently, was it reclaimed, and where is price likely being delivered next. It is a context and narration tool, not a signal generator. It never tells you to enter.
**The three pool states — the core idea**
Most liquidity tools mark a level and then delete it the moment price touches it. That throws away the information that matters. Here a pool moves through three distinct states, drawn differently at each:
- **LIVE** — resting, untouched, still a magnet.
- **SWEPT** — taken, but price has not closed back through the origin. The sweep may still fail. Nothing is confirmed yet.
- **RECLAIMED** — taken and price closed back through the origin. This is the completed sweep-and-reclaim, and it is the only state the narration treats as a story worth acting on.
Separating SWEPT from RECLAIMED is the entire point of the script. A sweep without a reclaim is not a setup, and collapsing the two into one "hit" state hides the distinction that decides whether anything happened.
**What it draws**
Pool levels are built from prior-period highs and lows, session extremes, equal highs and lows, and swing pivots, each drawn according to its state. A liquidity glow fades with pool age so stale levels visibly recede rather than cluttering the chart indefinitely. A Next Draw ring marks the nearest unswept pool in the direction of the current higher-timeframe bias — the level price is being pulled toward. A Delivery Map shows where price has been delivered from and to. A narration bar states the current condition in plain words; when it reads that no sweep has happened yet, there is no story and nothing to do.
**The two engines that gate the narration**
Higher-timeframe bias reads structure on a higher timeframe from pivot sequence and reports bullish, bearish, or neutral/choppy. Bias decides which side of a sweep is worth watching. It is a filter, never a position, and it never extends how long anything is held.
Lower-timeframe change-of-character confirms that structure on the entry timeframe has actually shifted after a reclaim. This is the difference between a level being touched and a level being rejected.
Response presets (Fast, Balanced, Strict, Manual) set the pivot left and right bar counts independently, trading detection latency against confirmation lag. This is worth being precise about: the presets change how soon an event is detected. They do not lower what counts as an event. Strict reproduces the original timing exactly.
**Optional breadth**
Advance-decline and TICK feeds can be requested to flag exhaustion. These require the relevant index symbols on your data plan. Without them the breadth row reads unavailable and everything else continues to work normally.
**Using it with the sequence engine**
This script publishes five numbered plots as an export bridge, intended to be read as external sources by the companion script "Liquidity Sequence Suite — 4-Confirmation Engine". Wiring them lets that script consume this one's pool ledger, next-draw level and bias rather than recomputing them, so both agree on what happened and when. Wire each numbered source to the matching numbered field once. The exports are display-only and cost nothing if unused — this script is fully standalone and needs no companion.
**Limitations and shortcomings — please read**
- Pivot-based structure confirms with lag by definition. A pivot is only a pivot once the required bars to its right exist, so higher-timeframe bias and change-of-character both arrive after the turn, not at it. Faster presets shorten that lag. Nothing removes it.
- Higher-timeframe values update while the higher-timeframe bar is forming. Intrabar bias and change-of-character states are provisional and can change within the bar.
- Prior-period level requests use the standard previous-bar idiom and do not repaint. The pivot requests use no lookahead. Nothing in this script draws a level earlier on history than it could have appeared live.
- Pool detection is capped for performance. On very long histories or very low timeframes the oldest pools are dropped, so panel counts reflect what is tracked rather than everything that ever existed.
- Breadth is optional and depends on your data subscription.
- This is a context tool. It produces no entries, no stops, no targets and no performance claim. It is an indicator, not a strategy.
- Nothing here is financial advice.
**Originality**
Written clean-room from a written specification of publicly described concepts — resting liquidity above highs and below lows, sweeps, reclaims, equal highs and lows, session and prior-period levels. No third-party source was consulted or adapted. All code is original.
Индикатор

Ghost Pattern Finder Ghost Pattern Finder searches an instrument’s historical price action for candle patterns that closely resemble a user-selected section of the current chart.
The idea is simple:
If price behaved like this before, what happened next?
Unlike a traditional pattern indicator, the script does not look for predefined formations such as triangles, flags, or head-and-shoulders patterns. Instead, you manually select the price sequence you want to analyze. The indicator then searches the instrument’s own history for similar market behavior and overlays the historical pattern directly on the selected area.
Candle-based Ghost Overlay
The historical match is displayed as a transparent candle overlay rather than only as a line.
This makes it possible to visually compare:
candle bodies
wicks
bullish and bearish sequences
local swings
volatility
acceleration and consolidation phases
the overall shape of the move
The overlay is intentionally semi-transparent so the original chart remains clearly visible underneath it.
Historical Candle Forecast
Once a qualified historical match is found, the candles that actually followed that historical pattern are projected forward.
The projected candles are therefore not generated by AI, regression, or mathematical extrapolation.
They are the real OHLC candles that occurred after the historical match, adjusted to the current price level and time scale.
The forecast should therefore be understood as a historical ghost, not as a guaranteed prediction.
Multi-Timeframe Search
The indicator can search neighboring timeframes automatically.
For example, when used on a 1-hour chart, it can compare patterns from approximately:
15 minutes
30 minutes
1 hour
2 hours
4 hours
A match from another timeframe is not required to have exactly the same number of candles.
Variable Pattern Duration
Historical market structures often develop faster or slower than the current pattern.
For this reason, the indicator also searches different pattern lengths within every timeframe.
By default, historical candidates can range from approximately:
0.5× to 2.0× the duration of the selected pattern.
All candidates are normalized before comparison.
This allows the indicator to recognize similar market behavior even when the historical event unfolded at a different speed.
Strict Ghost Qualification
The script does not simply display the best available candidate.
A historical pattern must pass several independent filters before it is accepted as a Qualified Ghost.
The qualification process evaluates:
overall price-shape correlation
correlation of the most recent part of the pattern
candle-body and wick similarity
swing/directional structure
normalized shape distance
robustness when the comparison window is slightly shortened or shifted
If no candidate meets the selected requirements, the indicator displays:
NO QUALIFIED GHOST
This is intentional. A weak historical similarity should not automatically produce a forecast.
Ghost Stability
Similar matches belonging to the same historical event are grouped into a Ghost Family.
This prevents slightly shifted versions of the same historical pattern from being treated as completely new signals.
The AUTO mode also favors the currently active ghost unless another qualified historical event becomes clearly superior.
The goal is to reduce unnecessary forecast switching when only a few new candles appear.
Multiple Ghosts
The indicator can retain several independent qualified historical matches.
The user can choose:
AUTO
Ghost #1
Ghost #2
Ghost #3
Ghost #4
Ghost #5
This allows manual inspection of alternative historical analogs instead of relying entirely on the algorithm’s highest-ranked candidate.
Adjustable Search Parameters
The settings allow control over:
timeframes included in the search
historical search depth
minimum and maximum pattern-duration scaling
search precision
correlation requirements
tail correlation
candle similarity
swing similarity
robustness
shape distance
ranking weights
ghost-family clustering
ghost switching sensitivity
Preset modes are available for easier use:
Strict, Balanced, Loose and Manual.
Appearance
Overlay and forecast visuals can be customized independently.
Users can adjust:
overlay bullish candle color
overlay bearish candle color
overlay wick color
overlay transparency
forecast bullish candle color
forecast bearish candle color
forecast wick color
forecast transparency
selected-pattern area
invalidation level
This allows the historical ghost to remain visible without hiding the original chart.
How to Use
Select a meaningful section of price action using the Pattern START and Pattern END inputs.
The indicator then:
Builds the selected candle pattern.
Searches historical data across the enabled timeframes.
Tests multiple historical pattern durations.
Scores and filters the candidates.
Groups similar candidates into historical Ghost Families.
Overlays the selected ghost as transparent candles.
Projects the actual historical candles that followed it.
For a conservative workflow, start with Ghost Strictness = Strict.
Important
Ghost Pattern Finder is a historical analog analysis tool.
Markets do not have to repeat previous behavior. A high-quality historical match only means that a similar sequence existed in the past; it does not mean the same outcome will occur again.
The projected candles show what happened after a historical analog, not what must happen next.
The indicator does not place trades and should be used as additional market context rather than as a standalone trading signal. Индикатор

Индикатор

Matrix Risk/RewardMatrix Risk/Reward is a visual trade-planning overlay. Click three points on the chart (entry, stop, target), then drag them. The script converts those prices into dollar risk, dollar reward, tick distance, risk/reward ratio, and live open P&L for the size you set.
It does not read your broker or prop-firm order ticket, and it does not place, modify, or cancel orders. The three points are planning levels you control.
HOW TO USE
1. Add the indicator to the chart.
2. Click Entry, then Stop, then Target.
3. Set Size to your contracts, lots, or units.
4. Click the indicator on the chart so the three points light up, then drag those points, not the dashed rays.
5. Read dollar SL/TP on the labels and in the table.
Direction is detected automatically: stop below entry = long, stop above entry = short. Stop and target must sit on opposite sides of entry for a valid R:R.
WHAT IT SHOWS
- Stop loss in dollars and ticks
- Take profit in dollars and ticks
- Open P&L in dollars
- Reward-to-risk ratio
- Dollars per tick
- Bid / ask / spread when a quote mode is active
- Colored risk and reward zones
OPEN P&L QUOTE
Last +/- spread (default, all plans): bid = last minus half spread, ask = last plus half spread. Longs mark to bid. Shorts mark to ask. Set Spread (ticks) to your market (1 is typical for MES, MNQ, ES, NQ).
Last price: uses the chart close only.
1-tick bid/ask (Ultimate): uses live 1-tick bid and ask. Requires a TradingView Ultimate plan. If those quotes are missing, it falls back to Last +/- spread.
POINT VALUE
Dollar math is price move x point value x size.
Leave Point value override at 0 to auto-detect common futures (MNQ 2, MES 5, NQ 20, ES 50, YM 5, RTY 50, GC 100, MGC 10, CL 1000, MCL 100, MYM 0.5, M2K 0.5). For other symbols the script uses the chart's built-in point value. If dollars look wrong, set the override yourself.
SETTINGS
Position: Size, point value override, open P&L quote mode, spread in ticks.
Levels: Draggable entry, stop, and target.
Display: Table, zone colors, and zone transparency.
NOTES
This is a calculator overlay, not a strategy and not a broker bridge.
If you want the dollars to match a live ticket, drag this tool onto those prices.
1-tick bid/ask is optional. Leave the default quote mode on unless you have Ultimate.
Not financial advice. Size, point value, and spread must match the instrument you are trading. Индикатор

Индикатор

Autoregressive Neural Network (LSTM) - Predict next price/closeOnline-trained neural network (MLP) that learns from every bar on the chart and forecasts the next bar's open and close. Written entirely in Pine Script, no external data or libraries.
═════════════════════════════════════════════
█ OVERVIEW
This indicator implements a small multilayer perceptron (MLP) in Pine Script with hand-written forward and backward passes. The network is trained incrementally as the chart plays out: on every bar it makes a prediction, compares it to what actually happened, and adjusts its weights by gradient descent. By the last bar it has learned from the entire price history available on the chart.
The output is a shaded box one bar to the right of the last candle showing the predicted open and close of the next bar, plus a strip at the bottom of the chart showing the fit quality on the most recent bars and the predicted next close.
═════════════════════════════════════════════
█ HOW IT WORKS
Inputs to the network
For each bar the network receives 2 x N features, where N is the "Window" input:
the last N close-to-close log returns
the last N overnight gaps (log of open / previous close)
All features are divided by a rolling standard deviation of returns, so the network sees volatility-normalized values rather than raw prices. This keeps the inputs on a similar scale regardless of the instrument or the year, which matters a lot for gradient training.
Architecture
Input layer (2N) -> hidden layers -> output layer (2 neurons: next open and next close, as normalized log returns from the current close).
The number of hidden layers ("Hidden layers") and neurons per layer ("Neurons per hidden layer") are user-configurable. The activation function can be tanh, ReLU or linear. Note that with "linear" the whole network collapses to a linear autoregressive model, which is useful as a baseline but not really a neural network.
Weights are initialized with Xavier/Glorot uniform initialization from a user-chosen seed, so results are reproducible.
Training
Training is online stochastic gradient descent:
On each historical bar the network first predicts that bar from the previous N bars, then performs one or more gradient steps ("SGD steps per bar") using the actual open and close as targets. The prediction is always made before the update, so the network never sees the bar it is predicting.
Optionally, at the last bar the network re-trains a few extra passes ("Replay epochs") over a buffer of the most recent bars ("Replay buffer") before producing the forecast. This refines the weights toward the current regime.
The loss is mean squared error on the two normalized outputs. Gradients are clipped to keep training stable on outlier bars.
Fit metric
After training, the network re-predicts the five most recent bars from their preceding N bars and computes the mean absolute error between predicted and actual close. The strip shows this as "Fit" = 100% - MAE%. A value of 99.2% means the predicted closes were on average 0.8% away from the actual closes.
Forecast
The trained network is fed the most recent N bars and its two outputs are converted back to price: next open = close x exp(predicted gap x volatility), next close = close x exp(predicted return x volatility). The box is green when the predicted close is above the predicted open, red otherwise.
═════════════════════════════════════════════
█ INPUTS
Window (lags N) - how many past bars feed the network.
Neurons per hidden layer and Hidden layers - network size. Larger is not automatically better; small networks (4-16 neurons, 1-2 layers) train faster and overfit less.
Activation - tanh (default), relu, or linear.
Learning rate - step size of gradient descent. Too high and the weights diverge; too low and the network barely moves from its random start.
SGD steps per bar - extra training on each bar, spread across history.
Replay epochs at last bar and Replay buffer - extra training at the last bar only. Keep the product of these small; Pine limits how long a single loop may run.
Vol normalization length - lookback for the volatility used to scale inputs and outputs.
Random seed - changes the initial weights.
═════════════════════════════════════════════
█ LIMITATIONS
The "Fit" number is an in-sample fit on bars the network has already trained on. It measures how closely the model tracks recent prices, not how well it forecasts. Because daily moves are small relative to price, this number will be high (98-99.5%) for almost any model, including "next close = current close".
One-bar-ahead price direction is very hard to predict on liquid instruments and daily timeframes. Do not expect this, or any similar tool, to reliably call the next candle. Treat the forecast box as a model output to study, not a trade signal.
Training is a single pass in chart order with a small number of extra steps, which is much weaker than offline training with many epochs. This is a constraint of running inside Pine Script.
On the live bar the training step uses the partially formed candle, so the forecast will move as the current bar develops.
Setting Replay epochs x Replay buffer too high triggers Pine's "loop takes too long" error. Reduce either value if that happens.
The indicator does not repaint historical bars, but the forecast box is recomputed on every tick of the last bar.
═════════════════════════════════════════════
█ NOTES
The code is fully open. The forward pass, backpropagation, and weight storage (flat arrays with layer offsets) are all in the script, so it can be used as a starting point for other Pine Script machine-learning experiments: adding volume or range as inputs, changing the loss, or predicting a different target such as volatility. Индикатор
