Indicator

Swing Persistence Profile - Pivot Width SurvivalSwing Persistence Profile ranks every swing high and swing low on the chart by the widest pivot
window it survives. It is also explicit about the exact bar on which that rank becomes knowable,
and it shades the region where it is not knowable yet.
THE IDEA
A pivot is not a property of a bar on its own. It is a property of a bar together with the width
of the window it was compared against. The same high is a swing high when you look two bars either
side, and is not a swing high when you look thirteen. Tools that ask you to pick one width and
then draw the result bury that choice inside a single number.
This script evaluates up to five widths at once - 2, 3, 5, 8 and 13 bars each side by default -
and records, for every bar, the widest width at which that bar is still the extreme of its window.
That number is the bar's persistence depth.
Because widening a window can only add constraints, the widths are strictly nested: a bar that is
the highest of its 13-bar neighbourhood is necessarily also the highest of its 8, 5, 3 and 2-bar
neighbourhoods. Depth is therefore a single ordered rank rather than five separate opinions that
have to be reconciled. A depth-13 swing is a depth-3 swing that kept going.
TIMING
A pivot of width w cannot be identified until w bars have closed after it. That is arithmetic, not
an implementation detail, and it means a bar's persistence depth is not final until the deepest
active width has passed.
There is one further subtlety that most pivot scripts leave in place. The w-th bar after the
candidate is itself still forming while it is the live bar, and its own high or low can still
invalidate the pivot. A script that reads the verdict during that bar will show a marker that
changes, or vanishes, before the bar closes.
This one waits one bar longer. Every verdict it reads comes from a bar that has already closed, so
the confirmation lag is the deepest active width plus one bar. A marker is created once, on the
bar it describes, and is then left alone: it is not moved, recoloured or deleted on later bars,
and it does not flicker intrabar either.
The bars still inside that delay are shaded, so the region where the answer can still change is
visible on the chart instead of being left to inference. Nothing inside the shaded region has been
ranked yet, so an empty shaded region means "not decided," not "no swings here."
WHAT IS DRAWN
A marker on each qualifying swing, placed on the bar that made the extreme, coloured and sized by
depth, optionally printing the depth as a number.
An optional structure line joining swings at or above one chosen depth, alternating between highs
and lows. The most recent segment extends if a later bar sets a more extreme value in the same
direction; once a swing in the opposite direction closes a segment, that segment is fixed.
An optional higher-timeframe reference: the price of the most recent confirmed swing high and
swing low measured on a higher timeframe, drawn as a stepped level. The requested expression is
offset by one bar and the request uses lookahead, which is the pair the Pine Script documentation
specifies for confirmed higher-timeframe values, so historical and realtime bars receive the same
series. The level therefore lags by the reference width plus one bar of the reference timeframe,
and that lag is the point rather than a defect.
Optional alerts on a swing reaching a chosen depth. The alert fires as many bars after the swing
as the deepest active width plus one; the swing itself is on the earlier bar. Because every
verdict is read from a closed bar, "Once Per Bar" and "Once Per Bar Close" fire on the same bar.
THE TABLE
"Swings" counts how many swings reached at least that depth across loaded history, highs and lows
together. "Kept" is the share of the previous row's swings that survived into this row. "Bars ea"
is the average number of bars per swing at that depth. The footer reports the confirmation lag in
bars and how many bars have been rated.
The survival ratios describe the instrument and timeframe you are looking at, not any particular
trade. If most depth-2 swings die at depth 3, the chart is producing many local extremes that do
not extend. If they survive, the same series is producing fewer and longer swings. Comparing that
profile across timeframes or across symbols is a way of choosing a swing width that matches how a
market actually moves, rather than choosing 5 because 5 is a common default.
Counts cover every bar of history the chart has loaded, so they are comparable between symbols
only when the loaded history is comparable.
SETTINGS
Depths in use activates between two and five of the width slots. Reducing it also shortens the
undecided region at the right edge, because that region is as long as the deepest active width
plus one settling bar.
Every depth threshold in the script - minimum depth to mark, minimum depth for the structure line,
and the alert depth - is stated in BARS EACH SIDE, not as a slot number. With the default widths,
"minimum depth 3" means the second of the five slots. A threshold set above the deepest active
width produces nothing, by design.
Enter the widths in ascending order. The ranking itself does not require it, but the table only
reads as a survival sequence when they ascend, and "Kept" can exceed 100% if they do not.
The higher-timeframe reference width is counted in bars of that timeframe: a width of 5 on a daily
reference means five daily bars each side.
WHO IT IS FOR
Anyone who uses swing points as an input to something else - reading structure, choosing the
lookback for a range or a channel, deciding how far back a level should be considered relevant -
and would rather see how sensitive those points are to window width than settle it by habit. It is
also usable as a calibration step before fixing a pivot length in another tool.
WHAT IT DOES NOT DO
It produces no entries, exits, targets, direction or bias, and nothing in it should be read as
one. It measures the geometry of the price series and stops there. Persistence depth describes
what has already happened; a deep swing is not evidence about what happens next.
NOTES
Highs and lows come from the chart series. On non-standard chart types - Heikin Ashi, Renko, Kagi,
Point and Figure, Range - those values are synthetic, and the depths will describe the synthetic
series rather than the market. The script declares alert conditions, so it should be used and
presented on a standard chart type.
PulseWire permits 500 labels and 500 lines per script. On long histories the platform drops the
oldest drawings as newer ones are created, so the left edge of a deep history may be bare. This
does not affect the table, which counts every rated bar.
Persistence depth for highs and lows, and the bar index each verdict refers to, are available in
the Data Window. Those values describe the bar named by "Swing bar index," not the bar the cursor
is on.
One data request is made for the higher-timeframe reference whether or not it is displayed, so
enabling it costs nothing extra.
ORIGINALITY
The built-in ta.pivothigh() and ta.pivotlow() functions are used as the primitive, as they are in
a great many scripts. Everything above them is written for this script: running several widths in
parallel, aligning their verdicts onto a common bar so that they can be compared, reducing them to
one nested rank, deferring every drawing until that rank is final on closed data, marking the
region where it is not yet final, and reporting the survival ratios between widths.
Open source under the Mozilla Public License 2.0. The logic is described above in enough detail to
be checked line by line against the source. Indicator

Universal Signal Backtester [LuxAlgo]The Universal Signal Backtester indicator is a tool designed to simulate and analyze the performance of virtually any trading signal, ranging from moving average crossovers to external indicator triggers. By providing a professional-grade backtesting environment directly on the chart, it allows users to optimize entry logic, exit strategies, and cost management in real-time.
🔶 USAGE
The script operates by selecting a Source Mode to define how trades are initiated. Users can choose between built-in MA crosses, external source crossovers, or discrete signal triggers from other indicators. Once a signal is detected, the script simulates a trade using up to three Take Profit (TP) and three Stop Loss (SL) levels.
🔹 Trade Visualization
* Sign Posts: Upon entry, the script plots a "Sign Post" label below or above the bar. This label dynamically suggests which TP level is currently the most effective based on the selected metric (e.g., Hit Rate or Expected Profit).
* Active Exit Lines: Horizontal dashed lines extend from the entry point to visualize the selected TP and SL targets. These lines update in real-time and mark hits with a checkmark (✓) or an "X" (✗).
* MA Ribbon: When using predefined crosses, a gradient ribbon is displayed to visualize the trend strength and crossover points.
🔹 Signal Modes
* Predefined Crosses: Quickly test standard strategies like the 9/21 EMA, 12/26 EMA, or the Golden/Death Cross (50/200 SMA).
* External Sources (Crossovers): Select two external plots (e.g., RSI and a level, or two custom MAs) to test their crossover performance.
* External Signals (Triggers): Connect the script to discrete signals such as Plotshapes or Boolean conditions. This is ideal for testing "Buy" and "Sell" signals from specialized indicators.
🔶 DETAILS
🔹 Advanced Analytics Dashboard
The indicator features a robust dashboard providing institutional-level metrics:
* Core Metrics: Total trades, Win Rate, Profit Factor, Sharpe Ratio, and Recovery Factor.
* Equity Curve: A sparkline representation of the account growth over time.
* Hourly Histogram: A performance breakdown by the hour of the day, helping identify the most profitable trading sessions.
* Heatmaps: A "Days of the Week" or "Monthly" heatmap that colors cells based on profitability, allowing for the identification of seasonal or periodic performance patterns.
🔹 Cost Simulation
To ensure realistic results, the script includes a cost engine. Users can select from profiles like Forex, Crypto, or Stocks to automatically apply industry-standard spreads and commissions, or input manual values to match a specific broker's fee structure.
🔶 SETTINGS
🔹 Source Settings
Source Mode: Determines the logic for trade entries (Predefined, External Crossover, or External Trigger). Signal Logic: Defines how external triggers are interpreted (e.g., Value Changes, Crosses 0, or Not NA). Trade Direction: Filters signals to allow only Longs, only Shorts, or Both.
🔹 Filters
Use ATR Choppiness Filter: When enabled, the script ignores signals that occur during low-volatility "choppy" periods.
🔹 Target Settings
Distance Type: Sets the measurement unit for TP/SL levels (ATR, Ticks, or Points). Take Profit (1-3): Toggles and sets the distance for up to three partial take-profit levels. Stop Loss (1-3): Toggles and sets the distance for up to three stop-loss levels.
🔹 Costs
Simulate Spread & Commission: Enables the cost engine for more realistic PnL calculations. Cost Profile: Presets for Forex, Crypto, and Stocks, or "Manual" for custom inputs.
🔹 Dashboard & Visuals
Heatmap Period: Switches the dashboard heatmap between "Days of Week" and "Months". Suggested TP Metric: Chooses the criteria the "Sign Post" uses to suggest the best TP level. Gradient Candle Coloring: Colors candles based on the distance between the fast and slow sources. Indicator

FVG Displacement & Fill Scoring [SlatinaTrades]📦 FVG Displacement & Fill Scoring — not every gap earns a box.
Most FVG tools draw every three-candle gap and call it a day. Chart full of boxes, no way to tell which one was actually worth anything. This one scores the displacement that created each gap, tracks its fill lifecycle bar by bar, then bins every completed zone into quartiles and reports whether the score actually separated the good gaps from the noise — on your symbol, your timeframe.
Bidirectional. Context only — no entries, no stops, no targets, no risk anywhere in the file.
THE MECHANICS
📐 Displacement score (0–100) — a weighted composite of gap size (in ATR), displacement-candle range (in ATR), and body/range ratio. Every weight and every normalization point ("gap ATR = full score at X") is a user input.
🔍 Measure-only probes — structure-break (did the displacement candle take out the most recent confirmed pivot?) and volume ratio (displacement volume vs. average) are computed, exported to alerts, and binned in the harness — kept out of the composite until they earn a place.
🚦 Regime, as a flag, not a gate — an HTF SMA direction read. It never blocks a zone from forming or scoring. It only tags the sample so the harness can slice regime-aligned vs. counter-regime.
🔁 Fill lifecycle — every zone moves FRESH → TAGGED → HALF → FULL, with an INVALIDATED branch. Box opacity fades with state so a glance tells you what's live and what's already resolved.
📊 Separation harness — completed zones get binned into quartiles by displacement score, and the table reports mean favorable excursion (ATR-at-tag units) per quartile against a baseline — with a minimum-sample trust flag so a 6-sample bin doesn't get read as gospel. Four slice filters (All / Regime-aligned / Counter-regime / Struct-broke / No-struct) let you test whether the score actually separates outcomes under a given condition.
🎨 Visuals — inline labels capped to the top-scoring live zones (anti-overlap nudge or cascade, optional leader lines), a 50% midline at the half-fill threshold, a callout arrow on the displacement candle, and a dashboard panel. Resolved zones stop drawing the moment they fill or invalidate — the harness still counts them, they just get out of the way.
🚫 Non-repainting — one request.security call, lookahead off. Detection, fill-state transitions, and alerts are all gated by barstate.isconfirmed. One honest exception: the regime read looks at the developing HTF bar in realtime, since it's a flag-only context tag, never a signal — worth knowing if you're auditing for repaint.
🔔 Alerts — FVG born, FVG fill change, FVG any event. Each carries a JSON payload (direction, score, state, structure flag, volume ratio, zone bounds, fill depth) for webhook consumption.
📐 Built for
Any symbol and timeframe where FVGs form — bidirectional, so demand and supply gaps are both first-class. Optional session filter narrows detection to a chosen window if you only want gaps born inside specific hours. Give the harness enough history to clear your minimum-sample threshold before trusting the quartile read.
⚙️ Note
Context tool, not a signal generator.
Built to pass one test: still useful after it's been on your chart a while. — SlatinaTrades Indicator

Indicator

Indicator

Random Forest AI - RSI MACD Confluence [Dots3Red]█ RANDOM FOREST AI — RSI MACD CONFLUENCE
This script combines 15 simple, independent decision rules ("trees") into one weighted verdict. Each tree looks at a different combination of RSI, MACD, ATR, volume, DMI, and price-vs-moving-average conditions and casts one vote: bullish, bearish, or neutral. What makes this different from simply averaging several indicators is that every tree's historical accuracy is tracked continuously, and that accuracy becomes the tree's voting weight — a rule that has actually been right more often on this specific chart counts for more than one that hasn't.
█ WHY THIS APPROACH
A single indicator like RSI applies the same fixed rule forever: "below 30 means buy," regardless of whether that rule has been working lately on the instrument you're watching. It has no way to notice that its own signal has become less reliable in a strong trend, or more reliable during a ranging period.
This script addresses that by running many small, simple rules in parallel and grading each one against what actually happened afterward. A rule's influence on the final verdict rises when it's been accurate and falls when it hasn't — without requiring the trader to manually decide which indicator to trust in current conditions.
This is a simplified, Pine-native ensemble. A literal machine-learning Random Forest trains via recursive data-splitting across bootstrap-sampled datasets, which isn't something Pine Script's execution model supports. What's implemented here captures the core idea in a form that runs natively on every bar: multiple diverse, simple voters, weighted by empirical track record rather than by a fixed formula.
█ HOW IT WORKS
1. Base features
Six indicators are computed every bar and feed into the trees:
• RSI (configurable length)
• MACD histogram
• ATR ratio — current ATR relative to a 50-bar baseline (volatility context)
• Volume ratio — current volume relative to its moving average
• DI difference — +DI minus -DI from the DMI system (directional pressure)
• Price vs. moving average — distance from a trend MA, expressed in ATR units
2. The 15 trees
Each tree is a short, explicit rule combining two or three of the base features. They are deliberately varied in character:
• Some are trend-following (DI direction, MACD momentum, full trend confluence combining three features at once)
• Some are contrarian / mean-reversion (an extreme price extension combined with an extreme RSI reading votes for a pullback, not a continuation)
• Some are volatility-filtered (an RSI extreme only counts when the ATR ratio shows calm conditions, on the reasoning that overbought/oversold readings are less reliable during high volatility)
• Some require multi-indicator confluence before voting at all (MACD direction agreeing with volume expansion, or RSI agreeing with MACD)
Any single tree by itself is simplistic. The value comes from having 15 of them looking at the situation from different angles simultaneously.
3. Historical grading and weighting
Every tree's vote from a configurable number of bars ago ("Outcome Window") is compared against what price actually did between then and now. If the tree voted bullish and price rose, that's a correct call; if it voted bullish and price fell, that's incorrect. A running hit/total count is kept per tree.
Each tree's weight is its accuracy rate (hits ÷ total) once it has accumulated a minimum number of graded votes. Before that minimum is reached, a tree counts at a neutral 0.5 weight so early, unproven trees don't disproportionately swing the verdict.
4. The forest verdict
Bullish and bearish contributions are summed across all 15 trees, weighted by each tree's current accuracy, then expressed as a percentage split (e.g. 73% bullish / 27% bearish). The overall verdict — BULLISH, BEARISH, or NEUTRAL — is determined by configurable thresholds (default: 60% for bullish, below 40% bullish-share for bearish).
5. RSI confluence
Separately from its role inside the 15 trees, RSI's classic overbought/oversold state is checked against the forest's overall verdict. If RSI is oversold and the forest is bullish, that's flagged as "AGREE." If RSI is oversold but the forest is bearish, that's flagged as "CONFLICT." This gives a second, independent read using the indicator most traders already know, alongside the ensemble's own conclusion.
█ SIGNAL MARKERS AND SPACING
A marker appears only when three conditions line up at once: the forest's weighted verdict crosses its threshold, RSI's classic overbought/oversold state independently agrees with that direction, and the bar has fully closed. Markers never appear on a still-forming bar — the script waits for bar confirmation so a marker never appears and then vanishes as the live bar changes.
Each marker is drawn in two parts: a small triangle at the bar, and a text block showing three values — the weighted percentage that triggered it, the word AGREE confirming RSI's independent agreement, and how many of the 15 trees were actively voting (non-neutral) at that moment. A reading of "73% / AGREE / 9/15 trees" carries different weight than "61% / AGREE / 4/15 trees," even though both pass the threshold — the first reflects broad participation across the ensemble, the second a thin majority among few active voters.
Two mechanisms prevent marker clutter on intraday timeframes:
• One marker per episode — when the verdict enters a bullish or bearish state, only the first qualifying signal of that run is marked. The verdict flickering around the threshold (61% → 59% → 62%) does not produce repeated markers; the internal latch resets only when the verdict genuinely changes state.
• Signal Cooldown — a configurable minimum number of bars between same-side markers, which absorbs the remaining case where a brief state change resets the latch and the condition re-triggers shortly after. On a 5-minute chart, a cooldown of 30 bars means at least 2.5 hours between same-direction markers.
Both mechanisms apply per direction — a bearish marker shortly after a bullish one is never suppressed, because an ensemble flip is meaningful information rather than clutter.
█ READING THE CHART
Bar coloring tints candles by the current verdict — cyan for bullish, magenta for bearish, slate for neutral.
Dashboard (top-right by default) shows the current verdict, the bull/bear percentage split with a progress bar, how many trees are actively voting, RSI's state and its agreement with the verdict, and a breakdown of five representative trees showing each one's live weight and how many samples that weight is based on.
█ SETTINGS
Feature Settings — lengths for RSI, MACD, ATR baseline, volume MA, DMI, and the trend MA used by the price-vs-MA feature.
Ensemble Settings
• Outcome Window (bars) — how far ahead each vote is checked against actual price movement
• Min Samples Before Weighting — how many graded votes a tree needs before its real accuracy replaces the neutral 0.5 default
• Bullish / Bearish Threshold % — where the weighted percentage split has to cross before the verdict label changes
Visualization
• Color Bars by Verdict — toggle candle tinting
• Show Confluence Markers — toggle the triangle markers
• Signal Cooldown (bars) — minimum bars between same-side markers; raise this on lower timeframes if markers feel too frequent
Dashboard — toggle the table, choose its position, toggle the per-tree accuracy breakdown.
█ EXAMPLE
Suppose the dashboard shows: Verdict BULLISH, 73% / 27%, 9/15 trees active, RSI at 28 (OVERSOLD), Agreement: AGREE. This means the weighted vote across all 15 trees currently favors upside by roughly 3-to-1, nine of the trees have a non-neutral opinion right now, and the classic RSI reading independently supports the same bullish read. If the per-tree breakdown shows "Calm-Market RSI" at 78% (n=45) while "RSI Extremes" sits at 52% (n=45), that's telling you the version of the RSI rule that only fires during low volatility has actually been considerably more reliable on this chart than the raw, unfiltered version — information a plain RSI plot could never surface on its own.
█ NOTES
Weights start neutral and only become meaningful once each tree has accumulated enough graded votes (set by "Min Samples Before Weighting"). On a fresh chart or a newly added timeframe, expect the dashboard's percentages to be less informative until that history builds up. The ensemble adapts continuously — a tree's weight can and will drift as market conditions change and its track record evolves.
On intraday timeframes, tune the Signal Cooldown to the chart's pace. The default suits higher timeframes; 5-minute and 15-minute charts generally benefit from a larger value.
█ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical accuracy of any individual rule or the ensemble as a whole does not guarantee future performance. Indicator

Liquidity HeatmapLiquidity Heatmap – POC and Value Area.
A rolling volume-density profile rendered directly onto the price chart. Over a configurable lookback window the indicator distributes each historical bar's volume across every price bin its high-low range covered, then draws the resulting distribution as color-graded horizontal lines at each bin's midpoint. Point of Control and Value Area (70 % of total volume) are computed automatically, and a compact right-side histogram mirrors the profile in the future-offset zone. Built for intraday and swing traders who want a live, minimal read of where the market actually did business — the real liquidity anchors, not manual pivots.
How it works:
The indicator recalculates every N bars (default 5). On each recalc it finds the highest and lowest price of the lookback window, splits that range into a configurable number of bins (default 40), and iterates through every bar in the window. For each bar its volume — or a unit weight if volume weighting is disabled — is added to every bin whose price range the bar crossed. The result is a density array: the more time price stayed inside a bin and the higher the volume of those bars, the larger its density value. Bins are drawn as thin horizontal lines at their midpoints, with color and transparency scaled by the ratio of bin density to peak density.
The Point of Control is the bin with the largest total. Value Area is grown outward from POC, alternately taking whichever adjacent side holds more volume, until 70 % of the entire distribution is covered — VAH becomes the upper boundary of that region and VAL the lower. A right-side density histogram in the chart's offset zone re-renders the same profile in bar-chart form, and the level labels (POC / VAH / VAL) sit past the histogram so they never overlap the main heatmap. The information panel in the top-right corner shows the numeric price of each level and its signed percentage delta to the current close, color-coded green when the level sits above price, red when below, gray at parity.
What it calculates:
- Volume density per price bin over the lookback window
- POC — Point of Control, the bin with peak accumulated volume
- VAH — Value Area High, upper boundary of the 70 % volume region
- VAL — Value Area Low, lower boundary of the 70 % volume region
- Signed delta from current close to POC / VAH / VAL, in percent
Key features:
- Rolling recalculation every N bars for tunable CPU / responsiveness balance
- Volume weighting (default) or touch-count mode as a per-price frequency map — useful when volume data is unreliable
- Four-stop plasma color gradient (deep navy → violet → magenta → amber), every stop user-overridable via input.color
- Constant 1-pixel line width across all bins; visual weight is carried entirely by color intensity and transparency
- POC solid line and label placed past the offset histogram for readability
- VAH / VAL dashed lines extended all the way to their labels so the eye follows the level continuously
- Compact right-side density histogram in the future-offset area, mirroring the main profile in bar-chart form
- Top-right information panel with POC / VAH / VAL price and signed percentage delta to the current close, colored by side (green above / red below / gray at parity)
- Independent visibility toggles for POC and Value Area
- Adaptive bin geometry — resolution scales automatically with the price range of the lookback window
- Runs on any timeframe and any instrument; no external data sources required
Who it's for:
Intraday scalpers, swing traders, order-flow and Market Profile practitioners who need to see the true volume anchors of the current regime instead of hand-drawn horizontals. The color-graded strips make dominant liquidity walls, thin gaps and Value Area boundaries visually obvious at a glance, so attention goes to execution rather than to marking up the chart. Indicator

Lobster BoardTG - lobsterstein
Таблица выводит следующие параметры (в порядке строк):
1. DV (Day Volume) - Дневной объем
Что показывает: Общий объем торгов за текущий день в долларах США
Как рассчитывается: Сумма объема * цена закрытия за 24 часа (период "60" - 60-минутные свечи)
Формат: Автоматическое форматирование (B - миллиарды, M - миллионы, K - тысячи)
Порог срабатывания: Подсвечивается желтым при превышении thresholdDayVol (по умолчанию 100,000,000 $)
2. AV (Avg Volume) - Средний объем
Что показывает: Средний объем торгов за указанный период
Как рассчитывается: Среднее арифметическое объема * цена закрытия за avgVolLength дней (по умолчанию 30)
Формат: Автоматическое форматирование (B - миллиарды, M - миллионы, K - тысячи)
Порог срабатывания: Подсвечивается желтым при превышении thresholdAvgVol (по умолчанию 3,000,000 $)
3. N (NATR) - Normalized Average True Range
Что показывает: Нормализованный средний истинный диапазон в процентах от цены
Как рассчитывается: ATR / Close * 100 с использованием выбранного типа скользящей средней (SMA/EMA/RMA/WMA)
Формат: Проценты с 2 знаками после запятой (например, "1.25 %")
Порог срабатывания: Подсвечивается желтым при превышении thresholdNatr (по умолчанию 1.0)
4. MN (MAX NATR) - Максимальный NATR
Что показывает: Максимальное значение NATR за всё время работы индикатора на графике
Как рассчитывается: Использует ту же формулу, что и NATR (ATR / Close * 100), но сохраняет максимальное достигнутое значение за весь период с момента запуска индикатора
Особенности: Значение накапливается с каждым новым баром, обновляясь при превышении предыдущего максимума. Сброс происходит только при перезапуске индикатора или смене таймфрейма
Формат: Проценты с 2 знаками после запятой (например, "2.45 %")
Порог срабатывания: Подсвечивается желтым при превышении thresholdNatr (по умолчанию 1.0)
5. C (Correlation) - Корреляция
Что показывает: Корреляция цены текущего инструмента с выбранным инструментом
Как рассчитывается: Коэффициент корреляции Пирсона за corrPeriod (по умолчанию 20) между ценой текущего инструмента и corrTicker
Формат: Число с 2 знаками после запятой (от -1 до 1)
Порог срабатывания: Нет подсветки
Дополнительная информация:
Позиционирование таблицы: Настраивается через параметр "Board position" (5 вариантов: Right top, Right bottom, Center bottom, Left bottom, Left top)
Ширина ячейки: Регулируется через параметр "Cell width" (от 1 до 20)
Отображение: Каждый параметр можно включить/отключить через соответствующие булевы настройки (Show Day Volume, Show Avg Volume, Show NATR, Show MAX NATR, Show Correlation)
Заголовки: Можно включить/отключить отображение кратких названий через параметр "Show titles"
IN ENGLISH
The table displays the following parameters (in order of rows):
1. DV (Day Volume) – Daily Volume
What it shows: Total trading volume for the current day in US dollars
How it is calculated: Sum of (volume * close price) over 24 hours (using "60" – 60‑minute candles)
Format: Automatic formatting (B – billions, M – millions, K – thousands)
Alert threshold: Highlighted in yellow when exceeding thresholdDayVol (default 100,000,000 $)
2. AV (Avg Volume) – Average Volume
What it shows: Average trading volume over the specified period
How it is calculated: Arithmetic mean of (volume * close) over avgVolLength days (default 30)
Format: Automatic formatting (B – billions, M – millions, K – thousands)
Alert threshold: Highlighted in yellow when exceeding thresholdAvgVol (default 3,000,000 $)
3. N (NATR) – Normalized Average True Range
What it shows: Normalized average true range as a percentage of the price
How it is calculated: ATR / Close * 100 using the selected moving average type (SMA/EMA/RMA/WMA)
Format: Percentage with 2 decimal places (e.g., "1.25 %")
Alert threshold: Highlighted in yellow when exceeding thresholdNatr (default 1.0)
4. MN (MAX NATR) – Maximum NATR
What it shows: The maximum NATR value over the entire chart history
How it is calculated: Uses the same formula as NATR (ATR / Close * 100), but stores the highest value reached since the indicator was started
Features: The value accumulates with each new bar, updating when a new maximum is reached. It resets only when the indicator is restarted or the timeframe is changed
Format: Percentage with 2 decimal places (e.g., "2.45 %")
Alert threshold: Highlighted in yellow when exceeding thresholdNatr (default 1.0)
5. C (Correlation) – Correlation
What it shows: Correlation between the current instrument’s price and a selected instrument
How it is calculated: Pearson correlation coefficient over corrPeriod (default 20) between the current instrument’s close and corrTicker’s close
Format: Number with 2 decimal places (range -1 to 1)
Alert threshold: No highlighting
Additional information:
Table positioning: Adjustable via the "Board position" parameter (5 options: Right top, Right bottom, Center bottom, Left bottom, Left top)
Cell width: Adjustable via the "Cell width" parameter (from 1 to 20)
Display: Each parameter can be enabled/disabled via the corresponding boolean settings (Show Day Volume, Show Avg Volume, Show NATR, Show MAX NATR, Show Correlation)
Titles: Can be shown/hidden via the "Show titles" parameter Indicator

MA Retest StrategyMA Retest Strategy
Overview
MA Retest Strategy is a trend-following system built around a simple but powerful idea: price rarely moves in a straight line — it pulls back to test a moving average before continuing in the direction of the trend. Instead of just plotting two moving averages and leaving you to guess, this indicator turns that pullback-and-continuation behavior into a complete, rule-based trade framework: it detects the retest, marks the exact entry, calculates a volatility-aware stop-loss and take-profit, tracks the outcome of every signal, and even scans four other symbols of your choice for the same setup in real time.
The trend direction is defined by two Exponential Moving Averages (EMA) — a fast one (default length 50) and a slow one (default length 200). Their relationship (fast above slow = uptrend, fast below slow = downtrend) is combined with a retest of the fast EMA: price must pierce through the fast EMA against the trend and then close back on the trend side. That close is the signal.
Trading Logic
Long entry conditions:
1. The fast EMA is above the slow EMA (uptrend).
2. Within the last few bars, price has pierced below the fast EMA (a genuine pullback, not just noise).
3. The current candle closes back above the fast EMA, confirming the retest is over and the trend is resuming.
When all three conditions align, the indicator plots a BUY label, and immediately draws four price levels: Entry, Stop-Loss, Take-Profit, and Breakeven, each as a line with a live price tag on the right edge for easy order placement.
Short entry conditions are the mirror image: fast EMA below slow EMA, a pierce above the fast EMA, and a close back below it.
If price is currently trading between the two moving averages (neither clearly above nor below), no new signal is evaluated — this "no man's land" filter avoids chasing signals in a choppy, undecided market.
Once a setup is triggered, it stays open (as a pending order, then as an active trade once price reaches the entry) until it's resolved by hitting the stop, hitting the target, timing out, or being invalidated by an opposite signal — only one setup per direction is ever open at a time, and an opposite signal automatically cancels whatever is currently active.
Risk Management
The stop-loss is never left to guesswork. You can choose between three calculation methods:
• Swing (High/Low): stop placed at the nearest swing low/high within a lookback window.
• ATR: stop placed at a multiple of the Average True Range from the entry price — automatically adapts to the current volatility of the instrument.
• Percent of Price: a fixed percentage distance from the entry price.
Regardless of the method chosen, a hard risk ceiling (expressed as % of price) prevents the stop from ever being placed unreasonably far away — for example because of a single abnormal wick or a bad tick in the data feed. Swing mode additionally has its own volatility-aware clamp (a maximum deviation expressed in ATR multiples), since raw swing highs/lows are the most exposed to being skewed by one outlier candle.
The take-profit is calculated as a multiple of the initial risk (an "R-multiple"), and a separate breakeven marker line shows where price would need to reach for you to consider moving your stop to entry — because in a mean-reversion-to-trend system like this, once price reaches roughly 1R in your favor, the probability of it snapping back toward the moving average (rather than continuing cleanly to the full target) increases, so protecting the trade at breakeven is a sound practice.
Dual Dashboard System
Statistics Panel — tracks every signal the indicator has generated on the current chart and breaks the results down into Take-Profit, Stop-Loss, and Breakeven outcomes (a stop hit after price already touched the breakeven level is counted separately from a "clean" stop-loss, since in practice you'd have moved your stop by then). You can filter the statistics to the full history, the last N days, or from a fixed date — ideal for quickly gauging how well the current settings are performing on a specific symbol before you commit to trading it.
Symbol Scanner — lets you monitor up to five other symbols for the exact same setup, in real time, without leaving your current chart. For each symbol it shows whether a signal is currently pending or already active, in which direction, and its entry/stop/target levels. Note: the scanner applies the same strategy settings (moving average lengths, stop method, R-multiple, etc.) that are set for the main chart — it is not independently configurable per symbol.
How to Use
1. Open the symbol and timeframe you're interested in, and check the Statistics panel — a strong win rate and consistent R:R suggest the market is currently trending cleanly enough for mean-reversion entries to work.
2. If the recent win rate is high, the market is respecting the moving average structure and the setup is worth trading. If it's dropping, the market may be entering consolidation — better to wait for a cleaner trend to re-establish.
3. Use the plotted Entry/Stop/Take-Profit/Breakeven lines and their price tags to place your actual order.
4. Once price reaches the breakeven marker, consider moving your live stop-loss to entry — this is a discretionary decision the indicator flags for you but does not automate.
5. Use the Symbol Scanner to keep an eye on other assets in your watchlist without switching charts constantly.
Settings Reference
General
• Source — the price series used to calculate both moving averages (default: Close).
Moving Average
• MA fast — length of the fast EMA (default 50).
• MA fast line width — plot thickness of the fast EMA.
• MA slow — length of the slow EMA (default 200).
• MA slow line width — plot thickness of the slow EMA.
• Bull color / Bear color — color of each MA line and of the shaded fill between them (tinted according to current trend direction).
Strategy
• MA Pierce Check Window (bars) — how many recent bars are checked to confirm price genuinely pierced the fast EMA before the retest close (default 3).
• Swing Point Lookback (bars) — lookback window used to find the nearest swing high/low for Swing-mode stops, and also used as part of the warm-up gate before the indicator starts evaluating signals (default 10).
• Take Profit, R (risk multiple) — target distance expressed as a multiple of the initial risk (default 3 = 3R).
• Max Bars in Open Setup (timeout) — if a signal doesn't resolve (neither stop nor target hit) within this many bars, it's force-closed and logged separately as a timeout rather than left open indefinitely (default 300).
• Stop Loss Calculation Method — choose between Swing (High/Low), ATR, or Percent of Price.
• ATR Length — averaging period for the ATR calculation (default 14).
• ATR Multiplier for Stop — multiplier applied to ATR when the Stop mode is set to ATR (default 1.5).
• Stop, % of Entry Price — fixed stop distance used only when the Stop mode is set to Percent of Price (default 1%).
• Max Allowed Risk, % of Price — hard ceiling on stop distance, applied regardless of the selected mode, to protect against abnormal candles or bad data ticks (default 5%).
• Also Cap Swing Stop by ATR (recommended) — an additional, volatility-adaptive safety clamp that applies only in Swing mode, tighter and more responsive than the flat percentage cap.
• Max Swing Stop Deviation, x ATR — multiplier for the clamp above (default 3).
• Move to Breakeven, R (risk multiple) — the R-distance at which the breakeven marker line is drawn (default 1 = 1R).
Visualization
• Show BUY/SELL Labels — toggle the signal labels on the chart.
• Show SL/TP/BE Price Tags on Lines — toggle the live price tags at the right edge of each level line.
• Fill Risk/Reward Zones — toggle the shaded risk/reward boxes.
• BUY Label Color / SELL Label Color — colors of the signal labels.
• Entry Line Color / Stop Loss Line Color / Take Profit Line Color / Breakeven Line Color — colors of the four level lines.
• Reward Zone Color / Risk Zone Color — colors of the shaded zones.
• Entry/SL/TP Line Width — thickness of the level lines.
Statistics
• Show Statistics Panel — toggle the on-chart stats table.
• Panel Position — corner of the chart where the table is drawn.
• Text Size — table font size.
• Statistics Period — All History, Last N Days, or From Fixed Date.
• N Days Back — used when Statistics Period is set to "Last N Days".
• Start Date — used when Statistics Period is set to "From Fixed Date".
Symbol Scanner
• Show Scanner for Other Symbols — toggle the scanner table.
• Symbol 1–5 — the five symbols to monitor.
• Scanner Timeframe — timeframe used for the scan; leave blank to match the current chart's timeframe.
• Scanner Panel Position — corner of the chart where the scanner table is drawn.
• Scanner Panel Text Size — scanner table font size.
Alerts
The indicator includes two ready-to-use alert conditions — Buy signal and Sell signal — that fire once per bar close and include the entry price, stop-loss, take-profit, and their distance in ticks directly in the alert message, so you can act on them without needing to open the chart.
Disclaimer
This indicator is a tool to assist with technical analysis and trade planning — it does not constitute financial advice, and past signal performance shown in the Statistics panel is not a guarantee of future results. Always combine it with your own risk management and market context.
Обзор
MA Retest Strategy — это трендовая система, построенная вокруг простой, но рабочей идеи: цена редко движется по прямой — она откатывается к скользящей средней для ретеста, прежде чем продолжить движение по тренду. Вместо того чтобы просто отрисовать две скользящие средние и оставить трейдера гадать, этот индикатор превращает такое поведение "откат-продолжение" в полноценную систему с чёткими правилами: он находит ретест, отмечает точный вход, рассчитывает стоп-лосс и тейк-профит с учётом волатильности, отслеживает исход каждого сигнала и даже сканирует ещё четыре выбранных вами актива на предмет такой же ситуации в реальном времени.
Направление тренда определяется двумя экспоненциальными скользящими средними (EMA) — быстрой (по умолчанию период 50) и медленной (по умолчанию период 200). Их взаимное расположение (быстрая выше медленной — восходящий тренд, быстрая ниже — нисходящий) сочетается с ретестом быстрой EMA: цена должна проколоть быструю EMA против тренда, а затем закрыться обратно на стороне тренда. Это закрытие и есть сигнал.
Логика торговли
Условия входа в лонг:
1. Быстрая EMA выше медленной EMA (восходящий тренд).
2. За последние несколько баров цена проколола быструю EMA вниз (настоящий откат, а не рыночный шум).
3. Текущая свеча закрывается обратно выше быстрой EMA, подтверждая, что ретест завершён и тренд возобновляется.
Когда все три условия совпадают, индикатор рисует ярлык BUY и сразу же размечает четыре ценовых уровня: вход, стоп-лосс, тейк-профит и безубыток — каждый в виде линии с "живым" ценником у правого края для удобной постановки ордера.
Условия входа в шорт зеркальны: быстрая EMA ниже медленной, прокол быстрой EMA вверх, и закрытие обратно ниже неё.
Если цена в данный момент находится между двумя скользящими средними (не выше и не ниже отчётливо), новый сигнал не рассматривается — этот фильтр "нейтральной зоны" не даёт индикатору гнаться за сигналами на "рваном", неопределившемся рынке.
После срабатывания сетап остаётся открытым (сначала как отложенный ордер, затем как активная сделка после достижения цены входа), пока не будет закрыт по стопу, по тейку, по тайм-ауту или отменён встречным сигналом — в каждый момент времени открыт только один сетап на направление, и встречный сигнал автоматически отменяет текущий активный.
Управление риском
Стоп-лосс никогда не рассчитывается "на глаз". Доступны три метода расчёта:
• Свинг (high/low): стоп ставится на ближайший минимум/максимум в пределах окна поиска.
• ATR: стоп ставится на расстоянии, кратном среднему истинному диапазону (ATR) от цены входа — автоматически подстраивается под текущую волатильность инструмента.
• Процент от цены: фиксированное процентное расстояние от цены входа.
Независимо от выбранного метода, жёсткий лимит риска (в % от цены) не позволяет стопу оказаться неоправданно далеко — например, из-за одиночного аномального фитиля или сбойного тика в данных биржи. У режима "Свинг" есть дополнительный, чувствительный к волатильности предохранитель (максимальное отклонение в множителях ATR), поскольку "сырые" свинг-хаи/лоу сильнее всего подвержены искажению одной нетипичной свечой.
Тейк-профит рассчитывается как кратное исходному риску значение ("R-множитель"), а отдельная линия безубытка показывает, на каком уровне цены имеет смысл задуматься о переводе стопа в точку входа — потому что в системе возврата-к-тренду вроде этой, как только цена проходит примерно 1R в вашу пользу, вероятность отката обратно к скользящей средней (вместо чистого продолжения до полного тейка) возрастает, поэтому защита сделки на безубытке — разумная практика.
Двойная система панелей
Панель статистики — отслеживает каждый сигнал, сгенерированный индикатором на текущем графике, и разбивает результаты на исходы "тейк-профит", "стоп-лосс" и "безубыток" (стоп, сработавший после того как цена уже коснулась уровня безубытка, считается отдельно от "чистого" стоп-лосса, поскольку на практике к этому моменту вы, скорее всего, уже перевели бы стоп). Статистику можно фильтровать по всей истории, последним N дням или с конкретной даты — удобно для быстрой оценки того, насколько хорошо текущие настройки работают на конкретном инструменте, прежде чем начинать торговать по нему.
Сканер монет — позволяет отслеживать до пяти других выбранных активов на предмет точно такой же ситуации в реальном времени, не покидая текущий график. По каждому активу показывается, есть ли сейчас отложенный или уже активный сигнал, в каком направлении, а также его уровни входа/стопа/тейка. Важно: сканер использует те же настройки стратегии (периоды скользящих средних, метод расчёта стопа, R-множитель и т.д.), что заданы для основного графика — отдельной настройки под каждый актив в сканере нет.
Применение
1. Откройте нужный актив и таймфрейм и посмотрите на панель статистики — высокий процент выигрышных сделок и стабильное R:R говорят о том, что рынок сейчас достаточно чисто трендовый для входов по возврату к средней.
2. Если недавний винрейт высокий, рынок соблюдает структуру скользящих средних, и сетап стоит торговать. Если он снижается, рынок может входить в фазу консолидации — лучше дождаться, пока тренд снова выровняется.
3. Используйте отрисованные линии входа/стопа/тейка/безубытка и их ценники для постановки реального ордера.
4. Когда цена достигает отметки безубытка, стоит рассмотреть перевод реального стоп-лосса в точку входа — это решение, на которое индикатор указывает, но не выполняет автоматически.
5. Используйте сканер монет, чтобы следить за другими активами из вашего вотчлиста, не переключаясь постоянно между графиками.
Описание настроек
General (Общие настройки)
• Source — ценовой ряд, по которому рассчитываются обе скользящие средние (по умолчанию — цена закрытия).
Moving Average
• MA fast — период быстрой EMA (по умолчанию 50).
• MA fast line width — толщина линии быстрой EMA.
• MA slow — период медленной EMA (по умолчанию 200).
• MA slow line width — толщина линии медленной EMA.
• Bull color / Bear color — цвет каждой линии MA и заливки между ними (окрашивается в зависимости от текущего направления тренда).
Strategy
• MA Pierce Check Window (bars) — сколько последних баров проверяется на предмет реального прокола быстрой EMA перед закрытием-ретестом (по умолчанию 3).
• Swing Point Lookback (bars) — окно поиска ближайшего свинг-хая/лоу для режима стопа "Свинг", а также используется как часть "прогрева" перед тем, как индикатор начнёт оценивать сигналы (по умолчанию 10).
• Take Profit, R (risk multiple) — целевое расстояние тейк-профита, выраженное как множитель исходного риска (по умолчанию 3 = 3R).
• Max Bars in Open Setup (timeout) — если сигнал не резолвится (не задет ни стоп, ни тейк) за это количество баров, он принудительно закрывается и учитывается отдельно как тайм-аут, а не остаётся открытым бесконечно (по умолчанию 300).
• Stop Loss Calculation Method — выбор между Свинг (high/low), ATR или Процент от цены.
• ATR Length — период усреднения для расчёта ATR (по умолчанию 14).
• ATR Multiplier for Stop — множитель ATR, применяемый, когда метод стопа — ATR (по умолчанию 1.5).
• Stop, % of Entry Price — фиксированное расстояние стопа, используется только в режиме "Процент от цены" (по умолчанию 1%).
• Max Allowed Risk, % of Price — жёсткий лимит расстояния стопа, применяется независимо от выбранного режима, для защиты от аномальных свечей или сбойных тиков в данных (по умолчанию 5%).
• Also Cap Swing Stop by ATR (recommended) — дополнительный, чувствительный к волатильности предохранитель, работающий только в режиме "Свинг", теснее и отзывчивее плоского процентного лимита.
• Max Swing Stop Deviation, x ATR — множитель для указанного выше лимита (по умолчанию 3).
• Move to Breakeven, R (risk multiple) — расстояние в R, на котором рисуется линия отметки безубытка (по умолчанию 1 = 1R).
Visualization
• Show BUY/SELL Labels — вкл/выкл ярлыков сигналов на графике.
• Show SL/TP/BE Price Tags on Lines — вкл/выкл "живых" ценников у правого края каждой линии уровня.
• Fill Risk/Reward Zones — вкл/выкл закрашенных зон риска/прибыли.
• BUY Label Color / SELL Label Color — цвета ярлыков сигналов.
• Entry Line Color / Stop Loss Line Color / Take Profit Line Color / Breakeven Line Color — цвета четырёх линий уровней.
• Reward Zone Color / Risk Zone Color — цвета закрашенных зон.
• Entry/SL/TP Line Width — толщина линий уровней.
Statistics
• Show Statistics Panel — вкл/выкл таблицы статистики на графике.
• Panel Position — угол графика, в котором рисуется таблица.
• Text Size — размер шрифта таблицы.
• Statistics Period — вся история, последние N дней или с фиксированной даты.
• N Days Back — используется, если период статистики — "последние N дней".
• Start Date — используется, если период статистики — "с фиксированной даты".
Symbol Scanner
• Show Scanner for Other Symbols — вкл/выкл таблицы сканера.
• Symbol 1–5 — пять отслеживаемых активов.
• Scanner Timeframe — таймфрейм для сканирования; оставьте пустым, чтобы использовать таймфрейм текущего графика.
• Scanner Panel Position — угол графика, в котором рисуется таблица сканера.
• Scanner Panel Text Size — размер шрифта таблицы сканера.
Алерты
Индикатор включает два готовых условия для алертов — Buy signal и Sell signal — которые срабатывают один раз на закрытии бара и содержат в тексте сообщения цену входа, стоп-лосс, тейк-профит и расстояние до них в тиках, так что действовать по ним можно, не открывая график.
Отказ от ответственности
Этот индикатор — инструмент для технического анализа и планирования сделок, он не является финансовой рекомендацией, а прошлая эффективность сигналов, показанная на панели статистики, не гарантирует результатов в будущем. Всегда сочетайте его использование с собственным управлением риском и оценкой рыночного контекста.
Indicator

JP Factor Score I have created an individual stock screening indicator for Japanese equities! Using annual financial data for both large-cap and small-cap stocks, it analyzes and scores the alpha in Japanese equities based on factors such as intangible asset investment, cash holdings, current liabilities, financial leverage, shareholder returns, profitability, low investment, asset expansion, and debt/financing expansion, evaluating these scores over time. The blue line represents large-cap stocks, the orange line represents small-cap stocks, and the dotted line shows the 4SMA (most recent 1 year) values. Indicator

Indicator

Bitcoin Halving Compass**Bitcoin Halving Compass** is a clean, timeframe-independent indicator designed to visualize Bitcoin’s recurring halving cycle.
The script marks three key points around each halving:
* **BUY marker** — placed a configurable number of calendar days before the halving
* **HALVING marker** — identifies the historical or estimated halving date
* **SELL marker** — placed the same number of calendar days after the halving
The default setting uses a **500-day offset**, but users can adjust this value from the indicator settings.
### Key Features
* Includes all confirmed Bitcoin halvings from 2012, 2016, 2020, and 2024
* Projects future halving cycles
* Uses calendar timestamps, allowing consistent alignment across intraday, daily, weekly, and monthly charts
* Separates historical halvings from estimated future halvings using different line styles and colours
* Allows users to update the estimated next halving date
* Supports configurable colours, line widths, labels, and visibility settings
* Does not repaint historical event dates
* Does not execute trades or place orders
### How It Works
Bitcoin halvings occur every 210,000 blocks. Historical halving timestamps are stored directly in the script.
Future dates are estimated using an average block interval of approximately 10 minutes. Since actual block production varies, projected future dates may shift over time. Users can update the next estimated halving date through the indicator settings, and all subsequent projections will adjust automatically.
### Suggested Use
This indicator can be used to:
* Study Bitcoin’s long-term market cycles
* Compare price behaviour before and after previous halvings
* Identify recurring accumulation and distribution windows
* Support broader macro and cycle-based analysis
* Create a consistent visual reference across multiple timeframes
### Important Note
The BUY and SELL labels are cycle markers only. They are not guaranteed trading signals, financial advice, or recommendations to enter or exit a position.
Future halving dates are estimates and should be updated as blockchain-based projections change.
Indicator

Session Range Completion ClockThis indicator measures WHEN, inside a chosen intraday session, that session's range is actually
built. It answers a question that session tools normally skip: by a given time of day, how much of
the day's eventual range is typically already spent, and has the extreme that will define the day
usually already printed?
It draws no levels, marks nothing on price, and produces no signals. It is a measurement
instrument that reports descriptive statistics over the sessions in your loaded history.
THE UNDERLYING PRINCIPLE
A session's range is not built at a constant rate, and how it is built differs by symbol, by
session and by contract. The script assumes nothing about the shape - it measures it on whatever
instrument and window you point it at.
"How much range is left" and "is the extreme already in" are two different statistics, and the
script keeps them separate. For every completed session in the loaded history it records the
running high and low at the end of each time bucket, then waits for the session to close so the
FINAL range is known. It then attributes, for each bucket:
- the fraction of the final range that had been traversed by the end of that bucket;
- whether the session's high had already been made at or before that bucket;
- whether the session's low had already been made;
- whether both were already in place, meaning the range was finished and everything afterwards
happened inside it;
- the traversed range expressed in units of daily ATR or of the previous day's range, which makes
the figure comparable across volatility regimes.
These are accumulated across sessions and reported as means and frequencies.
HOW TO READ THE TABLE
The table is drawn once, on the last bar of the chart. Each row is a point in time, labelled with
the clock time at the end of that bucket.
"n" is the number of sessions contributing to that row. "Range built" is the mean percentage of
the session's final range already traversed. "High set" and "Low set" are the percentage of
sessions in which that extreme was already established. "Both set" is the percentage of sessions
in which the entire range was already complete; that column is shaded by value. "Range/unit" is
the mean range so far in the normalization unit selected in the inputs, which is named in the
bottom-right cell.
If the session contains more buckets than the row limit, buckets are sampled at an even stride so
the table still ends on the session's final bucket.
The pane also plots two lines during a live session: the current session's range so far, and the
mean range so far of all prior qualifying sessions at the same point in the session, both in the
same unit. That is a like-for-like comparison at equal elapsed session time. It is not a
projection and the script does not extend either line forward.
On a daily or higher chart the table prints a message instead of statistics: the whole measurement
is defined on intraday bars and there is nothing to compute.
WHAT IT DOES NOT DO
It does not predict where price will go, does not identify breakouts, and does not mark levels. A
high "Both set" figure at a given time means only that historically, on this symbol and this
session, the range was usually already complete by then. It is a frequency over past sessions, not
a statement about today, and nothing in the script says whether acting on it would be a good idea.
METHOD, AND WHY IT DOES NOT REPAINT
A session is folded into the statistics only after it has closed, so the session in progress never
contributes to its own statistics.
Historical values are never recalculated. The statistics accumulate forward in time, which means
the historical-mean line on early bars was computed from a smaller sample than the same line on
recent bars. That is deliberate; the alternative would be a curve that silently rewrites its own
past.
The daily normalization unit comes from a single bundled request on the daily timeframe. The
requested expression is offset by one bar and the request uses lookahead, which is the pair the
Pine Script documentation specifies for confirmed higher-timeframe values: the offset discards the
daily bar that is still forming and returns the one before it, which was already final. Historical
and realtime bars therefore receive the same value. This matters more here than it looks, because
the unit is latched once at session start and then used for that whole session - a unit that
differed between live and reloaded charts would give a session two different "Range/unit" figures
depending on when you looked at it.
Time buckets are anchored to the declared session start time rather than to the first bar
observed. This keeps the time-of-day axis stable on illiquid symbols, on sessions that run through
midnight, and on continuous 24-hour sessions where there is no gap between sessions to detect. A
session string containing more than one range, such as 0900-1130,1230-1500, is treated as a single
window running from the first start to the last end; buckets falling inside the break carry the
pre-break state forward, which is what you want, because the range does not reset over lunch. An
optional day mask such as 0930-1600:23456 is respected.
SETTINGS
Session and Session time zone define the window. Use the exchange's own time zone so buckets stay
aligned across daylight-saving changes.
Bucket size should be a multiple of the chart timeframe. A bucket narrower than the chart
timeframe contains no bars of its own and simply carries the previous bucket's state forward.
Minimum session completeness excludes half-days, early closes and partially loaded history, which
would otherwise depress the late-session figures. Lower it if a market you are studying
legitimately has short sessions.
Normalise range by chooses between daily ATR and the previous day's range. ATR is smoother; the
previous day's range reacts faster.
ORIGINALITY
The session and time-of-day category on this platform is overwhelmingly made of level-drawing
tools: opening-range boxes, session high/low lines, session shading. Those draw where. Very little
published measures when, and the two are different objects - this script plots nothing on price at
all.
There is a small existing family of scripts that chart the distribution of the hour at which the
daily high or low prints, and the "High set" and "Low set" columns overlap with that idea. This is
not a reskin of any of them: the accumulator here is cumulative by elapsed session time rather
than a histogram of one timestamp, it is folded only on session close, it is keyed to a
user-supplied session string with mid-session-break handling and a day mask, and it is combined
with final-range-fraction and volatility normalization. No code is borrowed from any published
script.
LIMITATIONS
Requires an intraday chart timeframe.
The sample is whatever history the chart has loaded, which on lower timeframes may be only a few
hundred sessions - check "n" before reading anything into a row.
Results are sensitive to the chart timeframe, because the exact bar on which an extreme prints is
resolution-dependent. Coarser timeframes will place extremes in later buckets than they truly
occurred.
The "Range/unit" column can be based on a smaller sample than the percentage columns, because the
earliest sessions in the loaded history have no completed daily bar to normalize against and are
skipped for that column only.
Sessions spanning a daylight-saving transition can be misattributed by one hour for a single day.
On non-standard chart types - Heikin Ashi, Renko, Kagi, Point and Figure, Range - the highs and
lows are synthetic, so the statistics describe the synthetic series rather than traded prices.
The statistics describe the loaded history only and carry no assumption that the distribution is
stable over time.
Source is open and commented. Indicator

Strategy

Moving Averages [SigmaSeven]Moving Averages
WHAT IT DOES
This tool plots up to three moving averages of the same type on one chart and turns the spaces between them into a visual trend map. Instead of reading three separate lines, the ribbon fills between MA1/MA2 and MA2/MA3 change color depending on which average is on top, so the alignment of the short-, mid- and long-term baselines (default 50 / 100 / 200) is visible at a glance.
WHY COMBINE THREE MAs IN ONE SCRIPT
The purpose is not merely to save two indicator slots. The value is in the relationships between the averages, which single MA plots cannot show:
- The MA1/MA2 fill colors by the faster relationship (short vs. mid trend).
- The MA2/MA3 fill colors by the slower relationship (mid vs. long trend).
- When both ribbons show the bullish color, the stack is fully aligned (MA1 > MA2 > MA3), the classic definition of an established uptrend; mixed colors flag transition phases; full bearish alignment marks established downtrends.
- If MA2 is hidden, the script automatically fills MA1/MA3 instead, so the trend map stays intact with a two-line setup.
All three lines always use the same smoothing method and source, so the alignment comparison is methodologically consistent. That is intentional: mixing methods (e.g. HMA vs. SMA) makes crossovers an artifact of different lag profiles rather than of price behavior.
CALCULATION METHODS
One selector applies to all three lines: SMA, EMA, WMA, VWMA, RMA, HMA, ALMA, LSMA (linear regression value), and DEMA. DEMA is computed in the script as 2 * EMA(source, len) - EMA(EMA(source, len), len), which reduces the lag of a standard EMA by subtracting the smoothed estimate of its own lag. The methods differ mainly in their lag/smoothness trade-off; faster methods (HMA, DEMA, LSMA) hug price and flip alignment earlier, slower ones (SMA, RMA) filter more noise but react later.
SETTINGS
- Source: input series for all three averages (default close)
- Method: smoothing type applied to all three lines
- MA 1 / MA 2 / MA 3: individual toggles and lengths (defaults 50 / 100 / 200)
- Show Fill: toggle the ribbon fills
- Color Mode: 8 preset palettes with three coordinated colors, or full custom colors per line
HOW TO USE IT
Typical use is as a trend context layer beneath a discretionary or systematic setup: trade in the direction of full alignment, treat mixed ribbons as no-trade or reduced-size zones, and watch the fills for compression (averages converging) that often precedes regime changes. The script issues no signals and is not a trading system.
LIMITATIONS
- Moving averages are lagging by construction; alignment confirms trends after they are underway and gives back ground at reversals.
- In ranging markets the ribbons flip color frequently and lose usefulness.
- Default lengths 50/100/200 are conventions, not optimized values; adjust to your timeframe.
- No higher-timeframe requests, no lookahead, no repainting of past bars.
Indicator

MAD Z [SigmaSeven]MAD Z
WHAT IT DOES
MAD Z is a regime oscillator that measures how far price has deviated from its recent median, using the Modified Z-Score, a robust statistical method based on the Median Absolute Deviation (MAD) instead of the classical mean/standard deviation. It classifies the market into three persistent states: Risk-On, Risk-Off, and Hold, and colors the oscillator and (optionally) the price bars accordingly.
WHY MAD INSTEAD OF A CLASSICAL Z-SCORE
A classical z-score uses the mean and standard deviation. Both are heavily distorted by outliers: a single large candle (news spike, liquidation wick) inflates the standard deviation and compresses the score exactly when you need it most. The Modified Z-Score replaces:
- the mean with the rolling median (robust location estimate), and
- the standard deviation with the Median Absolute Deviation (robust scale estimate).
The formula is:
z = 0.6745 * (price - median) / MAD
where MAD = median( |price - median| ) over the lookback window. The constant 0.6745 rescales MAD so the output is comparable to a standard z-score under a normal distribution (0.6745 is the 75th percentile of the standard normal). The practical effect: the score reacts to genuine directional displacement but is far less distorted by single-bar outliers than a standard-deviation-based z-score.
HOW THE STATE LOGIC WORKS
The raw score alone would flip constantly around zero. MAD Z therefore uses a hysteresis state machine with two asymmetric thresholds:
- Score crosses ABOVE the Long Threshold (default +1.30) → state switches to Risk-On and stays there.
- Score crosses BELOW the Short Threshold (default -0.20) → state switches to Risk-Off and stays there.
- Between the thresholds, the last state is held (Hold Zone, shaded band).
The asymmetry (a high bar for entering Risk-On, a much closer bar for exiting into Risk-Off) is deliberate: it demands strong statistical displacement before calling a bullish regime, but exits early when the displacement fades. Both thresholds are fully adjustable, so the behavior can be inverted or symmetrized.
HOW TO READ IT
- Oscillator line: the Modified Z-Score of the selected source (default hlcc4) over the Baseline Length (default 50 bars). Colored by current state.
- Threshold lines and shaded Hold Zone: the hysteresis band described above.
- Gradient fills: visual emphasis of displacement above/below zero.
- Bar Coloring (optional): paints price candles in the current regime color so the state is visible on the main chart without reading the pane.
Typical use: as a regime filter for other strategies (only take longs while Risk-On), or as a standalone mean-displacement gauge on higher timeframes. It is NOT a complete trading system and issues no entries or exits by itself.
SETTINGS
- Source: input series (default hlcc4)
- Baseline Length: lookback for median and MAD (default 50)
- Smoothing / Smoothing (EMA): optional EMA smoothing of the raw score (off by default)
- Long / Short Threshold: hysteresis levels (defaults +1.30 / -0.20)
- Color Mode: 8 preset palettes, or custom Risk-On/Risk-Off colors
- Bar Coloring: toggle candle coloring on the main chart
LIMITATIONS
- The score is computed on the current bar's value and can change until the bar closes; the state can therefore also change intrabar. For confirmed signals, evaluate on bar close.
- The median/MAD baseline needs the full lookback window; the first "Baseline Length" bars show no score.
- Like any displacement measure, it is descriptive of the recent window, not predictive. In prolonged low-volatility ranges MAD becomes small and the score can appear exaggerated.
- Default thresholds were chosen as reasonable general-purpose values, not optimized per market. Adjust them to your instrument and timeframe.
The calculation uses no higher-timeframe requests and no lookahead; it does not repaint past bars.
Indicator

Probabilistic ProjectionMost projection tools extend the recent trend or calculate a single average return. Probabilistic Projection uses a more comprehensive approach: it examines the full range of returns that followed comparable historical conditions.
The method can be understood through one question:
When this market had a similar trend and level of volatility in the past, what happened over the following 6 months, 1 year or 2 years?
The indicator collects these historical forward returns, builds a complete probability distribution, and displays:
• The median historical outcome
• A configurable central range of outcomes
• The quality of the available sample
Similar historical conditions receive additional weight, but they are never allowed to dominate the model. At least 65% of the calculation always comes from the complete historical distribution.
This balance is important. Using only a few similar periods can produce unstable conclusions, while using only a long-term average ignores the current market environment. Probabilistic Projection combines both sources of information while automatically reducing the influence of unreliable samples.
WHY THIS APPROACH IS ROBUST
The model is designed to reduce several common sources of error:
• It evaluates a distribution of outcomes instead of producing one deterministic target.
• It uses confirmed daily data rather than incomplete higher-timeframe values.
• It remains independent of the chart timeframe.
• It limits the influence of trend and volatility conditioning.
• It gives less weight to conditional information when the sample is insufficient.
• It pulls unstable estimates back toward the global historical median.
• It widens the projection range when data quality is lower.
• It distinguishes sample quality from prediction accuracy.
• It uses standard market prices, including on non-standard charts.
A one-year projection therefore remains approximately one year whether the indicator is viewed on a 5-minute, daily or weekly chart.
HOW THE DISTRIBUTION IS BUILT
Three projection horizons are available:
• 6 months: 126 trading days
• 1 year: 252 trading days
• 2 years: 504 trading days
For each monthly projection step, the script measures what the market actually returned over the same forward horizon at different points in its history.
Historical sample endpoints are separated by approximately 21 trading days. The script can use up to 225 observations at each step, depending on the available history.
The final distribution combines three components:
1. Complete historical distribution
Every valid observation contributes to the baseline. This ensures that the model retains information from different market environments, including periods that do not resemble the current one.
2. Trend context
The latest confirmed daily close is compared with a 202-day simple moving average.
Historical observations that began in the same broad trend state can receive additional weight. Trend conditioning cannot contribute more than 12% of the total calculation.
3. Volatility context
The model calculates realized volatility from 21-day daily returns and ranks it over approximately three years.
Historical periods with a similar volatility rank can also receive additional weight. Volatility conditioning cannot contribute more than 28%.
The combined conditional contribution is capped at 35%. The complete historical distribution always retains at least 65% of the total weight.
If too few comparable observations are available, the corresponding trend or volatility weight is automatically reduced or disabled.
READING THE PROJECTION
Solid central line
The solid line represents the median of the reliability-adjusted distribution.
Because expected returns are less stable than return dispersion, the conditioned median is partially pulled back toward the global historical median. This limits the influence of temporary or poorly represented market conditions.
Dashed boundaries
The dashed lines represent a configurable central range:
• 60%: P20 to P80
• 70%: P15 to P85 (default)
• 80%: P10 to P90
The 60% setting focuses on more central outcomes. The 80% setting includes a broader range of historical scenarios.
When data quality is lower, the distance between the median and the boundaries is expanded. The projection becomes more cautious rather than displaying the same apparent precision with a weaker sample.
Shaded range
The optional shaded area makes the distribution easier to read. It represents a percentile-derived range of historical scenarios, not a confidence interval or guaranteed future coverage.
Each point is calculated from the return distribution corresponding to its own horizon. The connected lines help visualize how the median and dispersion evolve over time; they are not individual simulated market paths.
INFORMATION PANEL
Annualized median projection
The median return at the selected terminal horizon is converted into an annualized percentage. This makes the six-month, one-year and two-year projections easier to compare.
It describes the center of the modeled historical distribution. It is not an expected return or a performance promise.
Data quality
The data-quality score evaluates whether enough historical information is available. It considers:
• The number of valid observations
• The overlap between long-horizon observations
• An estimate of the effective independent sample size
• The minimum sample required to display the projection
This score measures the strength of the historical sample, not the probability that the projection will be correct.
CONFIRMED DATA AND LIVE PRICES
The statistical model uses completed daily observations. The optional regime channel also uses confirmed source-timeframe values.
The projected returns are rescaled to the live standard-market close. The displayed price levels can therefore move while the current chart bar is open, but the underlying historical distribution remains based on confirmed data.
On Heikin Ashi and other non-standard charts, the model uses the standard instrument rather than synthetic candle prices.
OPTIONAL REGIME CHANNEL
The optional regime channel provides separate higher-timeframe context and does not alter the probabilistic projection.
It evaluates:
• Price relative to fast and slow moving averages
• Momentum
• Direction of the slow moving average
• Percentage distance from the slow average
• ATR-based expansion
Its boundaries use the larger of a minimum percentage distance or an ATR-based distance. Optional smoothing changes only the visual transition between confirmed levels.
INTENDED USE
Probabilistic Projection is designed primarily for medium- and long-term analysis of broad equity indices.
It can help users:
• See the range of outcomes that historically followed comparable conditions
• Compare potential upside and downside asymmetry
• Understand how uncertainty expands with the projection horizon
• Identify when the historical evidence is limited
• Add a statistical framework to portfolio and risk decisions
No historical method can know the future. Market distributions change, long-horizon samples overlap, and unprecedented events cannot be represented.
Probabilistic Projection is a descriptive probability model, not a price target, trading signal or standalone trading system.
Indicator

TA4j Kalman FilterMany "Kalman" indicators available on PulseWire are actually static Alpha-Beta filters with fixed-gain moving averages that lack dynamic state estimation.
This indicator is a direct port of the 1D Discrete Kalman Filter from TA4j's KalmanFilterIndicator . Instead of relying on a static "length" or arbitrary smoothing multiplier, this script acts as a probabilistic state estimator. It calculates dynamic error covariance on every bar to constantly weigh which is more trustworthy: the ongoing trend (Prior State) or the newest price bar (Measurement).
How to Tune Q and R
Because this is a true Kalman Filter, it does not use a standard "lookback length." Instead, it is tuned using two distinct variance parameters. The behavior of the filter is dictated entirely by the ratio between these two numbers.
• Process Noise (Q) - "How fast is the true trend changing?"
• This represents your baseline expectation of actual, structural price movement.
• Increase Q if you want the filter to be highly responsive and hug the price action closely.
• Trader Translation: High Q = Fast/Low-Lag Moving Average.
• Measurement Noise (R) - "How chaotic is the current market?"
• This represents your expectation of standard market noise, chop, and fake-outs.
• Increase R if you believe the asset is highly erratic and you want the filter to ignore sudden price spikes, trusting the underlying trend instead.
• Trader Translation: High R = Slow/Smooth Moving Average.
The Golden Rule of Tuning:
If you set $Q$ and $R$ to identical values (e.g., $Q = 0.01$ and $R = 0.01$), the filter balances the two equally.
• To filter out heavy volatility (crypto/low-timeframes), make $R$ significantly larger than $Q$ (e.g., $Q = 0.0001, R = 0.01$ ).
• To track momentum breakouts closely, make $Q$ larger than $R$.
Technical Caveat:
Because this is a steady-state 1D implementation with constant $Q$ and $R$ inputs, the Kalman Gain will be highly dynamic during the initial chart history but will mathematically converge to a steady state.
Indicator

Support Resistance AI [PickMyTrade]Every support/resistance tool answers "where are the levels." None answer the question a trader actually has when price arrives at one: does THIS test look like the ones that held, or like the ones that broke?
――――――――――――――――――――――――――――――――――――――
🔷 WHAT IT MEASURES
🔸 Confirmed swing pivots, clustered into zones and merged as new evidence accumulates
🔸 Eight properties of every ARRIVAL at a zone — approach speed, relative volume, prior test count, zone age, trend pressure, zone width, pivot count, and cumulative touches
🔸 A broken level isn't discarded — it flips role once (broken support becomes candidate resistance) and only a second failure retires it
🔸 A live Previous Day/Week High/Low reference map, shown only when price is within range
――――――――――――――――――――――――――――――――――――――
🔷 THE CLASSIFIER
🔸 An online Gaussian Naive Bayes model, trained continuously as tests resolve — no repainting, no lookahead
🔸 Nothing about a level's price is used as a feature — only how price approached it
🔸 The classic claim that "a level tested repeatedly grows weaker" is measured on each chart's own history here, rather than assumed
🔸 Below a configurable warmup sample count, the script shows the chart's running hold rate instead and reads LEARNING — it never guesses early
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 Zone boxes colored by role (support/resistance) and shaded by live conviction, with worded verdicts ("similar arrivals held X%") instead of a bare number
🔸 Rank-based visibility — only the nearest zones to current price are drawn, so old or distant levels never stretch the chart's scale
🔸 Test history ticks stamped inside each zone at the bar where its own tests resolved
🔸 An info table with Nearest Support/Resistance, model accuracy, and sample counts
🔸 3 alertconditions, worded as observations of what the classifier's reading — never as trade instructions
――――――――――――――――――――――――――――――――――――――
🔷 INPUTS
Pivot Left/Right Bars — swing detection window. Default 10/10.
Zone Width / Merge Distance — band thickness and clustering tolerance, in ATR. Default 0.5 / 0.75.
Break Buffer / Rejection Distance — how far price must close beyond or travel back from a zone to resolve a test. Default 0.25 / 0.75 ATR.
Post-Flip Cooldown — bars a flipped zone must survive before a break can retire it. Default 5.
Warmup Samples — resolved tests required before the classifier is trusted. Default 25.
Conviction Threshold — probability at which a zone is shown at full conviction. Default 0.62.
Max Live Zones / Show Distance — how many nearby zones are drawn and how far (in ATR) before one is hidden.
Show Trend EMA, Zen Mode — display toggles; Zen Mode hides labels and the table for clean screenshots.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
🔸 Pivots confirm only after the right-side lookback bars close — a level appears on the chart later than the swing that created it, by design
🔸 One thing does refine retroactively: when a later pivot merges into an existing zone, its band re-centers toward the weighted average — a zone with an open test is never re-centered, so no in-progress outcome is affected
🔸 Early on a fresh chart, or for a zone with only one or two tests, its own read is thin — the model's overall sample count travels with every verdict so that's never hidden
🔸 This script reports how historical arrivals resolved. It does not predict, and it is not a trading system on its own.
――――――――――――――――――――――――――――――――――――――
Built in Pine Script v6. Open source — Mozilla Public License 2.0. Indicator

Quantile Cloud [MiesOnCharts]Quantile Cloud
This indicator draws the recent value zone using order statistics instead of a moving average and standard deviation. Over a rolling window, it collects every close and finds the upper and lower quantile of that sample, plus the median as a centerline. The cloud sits between the two quantiles.
Why quantiles instead of mean and sigma bands?
A single outlier bar can only shift a percentile rank by one spot, so the cloud stays put after a shock instead of ballooning the way Bollinger style bands do. What you get is a picture of where price has actually spent its time during the window, not a statistical estimate that a spike can distort.
How to read it:
While price stays inside the cloud, it's behaving normally relative to its recent range, and the prior regime holds. No new signal fires just from wandering around inside the value zone. A close above the upper quantile or below the lower quantile means price is doing something it has rarely done recently, and that flips the regime. The median line changes color with the regime (green for up, red for down, gray when neutral), and triangles mark the actual flip bars.
Settings:
Window (bars): how many recent closes make up the sample. Longer windows give a slower, more stable value zone; shorter windows react faster but flip more often.
Upper Quantile % / Lower Quantile %: how wide the cloud is. Pushing these toward the extremes (e.g. 99/1) makes the cloud wider and signals rarer; pulling them toward the middle makes it tighter and more sensitive.
Includes alerts for both upside and downside breaks of the value zone, so you can get notified without watching the chart.
Disclaimer
The indicator provided is not financial advice. Always conduct your own research and consider multiple factors before making trading decisions. Trade at your own risk. Indicator

Liquidity Sweep Hunter Algo [AlgoAlpha]🟠 OVERVIEW
Liquidity Sweep Hunter Algo identifies liquidity highs and lows across three different lookback periods and keeps them active until they are mitigated. This creates a persistent view of where resting liquidity has formed instead of only showing the latest swing points.
The indicator also displays a heatmap that highlights the relative strength of active liquidity levels and generates reversal signals after price sweeps multiple visible liquidity bands before reclaiming them. Optional trade drawings project a stop loss, reward target, and intermediate target levels directly on the chart.
🟠 CONCEPTS
Liquidity Level — A price extreme detected from fast, medium, and slow lookback windows. Matching levels are merged so nearby highs or lows are treated as the same liquidity area.
Liquidity Heatmap — A visual strength map where colour represents the relative strength of each active liquidity level compared to the other visible levels.
Multi-Level Liquidity Sweep — A reversal condition where price sweeps at least two visible liquidity bands and then closes back beyond the reclaim level within a limited number of bars. An optional strength filter can require the swept levels to exceed a minimum average strength.
🟠 FEATURES
Liquidity Heatmap — Displays active liquidity levels using a colour gradient that reflects their relative strength.
Multi-Level Sweep Signals — Plots bullish and bearish reversal labels after confirmed liquidity sweep and reclaim events.
Trade Projection Boxes — Draws entry, stop loss, reward zone, and target milestone levels after each signal.
Trade Progress Display — Fills the target area as price reaches successive target levels and marks completed trades with a check mark.
🟠 HOW TO USE
Watch the heatmap to identify where stronger liquidity has accumulated around current price.
Wait for a bullish or bearish sweep signal after price clears multiple liquidity bands and reclaims the area.
Use the optional trade projection as a visual reference for the calculated stop loss, reward target, and target milestones.
Increase the lookback values to focus on broader liquidity zones or decrease them to detect more local levels.
Adjust the sweep strength filter if you want signals only when stronger liquidity zones are involved.
🟠 CONCLUSION
Liquidity Sweep Hunter Algo combines persistent liquidity mapping, a relative strength heatmap, and multi-level liquidity sweep detection in a single indicator. It also provides optional trade projections that remain on the chart after each signal. Together these features help traders monitor where liquidity has formed, when it has been swept, and where price has reclaimed the area. Indicator

Last 20 Candles Visualizer & Dashboard📌 Last 20 Candles Visualizer & Dashboard
🌟 Overview
The Last 20 Candles Visualizer & Dashboard is a multi-timeframe analysis tool designed to give traders a clean, real-time overview of recent price action, daily key levels, candlestick pattern signals, and directional bias directly on their main chart.
Instead of manually uncluttering your chart or switching back and forth between timeframes, this script automatically plots important micro-level data over the last 20 candles while maintaining a high-level daily dashboard at the top right corner.
📊 Key Features
1. Daily Key Levels & Live Dashboard
Located conveniently in the top-right corner, the dashboard provides live monitoring for essential daily thresholds:
Current Price: Dynamic live market price.
TD High / TD Low (TDH / TDL): Today's High and Today's Low levels calculated directly from the Daily time period.
PD High / PD Low (PDH / PDL): Previous Day's High and Low levels.
PD Open / Close: Previous Day's Open and Close prices.
PDH - Price Diff: Displays the active dollar difference and percentage variance between the Current Price and the Previous Day High (Current Price - PDH). Formatted with explicit sign prefixing (+ or -) and color-coded green for positive values above PDH and red for values below PDH.
Bias vs PDH/PDL: Automatically evaluates overall daily directional bias based on current price position relative to the daily range:
BULLISH: Current price trading above PDH.
BEARISH: Current price trading below PDL.
NEUTRAL: Current price trading inside the Previous Day Range.
2. Last 20 Candles Data Overhead Labels
Displays structured, high-visibility labels positioned above the peak (high) of the last 20 candles tracking:
Open (O) & Close (C) Prices
Volume Split Estimations (Open Vol vs Close Vol)
Color-coded dynamically using Teal background tags for bullish closes and Maroon tags for bearish closes.
3. Visual Candle High/Low Levels
Draws custom horizontal micro-support and resistance line segments tracking the exact high and low levels for each of the last 20 recent bars.
4. Automatic Pattern Recognition
On-chart visual shape alerts for classic price-action setups:
Bullish & Bearish Engulfing Candles
Bullish Pinbars / Hammers & Bearish Shooting Stars
⚙️ Customizable Settings
Candle Levels Group: Toggle line visuals on/off or change the number of recent candles tracked (range: 1 to 50 bars).
Patterns Group: Enable or disable automatic candlestick pattern shape markers.
Dashboard Table Settings: Toggle dashboard table visibility and adjust table text sizes (Tiny, Small, Normal, Large).
I have created this to quickly glance PDH, PDL, TDH, TDL & Bias.
Happy Trading. Remember, NO indicator brings 100% results. DYOR. Indicator
