Stopping Volume EMA RetraceStopping Volume EMA Retrace is designed to identify potential retracement setups when price becomes significantly extended away from an exponential moving average and the extended candle also shows unusually high volume together with rejection.
The indicator combines price extension, relative volume and candle structure for one specific purpose.
Price distance identifies when the market has moved unusually far from its mean.
Relative volume identifies unusually high participation at that extended location.
Wick structure and closing position are then used to filter for rejection-style candles rather than ordinary high-volume continuation candles.
HOW IT WORKS
The EMA acts as the mean and retracement reference.
The default EMA length is 50, but this can be changed by the user.
Upper and lower extension levels are calculated as a percentage distance from the EMA.
The default extension distance is 3%.
For a bullish setup, the candle low must reach or move below the lower extension level.
For a bearish setup, the candle high must reach or move above the upper extension level.
The extension calculation deliberately uses the candle high or low rather than only the closing price.
This allows a candle to move beyond the selected threshold, reject the extended area and close back toward the EMA while still qualifying as a setup.
RELATIVE VOLUME
A qualifying candle must also show unusually high volume.
The Volume Average Length controls how many previous completed candles are used to establish the volume baseline.
The High Volume Multiplier determines how much larger the current candle's volume must be compared with that baseline.
With the default settings, the current candle must have at least 2.0 times the average volume of the previous 20 completed candles.
REJECTION STRUCTURE
High volume alone does not generate a signal.
For a bullish setup, the candle must contain a sufficiently large lower rejection wick and close sufficiently far away from its low.
For a bearish setup, the candle must contain a sufficiently large upper rejection wick and close sufficiently far away from its high.
The optional wick-dominance filter can additionally require the rejection wick to be larger than the wick on the opposite side of the candle.
The Minimum Rejection Wick setting controls the required wick size as a percentage of the complete candle range.
The Minimum Close Recovery setting controls how strongly the candle must recover away from the rejected extreme.
SIGNALS
A bullish signal requires all of the following conditions on the same candle:
Price reaches the selected distance below the EMA.
Volume exceeds the selected relative-volume threshold.
The candle shows the required lower-wick rejection.
The candle closes sufficiently far away from its low.
If wick dominance is enabled, the lower wick must also be larger than the upper wick.
A bearish signal uses the inverse conditions above the EMA.
Signals are confirmed only after the qualifying candle closes.
Historical signal markers are displayed on the candle where the confirmed condition occurred. They are not backplotted onto earlier candles.
WHY THESE CONDITIONS ARE COMBINED
Distance from an EMA by itself only identifies price extension.
High volume by itself cannot distinguish continuation from rejection.
A large wick by itself can occur without unusually high market participation.
Stopping Volume EMA Retrace therefore requires these conditions to occur together.
The EMA extension supplies location.
Relative volume supplies participation context.
The wick and closing-position filters supply rejection context.
The result is a focused OHLCV-based method for highlighting extended high-volume rejection candles that may precede a retracement toward the mean.
HOW TO USE
First watch for price approaching or moving beyond one of the EMA extension levels.
Then wait for a highlighted stopping-volume candle or signal marker.
A bullish signal indicates that qualifying high relative volume and rejection occurred while price was extended below the EMA.
A bearish signal indicates the corresponding condition while price was extended above the EMA.
The EMA can then be used as a visual mean or retracement reference.
It should not be treated as a guaranteed target.
The signal can be evaluated together with market structure, trend, support and resistance, liquidity context and the user's own risk management.
Different markets have different volatility and volume characteristics.
The EMA distance can therefore be adjusted to determine how far price must become extended before a setup is considered.
The volume multiplier can be increased to require more exceptional volume.
The rejection-wick and close-recovery settings can also be increased to make signals more selective.
VISUAL SETTINGS
The EMA, upper extension and lower extension lines can each be shown or hidden independently.
Each line has independent colour, thickness and line-style controls.
Solid, dashed and dotted line styles are available.
Optional glow effects are available for the EMA and both extension lines.
All glow effects are disabled by default.
Bullish and bearish stopping-volume candles can be highlighted independently.
The bullish and bearish candle colours are user adjustable.
Signal markers can also be shown or hidden and have their own independent colour controls.
ALERTS
Alert conditions are included for:
Bullish stopping-volume retrace signals.
Bearish stopping-volume retrace signals.
Either signal type.
Because signals require a confirmed candle, alerts based on these conditions become valid when the qualifying candle closes rather than while it is still forming.
LIMITATIONS
The stopping-volume classification used by this indicator is an OHLCV-based analytical heuristic.
It does not use order-book information, true bid/ask trade classification or direct measurements of executed order-flow absorption.
High relative volume together with rejection therefore does not prove that absorption occurred.
Reported volume can differ between exchanges, brokers and data feeds. The same settings may therefore produce different signals on different markets or venues.
The EMA and extension levels can move while the current realtime candle is forming.
Signal conditions themselves require the candle to close before confirmation.
The indicator does not calculate historical win rates, simulated trade outcomes or Strategy Tester results.
It does not model commissions, spread, slippage, liquidity, position sizing or trade execution.
A confirmed signal means that the configured extension, relative-volume and rejection conditions occurred. It does not imply that price will subsequently return to the EMA or that a trade will be profitable. Wskaźnik

Modern VWAP with BandsModern VWAP with Bands is an anchored Volume Weighted Average Price overlay designed to show how far price has moved from its current volume-weighted reference and highlight unusually extended conditions that may be relevant to mean-reversion analysis.
The indicator combines an anchored VWAP, five configurable deviation bands, distance-based candle coloring, outer-band reversion signals, configurable Target and Stop reference levels, and separate historical Bull and Bear signal-outcome tables.
WHAT THE INDICATOR CALCULATES
The Trading Style setting determines the VWAP anchor period and price source.
Intraday = Daily VWAP using HLC3.
Swing/Daily = Weekly VWAP using HL2.
Long-term = Monthly VWAP using Close.
The VWAP resets automatically when the selected Daily, Weekly or Monthly anchor changes.
Five upper and five lower deviation bands are calculated around VWAP.
When ATR Bands is enabled, each deviation level represents an ATR multiple.
When ATR Bands is disabled, each deviation level represents a percentage offset from VWAP.
This allows the band structure to adapt either to current volatility or to fixed percentage distance from the VWAP reference.
WHY THE COMPONENTS ARE COMBINED
VWAP provides the central volume-weighted reference.
The deviation bands measure progressively larger extensions away from that reference.
The candle-coloring system provides a visual representation of how extended price currently is.
The outer Dev 5 signal logic identifies occasions when price moves through the most extreme configured band.
The Bull and Bear tables then provide historical context showing how those signals resolved using the selected Target and Stop assumptions.
Together, these components provide a workflow for identifying the current VWAP reference, measuring extension, highlighting extreme movement, identifying outer-band events and reviewing their historical outcomes.
BAR COLOR DISTANCE
Bar Color Distance Mode controls how distance from VWAP is normalized.
ATR mode measures absolute distance from VWAP relative to ATR.
% VWAP mode calculates the absolute percentage distance from the VWAP itself:
Absolute distance from VWAP / VWAP × 100
For example, if VWAP is 100 and the selected price source is 102, the % VWAP distance is 2%.
Auto mode uses ATR normalization when ATR Bands is enabled and % VWAP normalization when percentage bands are being used.
This keeps the candle-color distance measurement aligned with the selected band methodology.
REVERSION SIGNALS
A Bull reversion signal occurs when the closing price crosses below the lower Dev 5 band.
A Bear reversion signal occurs when the closing price crosses above the upper Dev 5 band.
These signals identify extreme extensions from VWAP. They do not confirm that a reversal has already started and should not be interpreted as predictions that price must return to VWAP.
Require Outside Dev 5 can apply an additional extension requirement beyond the Dev 5 band before a signal is accepted.
Dev 5 Outside % controls how far beyond Dev 5 price must extend when this filter is enabled.
The optional Cool Off Period prevents another accepted signal for a selected number of bars after the previous signal.
Show Reversion Signals controls only the visibility of the Bull and Bear markers. The underlying signal calculations and historical outcome tracking continue to operate when the markers are hidden.
ENTRY, TARGET AND STOP
The reference entry for both Bull and Bear signals is the closing price of the signal candle.
Bull Stop is positioned below the Bull reference entry according to Bull Stop %.
Bear Stop is positioned above the Bear reference entry according to Bear Stop %.
Target Source can be set to User % or VWAP.
With User % selected, Bull Target % and Bear Target % determine the Target distance from the signal-bar close.
With VWAP selected, the Target is the VWAP value that existed when the signal occurred.
The VWAP Target is fixed at that signal-bar value. It does not continue moving as the VWAP changes on later candles.
The Target and Stop lines displayed on the chart use the same corresponding values used by the historical outcome tables.
HISTORICAL SIGNAL-OUTCOME TABLES
The Bull and Bear tables provide simplified historical signal-outcome statistics.
T = Target reached.
S = Stop reached.
The displayed percentage is the number of Target outcomes divided by the total number of resolved Target and Stop outcomes for that direction.
The percentage is an internal historical measurement produced by the indicator's predefined evaluation rules. It is not a probability, expected win rate, accuracy prediction or guarantee of future performance.
The reference entry is the close of the signal candle.
Target and Stop evaluation begins on the following candle. Price movement that occurred earlier within the signal candle is therefore not used to determine an outcome after an entry at that candle's close.
If both the Target and Stop are touched during the same later candle, OHLC data cannot determine which level occurred first. The script therefore records the event conservatively as a Stop outcome.
Only one unresolved Bull simulation and one unresolved Bear simulation can be active at the same time.
If another signal in the same direction occurs while that direction already has an unresolved event, it is not added as another independently scored table event.
When Ignore Open Trades on Reset is enabled, unresolved events are discarded when the selected VWAP anchor resets. They are not counted as either a Target or Stop outcome.
These tables are analytical summaries and are not TradingView Strategy Tester backtests.
HOW TO USE
Start by selecting the Trading Style that matches the VWAP reference you want to analyse.
Use Intraday for a Daily VWAP, Swing/Daily for a Weekly VWAP, or Long-term for a Monthly VWAP.
Choose whether the deviation structure should react to current volatility using ATR Bands or represent fixed percentage distances from VWAP.
The inner deviation bands show smaller extensions from VWAP while the outer bands represent progressively larger extensions.
Use the candle colors as a quick visual indication of the current distance from VWAP.
Bull signals identify closes crossing below the lower Dev 5 band.
Bear signals identify closes crossing above the upper Dev 5 band.
These are extreme-extension conditions rather than automatic trade instructions. They can be combined with the trader's own price structure, trend, momentum, support/resistance or other confirmation methods.
Require Outside Dev 5 can be enabled when a greater extension beyond the outer band is desired.
The Cool Off Period can reduce repeated signals when price repeatedly moves around the outer band.
The Bull and Bear tables can then be used to examine how historical signals resolved under the currently selected Target and Stop assumptions.
IMPORTANT SETTINGS
Trading Style controls the VWAP anchor and source.
ATR Bands selects ATR-based or percentage-based deviation bands.
ATR Length controls the volatility calculation used by ATR bands and ATR-normalized visual calculations.
Level 1 Dev through Level 5 Dev control the five distances around VWAP.
Bar Color Distance Mode selects ATR or % VWAP normalization for candle coloring.
Bar Color Contrast Power controls how quickly color intensity increases as price moves farther from VWAP.
Bar Color Outside Boost increases visual emphasis after the most extreme configured distance is exceeded.
Require Outside Dev 5 adds an additional extension filter to signal generation.
Cool Off Period controls the minimum spacing between accepted signals when enabled.
Target Source selects percentage-based Targets or the fixed VWAP value at the signal.
Bull Target %, Bull Stop %, Bear Target % and Bear Stop % define the assumptions used for the corresponding historical signal-outcome calculations.
SIGNAL TIMING AND REPAINTING
The script does not use future-data lookahead, higher-timeframe request.security calculations, pivot calculations or historical pivot backplotting.
Signals are calculated using the current chart candle.
Because the closing price of a live candle changes while that candle is forming, a Bull or Bear signal can appear and disappear before the candle closes.
Once the candle has closed, that historical signal condition is fixed.
The script does not place a confirmed signal retrospectively onto an earlier pivot candle.
LIMITATIONS
VWAP depends on the volume data supplied for the selected chart symbol. Volume can differ between exchanges, brokers and data feeds, so VWAP and its resulting bands may also differ.
The indicator uses chart OHLCV data. It does not use order-book data, bid/ask trade classification or individual transaction-level order flow.
ATR is a historical volatility calculation and responds to changing market conditions rather than predicting them.
Extreme distance from VWAP does not guarantee mean reversion. Price can continue moving farther away from VWAP after a Bull or Bear signal.
Live-candle conditions can change before the candle closes.
The Bull and Bear historical statistics do not model commissions, spread, slippage, execution delay, liquidity, partial fills, leverage, position sizing or true intrabar sequencing.
When both Target and Stop occur inside the same candle range, the actual sequence cannot be determined from OHLC data and the event is therefore classified as a Stop.
Unresolved simulations can be removed at VWAP anchor resets when Ignore Open Trades on Reset is enabled.
The pre-reset and post-reset fading effects are visual features based on the expected length of the selected anchor period. Markets with restricted sessions or gaps may contain a different number of actual chart bars.
Historical results do not imply future performance.
ORIGINAL FUNCTIONALITY
Modern VWAP with Bands is designed as more than a standard VWAP plot.
Its implementation integrates selectable Daily, Weekly and Monthly VWAP anchoring, five ATR-or-percentage deviation zones, VWAP-relative or ATR-normalized candle coloring, configurable extreme-band signal filtering, fixed VWAP-or-percentage Targets, configurable Stops, anchor-reset handling and separate Bull and Bear historical outcome tracking.
The purpose of combining these elements is to connect VWAP location, distance measurement, visual extension analysis, signal generation and historical signal evaluation within one consistent overlay.
Wskaźnik

Liquidity Wave IndexLiquidity Wave Index is a momentum, pressure and divergence oscillator designed to combine three related forms of market information in one pane:
* OHLCV-based directional pressure
* An adaptive market-cycle oscillator
* Price-versus-oscillator divergence
The purpose of combining these components is to separate directional pressure from cycle timing. The Liquidity Pressure histogram shows whether candle structure and reported volume are contributing more positively or negatively, while the Cycle Engine measures normalized price displacement and momentum rotation. Divergence analysis then compares confirmed price swings with confirmed oscillator swings to identify disagreement between price structure and momentum.
The components can be used independently or combined through optional confirmation filters.
LIQUIDITY PRESSURE
Liquidity Pressure is an OHLCV-derived analytical measure.
For each candle, directional pressure begins with the candle body relative to the full candle range:
(close - open) / (high - low)
This value is multiplied by reported volume, smoothed with an EMA, and then normalized by smoothed volume.
The Scale input changes the displayed magnitude without changing the underlying directional relationship.
Positive values indicate that the recent combination of candle direction, candle range and reported volume is weighted toward positive pressure.
Negative values indicate the opposite.
This is not true bid/ask delta, order-book data or exchange trade-direction data. It is an OHLCV-based approximation derived from chart data, and volume characteristics may differ between symbols, exchanges and data providers.
ADAPTIVE CYCLE ENGINE
The Cycle Engine is based on an adaptive WaveTrend-style framework.
The selected price source, HLC3 by default, is compared with an adaptive EMA baseline. Price displacement from that baseline is normalized using an adaptively smoothed measure of absolute deviation.
The resulting normalized oscillator is then adaptively smoothed into:
Cycle Line
Signal Line
The adaptive smoothing rate changes according to recent price movement rather than remaining completely fixed.
Additional EMA smoothing is applied through the Ribbon Smooth setting.
The ribbon between the two lines visually represents the current relationship between the Cycle Line and Signal Line.
BULL AND BEAR SIGNALS
A Bull signal occurs when the Cycle Line crosses above the Signal Line.
A Bear signal occurs when the Cycle Line crosses below the Signal Line.
Signals are only accepted on confirmed bars. A crossover that appears temporarily while the current candle is still forming will therefore not become a confirmed signal unless the crossover remains present when the candle closes.
The Threshold Filter and Liquidity Pressure Confirmation settings can optionally make these signals more selective.
THRESHOLD FILTER
With the Threshold Filter enabled:
Bull signals require the Cycle Line to be below the negative threshold when the bullish cross occurs.
Bear signals require the Cycle Line to be above the positive threshold when the bearish cross occurs.
The threshold does not represent probability, expected performance or a statistically defined overbought/oversold level. It is a user-controlled signal filter.
LIQUIDITY PRESSURE CONFIRMATION
Liquidity Pressure Confirmation optionally connects the pressure module directly to the Bull and Bear Cycle signals.
Three modes are available:
Off
Liquidity Pressure does not affect Bull or Bear signals.
This is the default setting.
Same Direction
A Bull Cycle cross is only accepted when Liquidity Pressure is above zero.
A Bear Cycle cross is only accepted when Liquidity Pressure is below zero.
This mode requires pressure to agree with the direction of the Cycle signal.
Zero Cross
A Bull Cycle cross is only accepted when Liquidity Pressure crosses above zero on the same confirmed candle.
A Bear Cycle cross is only accepted when Liquidity Pressure crosses below zero on the same confirmed candle.
This is the most restrictive mode because both the Cycle cross and Liquidity Pressure zero-line cross must occur together.
Liquidity Pressure Confirmation is a directional filter. It does not represent probability, expected accuracy or guaranteed signal quality.
DIVERGENCES
The indicator detects divergence by comparing confirmed price pivots with nearby confirmed Cycle Line pivots.
Regular bullish divergence occurs when price forms a lower low while the matched oscillator structure forms a higher low.
Regular bearish divergence occurs when price forms a higher high while the matched oscillator structure forms a lower high.
Hidden divergence can optionally be enabled.
Hidden bullish divergence compares a higher price low with a lower oscillator low.
Hidden bearish divergence compares a lower price high with a higher oscillator high.
Regular and hidden divergences are calculated independently so enabling hidden divergences does not replace the regular divergence calculation.
Regular Bull, Regular Bear, Hidden Bull and Hidden Bear divergence colors can be configured independently.
PIVOT MATCHING
Price pivots and oscillator pivots do not always occur on exactly the same candle.
The Max Price/Osc Pivot Gap setting determines how far apart a confirmed price pivot and oscillator pivot may be while still being treated as a matched swing.
The divergence engine stores several recent matched pivot pairs rather than comparing only the immediately previous swing. This allows the detector to identify divergence structures that may span an intermediate pivot.
Min Bars Between Price Pivots and Max Bars Between Price Pivots control the permitted distance between the two price swings being compared.
DIVERGENCE PRESETS
Aggressive
Uses shorter pivots and allows a larger price-to-oscillator pivot gap. This generally produces more divergence detections and reacts more quickly.
Balanced
The default profile and intended general-purpose setting.
Conservative
Uses stronger pivots, requires wider swing separation and allows a smaller price-to-oscillator matching gap. This generally produces fewer but more structurally developed divergence detections.
Custom
Uses the manually configured Pivot Length, Min Bars, Max Bars and Max Price/Osc Pivot Gap values.
ZERO-LINE CONTEXT
Require Zero-Line Context is an optional divergence filter.
When enabled:
Bullish divergences require both oscillator pivot values to be at or below zero.
Bearish divergences require both oscillator pivot values to be at or above zero.
This can be used to restrict divergence detection to the corresponding side of the oscillator.
IMPORTANT PIVOT CONFIRMATION BEHAVIOUR
Divergence detection uses confirmed pivots.
A pivot cannot be known when the actual swing high or swing low first occurs. It becomes confirmed only after the required number of bars to the right of that swing have completed.
For example, with Pivot Length 4, a pivot is confirmed four bars after the historical pivot candle.
Divergence lines are drawn between the actual historical pivot locations after confirmation.
Their historical placement therefore does not mean the divergence was available on the earlier pivot candle.
Any divergence alert occurs when the divergence becomes confirmed, not when the earlier pivot originally formed.
This confirmation delay is an inherent part of pivot-based divergence detection.
TARGET / STOP STATISTICS
The tables provide simplified historical Target/Stop outcome statistics for confirmed Cycle signals and confirmed divergence events.
They are not TradingView Strategy Tester results and do not simulate actual orders.
For a confirmed Bull Cycle signal:
The confirmation-bar close is used as the reference price.
The Target is placed above that reference price according to the Target % input.
The Stop is placed below the reference price according to the Stop % input.
For a confirmed Bear signal, the directions are reversed.
Divergence outcomes use the same principle with the separate Div Target % and Div Stop % settings.
Outcome checking begins on the bar after the signal or divergence confirmation.
Price movement occurring earlier on the confirmation candle is therefore not used to determine the result.
Every confirmed event is tracked independently. A new event does not overwrite an unresolved previous event.
If both the Target and Stop are touched during the same candle, the Stop is counted first.
This is a conservative assumption because the script does not have access to the exact intrabar price sequence from standard OHLC bars.
T represents Target reached.
S represents Stop reached.
The percentage shown beside these counts represents:
Targets / (Targets + Stops) x 100
Only resolved events are included in that percentage. Events that have not yet reached either level remain unresolved and are not counted as either Target or Stop.
STATISTICS LIMITATIONS
The Target/Stop statistics are simplified historical measurements.
They do not model:
Commissions
Spread
Slippage
Liquidity
Position sizing
Order execution
Market impact
Partial fills
Funding costs
Intrabar execution sequence
They should therefore not be interpreted as strategy profitability, expected win probability or future performance.
Historical outcomes do not imply future results.
ALERTS
Alerts are available for:
Bullish Cycle Cross
Bearish Cycle Cross
Bullish Divergence
Bearish Divergence
Liquidity Pressure crossing above zero
Liquidity Pressure crossing below zero
Cycle and Liquidity Pressure alerts use confirmed bars.
When Liquidity Pressure Confirmation is enabled, Bull and Bear Cycle alerts follow the filtered Bull/Bear signal conditions.
Divergence alerts depend on confirmed pivots and therefore include the pivot confirmation delay described above.
HOW TO USE
A practical workflow is to use the Cycle Engine for timing, Liquidity Pressure for directional context and divergence for potential disagreement between price and momentum.
Example bullish workflow:
Look for improving or positive Liquidity Pressure.
Watch for bullish regular or hidden divergence.
Wait for a confirmed bullish Cycle Line cross.
Optionally enable Same Direction Liquidity Pressure Confirmation if Bull signals should only occur while pressure is positive.
Use Zero Cross mode if a Bull signal should only occur when both the Cycle cross and Liquidity Pressure transition above zero happen together.
The optional Threshold Filter can further restrict Bull crosses to deeper negative oscillator conditions.
Example bearish workflow:
Look for deteriorating or negative Liquidity Pressure.
Watch for bearish regular or hidden divergence.
Wait for a confirmed bearish Cycle Line cross.
Optionally enable Same Direction Liquidity Pressure Confirmation if Bear signals should only occur while pressure is negative.
Use Zero Cross mode if a Bear signal should only occur when both the Cycle cross and Liquidity Pressure transition below zero happen together.
The optional Threshold Filter can further restrict Bear crosses to higher positive oscillator conditions.
These components do not need to align on every setup unless the user deliberately enables the available confirmation filters.
TIMEFRAMES
The indicator can be used on different chart timeframes, but the default settings are primarily intended as a general-purpose starting point around the 15-minute to 1-hour range.
15-minute charts provide a relatively responsive balance between Cycle signals, Liquidity Pressure and swing structure.
1-hour charts generally produce slower and cleaner pivot structures.
Lower timeframes such as 1-minute to 5-minute charts usually contain considerably more market noise and may require different divergence or smoothing settings.
Higher timeframes produce fewer signals and substantially longer pivot-confirmation delays.
IMPORTANT SETTINGS
Smoothing Length
Controls smoothing of the Liquidity Pressure calculation. Higher values produce a smoother and slower histogram.
Scale
Changes the displayed magnitude of Liquidity Pressure.
Base Length
Controls the adaptive baseline used by the Cycle Engine.
Slow Length
Controls smoothing of the primary Cycle calculation.
Adaptation Lookback
Controls the lookback used to adjust adaptive EMA responsiveness.
Fast Lag / Slow Lag
Control the adaptive response characteristics of the Cycle Line and Signal Line.
Ribbon Smooth
Adds final EMA smoothing to the displayed Cycle lines.
Threshold Filter
Optionally requires Cycle crosses to occur beyond the selected positive or negative threshold.
Liquidity Pressure Confirmation
Determines whether Liquidity Pressure is ignored, must already agree with signal direction, or must cross zero on the same candle as the Cycle signal.
Pivot Length
Controls pivot confirmation strength. Larger values require more bars to confirm a swing and therefore increase confirmation delay.
Max Price/Osc Pivot Gap
Controls how far apart price and oscillator pivots may occur while still being matched.
Regular Bull / Regular Bear Color
Control the colors of regular divergence lines.
Hidden Bull / Hidden Bear Color
Control the colors of hidden divergence lines.
Target % / Stop %
Define the virtual outcome levels used by the Cycle signal statistics.
Div Target % / Div Stop %
Define the virtual outcome levels used by the divergence statistics.
LIMITATIONS
Liquidity Pressure is calculated from OHLCV data and is not true order-flow or bid/ask delta.
Volume availability and quality vary between markets and data providers.
Adaptive smoothing introduces some lag.
Pivot-based divergences require future bars for confirmation.
Divergence lines are drawn back to the historical pivot positions only after those pivots have been confirmed.
Divergence does not necessarily produce a reversal.
Current market conditions can differ substantially from historical conditions.
Target/Stop tables are simplified analytical statistics and are not execution-based backtests.
Same Direction and Zero Cross confirmation modes reduce the number of Cycle signals and can cause signals visible with confirmation Off to disappear.
The indicator should be used as an analytical tool rather than as a prediction or guarantee of future market direction.
CODE ORIGIN AND ATTRIBUTION
The adaptive cycle foundation of Liquidity Wave Index was developed from the open-source Wave Oscillator by Claye Weight, used under the Mozilla Public License 2.0.
Liquidity Wave Index substantially extends that foundation with an OHLCV-based normalized pressure module, optional Liquidity Pressure signal confirmation, confirmed-bar signal handling, rewritten pivot-based divergence detection, price/oscillator pivot matching, independent regular and hidden divergence processing, configurable divergence presets, separate divergence colors, independent Target/Stop outcome tracking and configurable statistics tables.
The complete source code of this publication is provided openly in accordance with the applicable open-source licence.
Wskaźnik

PDH PDL PWH PWL Boundary Response RegisterOVERVIEW
PDH PDL PWH PWL Boundary Response Register is an open-source prior-range research tool for time-based intraday charts and the 1D chart.
It plots four raw boundaries from completed higher-timeframe periods:
* PDH: Previous completed daily high
* PDL: Previous completed daily low
* PWH: Previous completed weekly high
* PWL: Previous completed weekly low
The script then records how the current day or week interacts with each boundary.
Its purpose is descriptive research. It does not calculate a conventional pivot ladder, assign support or resistance, predict direction, identify a target, generate entries or exits, or report win rates or profitability.
BOUNDARY LIFECYCLE
Each enabled boundary maintains an independent lifecycle for its active source period:
1. Untested
No confirmed contact has been recorded under the selected contact definition and tolerance.
2. Contacted
The boundary has received its first confirmed contact.
3. Sustained beyond
The configured number of consecutive confirmed closes finished beyond the boundary.
This state is independent of direct wick or body contact, so a price gap can satisfy the confirmed-close condition without first recording a conventional wick or body contact.
4. Re-entered
After Sustained beyond, a confirmed close crossed back through the boundary into the corresponding previous-day or previous-week range.
These states are factual classifications.
Sustained beyond does not mean that a breakout will continue. Re-entered does not mean that a reversal will follow.
CONTACT DEFINITIONS
The Contact definition input provides three research modes:
* Wick range: the confirmed bar's high-low range reaches the boundary.
* Candle body: the confirmed bar's open-close body reaches the boundary.
* Close-to-close span: two consecutive confirmed closes straddle the boundary, including a gap when the closes lie on opposite sides.
Contact tolerance can be configured as:
* Exact
* Ticks
* A fraction of the last completed daily ATR
These settings change the contact measurement rule. They do not change the underlying PDH, PDL, PWH, or PWL price.
POST-CONTACT RESPONSE REGISTER
After the first confirmed contact, the script can record an independent response profile for each boundary.
The measurements include:
* First-contact form: Gap beyond, Close through, Wick through, or Boundary touch.
* Confirmed post-contact observation count.
* Outside-close residency: the percentage of confirmed post-contact observations that closed beyond the boundary.
* Close-side recross count: the number of confirmed changes between the inside and outside sides of the boundary.
* Maximum outside excursion.
* Maximum return into the corresponding prior range.
* Chart bars from first contact to Sustained beyond.
* Chart bars from Sustained beyond to the first Re-entered event.
The register abbreviates two response fields:
OUT/X
* OUT: outside-close residency percentage.
* X: confirmed close-side recross count.
MAX O/I
* O: maximum outside excursion.
* I: maximum return into the corresponding prior range.
Maximum excursions are normalized with a daily ATR value frozen at the relevant daily or weekly reset.
These values describe the currently active source period. They are not historical probabilities, confidence scores, success rates, expectancy measurements, or performance statistics.
CROSS-HORIZON RANGE GEOMETRY
The register also measures how the completed daily and weekly ranges relate to each other.
Its cross-horizon fields include:
* The current confirmed close's coordinate inside the previous-day range.
* The current confirmed close's coordinate inside the previous-week range.
* Daily contact coverage for PDH and PDL.
* Weekly contact coverage for PWH and PWL.
* Bar separation between the two boundaries when both boundaries in a pair have been contacted.
* Daily and weekly range containment or overlap.
* The mathematical intersection of the previous daily and weekly ranges.
* The shared interval as a percentage of each prior range.
* Current day range use relative to the previous completed daily range.
* Current week range use relative to the previous completed weekly range.
* PDH/PWH separation in completed daily ATR units and ticks.
* PDL/PWL separation in completed daily ATR units and ticks.
* Configurable nearby-pair detection.
* A four-level hull formed by the outermost values of PDH, PDL, PWH, and PWL.
* The current close's coordinate inside that hull.
* The hull's upper and lower boundary anchors.
* The hull width in completed daily ATR units.
* State breadth across all enabled boundaries.
State breadth reports how many enabled boundaries have reached:
* C: Contacted
* S: Sustained beyond
* R: Re-entered
The shared corridor, nearby pairs, range relation, and four-level hull are geometric references.
The script does not classify them as support, resistance, liquidity, supply, demand, accumulation, distribution, institutional levels, or trade setups.
VISUAL OUTPUT
The default presentation includes:
* Distinct PDH, PDL, PWH, and PWL lines.
* Different default styling for daily and weekly boundaries.
* Optional prior-day and prior-week range ribbons.
* Optional shared-corridor highlighting.
* Optional nearby-pair highlighting.
* Historical daily and weekly segments with adjustable retention.
* Reduced emphasis for completed historical segments.
* Optional first-contact or full-lifecycle event marks.
* Compact right-edge identification tags.
* Automatic merging of nearby daily and weekly tags.
* Optional dotted leaders when a display tag is displaced from its exact boundary price.
* A fixed Boundary Response Register in the selected chart corner.
The right-edge tags use the currently visible chart range, visible bar count, completed daily ATR, and tick-size floors only to resolve annotation spacing and future-side placement.
The tags can reposition when the chart is scrolled or zoomed.
This visual repositioning does not change:
* The exact PDH, PDL, PWH, or PWL prices.
* Horizontal boundary-line prices.
* Lifecycle states.
* Post-contact response measurements.
* Range geometry.
* Alert conditions.
Exact prices and full state details remain available in the Boundary Response Register and label tooltips.
DATA HANDLING AND REALTIME BEHAVIOR
PDH, PDL, PWH, PWL, and the ATR normalization value are requested from completed higher-timeframe bars.
The expressions used with higher-timeframe lookahead are offset by one completed higher-timeframe bar before being used. The four active boundary prices therefore do not change during their corresponding current day or week.
Lifecycle and response events are committed on confirmed chart bars.
The combined dynamic alert also uses once-per-bar-close frequency.
Some current-context fields can continue changing while the realtime bar is open, including:
* Current close distance from each boundary.
* Current day range use.
* Current week range use.
* Developing current-period high and low values.
Those current-context fields are distinct from confirmed lifecycle history.
SOURCE MODES
Three reference-data modes are available:
Automatic
Uses the chart context on standard charts and standard-symbol candles on non-standard charts.
Chart context
Preserves the current chart's ticker context and modifiers.
Standard candles
Requests standard market candles without non-standard chart construction or other ticker modifiers.
When the selected event source has no usable bar aligned with the current chart timestamp, event evaluation pauses instead of treating an older forward-filled candle as a new observation.
NON-STANDARD CHARTS
Heikin Ashi, Renko, Kagi, Line Break, Point and Figure, Range, and other non-standard charts can contain synthetic OHLC values.
The completed daily and weekly boundaries remain available, but lifecycle events, current-range progress, and related alerts are disabled by default on non-standard charts.
Users can enable non-standard-chart event evaluation only for explicit research.
SUPPORTED TIMEFRAMES
The script supports:
* Time-based intraday charts.
* The 1D chart.
Tick charts and timeframes above 1D are excluded because their relationship with the requested event data would require ambiguous lower-timeframe reconstruction.
An on-chart notice is displayed when the selected timeframe is unsupported.
IMPORTANT 1D LIMITATION
On the 1D chart, the daily boundary lifecycle resets on each new daily bar.
PDH and PDL therefore cannot accumulate more than one daily close before the next daily reset.
When Closes required beyond is set above 1, the multi-close Sustained beyond state for PDH and PDL is primarily meaningful on intraday charts.
PWH and PWL can still accumulate multiple daily closes during the active week.
For full daily-boundary lifecycle and post-contact research, a time-based intraday chart is recommended.
ALERTS
Factual alert conditions are available for:
* First confirmed contact of any enabled boundary.
* First confirmed contact of each individual boundary.
* Sustained beyond for any enabled boundary.
* Sustained beyond for each individual boundary.
* Re-entered for any enabled boundary.
* Re-entered for each individual boundary.
* Formation of a nearby PDH/PWH pair.
* Formation of a nearby PDL/PWL pair.
* Completion of the daily contact pair.
* Completion of the weekly contact pair.
* A configurable outside-close residency threshold.
* A configurable maximum outside-excursion threshold.
* A combined confirmed-bar alert() message that consolidates simultaneous events.
Alerts report observed conditions only.
They do not instruct the user to buy, sell, enter, exit, place a stop, or select a profit target.
HOW TO USE
1. Apply the script to a standard time-based intraday chart or the 1D chart.
2. Select Automatic, Chart context, or Standard candles according to the data context being researched.
3. Enable daily and weekly boundaries and select the amount of historical retention.
4. Choose the contact definition and tolerance.
5. Select the number of confirmed closes required for Sustained beyond.
6. Read each boundary's lifecycle together with OUT/X and MAX O/I rather than interpreting a horizontal line in isolation.
7. Use the lower register rows to compare daily and weekly range geometry, shared overlap, current range use, pair spacing, hull position, and state breadth.
8. Adjust nearby-pair thresholds, historical event-mark density, right-edge tag content, and register size for the symbol and timeframe.
9. Use Market Replay and multiple symbols to verify customized settings before creating alerts.
WHY THIS IS A SEPARATE PUBLICATION
This study is separate from Previous Day Pivot Path - Intraday Support Resistance because the two scripts address different research questions and use different analytical structures.
Previous Day Pivot Path is a previous-day pivot-formula and arrival-order study. It calculates P, R, and S levels, supports pivot formula families, records first-arrival rank, distinguishes reached and unreached levels, and can emphasize the next unreached level. PDH and PDL are optional context references in that study.
Boundary Response Register calculates no:
* P/R/S ladder.
* CPR.
* Pivot formula family.
* Pivot arrival rank.
* Reached-versus-unreached path.
* Next unreached level.
* Next target.
Its four primary objects are the raw completed-period boundaries PDH, PDL, PWH, and PWL.
It tracks:
* Their independent lifecycle.
* Their post-contact response measurements.
* Daily and weekly range geometry.
* Shared range overlap.
* High-pair and low-pair spacing.
* Four-level hull position.
* State breadth.
Combining these functions into the existing pivot study would materially change that publication's purpose, supported horizon, default output, settings structure, alerts, and user workflow.
This is therefore a separate research tool rather than a minor visual variation or version update.
DISTINGUISHING DESIGN
Many previous-period high and low tools focus on one or more of the following:
* Drawing horizontal lines only.
* Tested or untested status.
* Swept or unswept status.
* Previous-month levels.
* Range midpoints or equilibrium levels.
* Nearest-target labels.
* Directional bias.
* Historical reach or break rates.
* Trade-plan instructions.
This implementation instead combines:
* Four raw completed daily and weekly boundaries.
* A four-stage lifecycle for each boundary.
* Confirmed post-contact response measurements.
* Frozen-ATR normalization of outside and inside excursions.
* Daily and weekly range-intersection geometry.
* Contact-pair timing.
* A four-level hull.
* State breadth.
* Neutral confirmed-bar alerts.
* Scale-aware annotation collision management.
The common PDH, PDL, PWH, and PWL inputs are objective completed-period prices.
The distinguishing purpose of this implementation is the state, response, geometry, source-handling, and visualization framework built around those four boundaries.
LIMITATIONS
* OHLC bars do not reveal the exact tick-by-tick sequence inside a candle.
* The script does not invent an intrabar event order.
* Contact results depend on the selected Wick range, Candle body, or Close-to-close span definition.
* Contact results also depend on the selected tolerance.
* Multiple events confirmed on the same chart bar are simultaneous at chart resolution unless the available data proves otherwise.
* Sustained beyond is a configurable confirmed-close condition, not proof that a move will continue.
* Re-entered is a recorded return through a boundary, not proof of reversal.
* ATR-normalized values depend on the symbol's completed daily data and the selected ATR length.
* Current day and week range-use values are incomplete while the current period is developing.
* The first loaded day or week can contain partial history if the chart dataset begins after that source period started.
* Session definitions, holidays, early closes, broker feeds, exchange data, and ticker modifiers can change completed-period OHLC values.
* Synthetic charts can produce event timing different from standard market candles.
* Historical drawing retention is limited by the selected settings and TradingView object limits.
* The visual annotation rail can move when the visible chart window changes.
* The script provides no entries, exits, targets, stops, position sizing, probability forecasts, or performance claims.
OPEN-SOURCE IMPLEMENTATION
The script is written in Pine Script v6 using Pine built-ins and independently implemented state, measurement, and drawing logic.
It imports no external libraries.
The source is published openly so users can inspect the calculations and adapt the research settings within TradingView's rules.
Wskaźnik

MarketMaulers Auto TrendlinesMarketMaulers Auto Trendlines draws the diagonal structure you would have drawn yourself, and then stays with the line through the part that matters. Two confirmed pivots anchor it, the market's own touches validate it, and its parallel rail is projected through the furthest price travelled while the line was forming. Then it waits for the break, and reports which of the only two things that can follow a break took place.
Forming · Validated · Broken · Retested / Failed break
THE RETEST IS THE PRODUCT
Anyone can draw a line through two pivots and print a marker when price closes through it. The break is the least informative moment in a trendline's life. Most lines break, and the break on its own says nothing about whether the level still matters.
Two things can follow, and they mean opposite things.
• RETEST. Price comes back and respects the line from the OTHER side. Old support is now resistance. The line survived its own break as a reference and is arguably more useful after it than before.
• FAILED BREAK. Price closes straight back on the original side. The break was noise, the line was never beaten, and anyone who traded the break is offside.
This tool waits for one of those and names it. That is the read you cannot get by eyeballing the chart in the moment, because in the moment the two look identical.
FROM ZERO: WHY A DIAGONAL LINE IS A DIFFERENT ANIMAL FROM A HORIZONTAL ONE
A horizontal level is a price. It sits at one number and it is still that number tomorrow. A trendline is a price AND a rate. It asks the market to keep making higher lows at a certain speed, or lower highs at a certain speed. That is a much stronger claim, which is why trendlines break more often than horizontal levels and why the break carries less information when they do.
It is also why a line has to be earned rather than drawn. Two points define any line at all. Three or more touches is the market repeatedly agreeing to the rate.
HOW A LINE EARNS ITS PLACE
Five gates, each closing a specific way auto-trendline scripts produce clutter.
• Confirmed pivots only, paired for direction. A rising support line needs a second swing low strictly HIGHER than the first, a falling resistance line a second high strictly lower. A zero slope is unreachable by construction, so this file never draws a horizontal line.
• A cleanliness scan. Every bar between the two anchors is checked for a close through the line. A line price has already spent time on the wrong side of was never a valid line, and drawing it anyway is how a chart fills with lines nobody would have drawn by hand.
• Touch counting with a spacing rule. A touch is a bar reaching within a quarter of an ATR of the line, and touches within three bars of each other count once. Without the spacing rule one slow drift along a line counts as five touches and validates anything.
• Near-duplicate rejection. Two lines are compared at two sample points, now and fifty bars back, and the newer one is dropped if they sit within 0.75 ATR at BOTH. Comparing at a single point lets two lines with different slopes look identical at the moment they cross.
• A slope cap and abandoned-line retirement. Near-vertical lines off a single spike are refused, and a line price has stayed far away from for twenty consecutive bars is retired. That is what keeps ancient support lines from hanging under current price forever.
TWO WAYS A LINE BREAKS, AND THE SECOND ONE IS THE INTERESTING ONE
The obvious break is distance: a close sitting at least 0.35 ATR beyond the line. That catches the decisive break and it misses the slow one.
Price can park a fraction through a line, too shallow to trigger the distance test and too close to trigger retirement, and grind there bar after bar. Under a distance-only rule the line stays marked VALIDATED with price on the wrong side of it for as long as the grind lasts, which is a tool stating something false. So three consecutive wrong-side closes break a line at any distance. Decisive breaks are caught by distance, grinds by persistence, and there is no state left where the display and the price disagree.
A RETESTED LINE GOES BACK TO WORK
Most implementations treat the retest as the end of a line's life, which is backwards from what the retest proves. A line that broke, was left alone, and then held from the other side has demonstrated it still matters, and the tools that go quiet there stop watching at the exact moment the line earned its keep.
The mechanism is a POLARITY FLIP rather than a new line. Old support becomes resistance, so the side the break test looks at flips while the line's geometric identity does not. It is still a rising line, it keeps its color and its channel offset, and it starts being tested for a break to the upside. The label carries R1, R2, R3 so a twice-proven line is visibly different from a fresh one, and the cycle is capped at three, after which retested is terminal. A line oscillating around price cannot churn forever.
The status card reports both facts rather than picking one. RISING · RES is a rising line currently acting as resistance. Unflipped lines read RISING · SUP and FALLING · RES, which is what they always meant, said out loud.
THE CHANNEL
Once a line is validated, its parallel rail is projected through the furthest the market travelled away from it while the line was forming. The rail comes from a real extreme rather than from a statistical fit, so the width means something specific: this is how far this structure has been willing to travel from its own floor. Fill and opacity are yours to set, and the fill carries the state, so there is no color legend to memorize.
CONVERGENCE, WITH A TIME
Two validated lines with different slopes meet at an apex, and an apex is a price AND a bar. That is a triangle or a wedge resolving, one of the oldest readable objects in chart reading. It needs both lines retained as DATA rather than as drawings, which is why most auto-trendline scripts cannot offer it at all.
It is reported on the card and alerted, not drawn. A marker painted into future bars would say the same thing and add a drawing to a chart whose whole design rule is fewer marks. And it is a fact, not a forecast: it says where and when the structure runs out of room, not what happens when it gets there.
HIGHER TIMEFRAME LINES
A second engine, off by default, sharing the concepts of the chart-timeframe engine and none of its code paths. If the higher-timeframe layer is wrong, the layer you already trust keeps working.
Why most higher-timeframe trendline overlays are unsound is worth stating. A security call hands back prices. It does not hand back the ability to walk backwards through higher-timeframe bars, and the cleanliness scan IS a walk. So an HTF line built off a plain security read cannot be validated the way a chart line is, and most implementations quietly skip the check. Here, completed higher-timeframe bars are pushed into a ring buffer as they close and the whole HTF engine walks those. A real scan, real HTF touches, and a break that is a real HTF close through the line.
Breaks are judged by the timeframe that OWNS the line. A 15m candle closing through a 4H trendline is not a 4H close, and treating it as one is the most common way an HTF overlay lies. The visible consequence is that an HTF line can die up to one HTF bar later than the chart makes it look like it should. That is correct, and it will look wrong the first time.
What the HTF layer deliberately does not do, each one a decision rather than an omission: no channel, no polarity flip, no apex participation, and no separate alerts. The rail is measured by the same pass that validates the chart line. Converging HTF and chart slopes needs a unit conversion that is wrong the moment the chart timeframe changes. And two engines firing the same alert would double every notification. One slot, defaulted off, because new surface gets proven before it gets duplicated.
THE STATUS CARD
Six live lines on a chart and no way to tell which one matters this bar. The card names the nearest line, the distance to it in points and in ATR, its geometry and its current role, how many broken lines are still awaiting a verdict, and the soonest apex. A table rather than a label, because a label draws inside the price pane and loses the z-order fight with candles.
ALERTS
Trendline validated · Trendline broken · Trendline retest confirmed · Failed trendline break · Trendline convergence approaching
The convergence alert is the one worth leaving on. The other four report something that has already finished, which is useful for a journal. Convergence is the one thing the tool knows about the future, so it is the one alert that can reach you while there is still something to do about it. It is edge-triggered: it arms while the apex is beyond your warning distance and fires once on the way in, rather than firing every bar of the approach until you mute it forever.
WHY IT DOES NOT REPAINT
Lines anchor on confirmed pivots only, and a pivot is not known until the required bars have closed after it. Every state change is judged on a closed bar. The chart-timeframe engine contains no security call at all, and the higher-timeframe engine reads only completed HTF bars, never the one in progress, using the last-closed idiom with an atomic tuple so high, low, close and time cannot straddle a boundary. The cost is a deliberate lag of a few bars on every anchor, and that lag is the guarantee.
WHAT THIS TOOL IS NOT
It draws structure. It shades no band, marks no zone, and makes no claim about resting orders anywhere. When a broken line is reclaimed, this tool calls it a FAILED BREAK, which is a statement about structure and is what the price action supports on its own. A liquidity tool looking at the same bar would call it a sweep, which is a statement about order flow. Same behavior, different claim, and only one of them is visible on the chart.
MADE TO FIT YOUR CHART
Eight card positions, three text sizes, separate colors for rising and falling lines and for their higher-timeframe counterparts, line width, channel fill and opacity, labels on or off, and a toggle per section. Detection, channel, break and retest, style, higher timeframe, card and alerts are separate groups. Pivot length, minimum touches, maximum active lines, the slope cap, the retirement distance, the retest confirmation mode and the retest window are all exposed.
HOW TRADERS ACTUALLY USE IT
Pivot Length decides everything downstream, because it decides which swings exist to be paired. If the chart looks emptier than you expect, that is the first knob, ahead of the touch count.
Minimum touches is the honesty dial. Two touches is a line you drew. Three is a line the market drew. Three is the default for that reason.
Treat a break as the question and the following bars as the answer. Wait for RETESTED or FAILED before deciding what the break meant. The whole tool is built so you do not have to guess which one you are sitting in.
Works on any market and any timeframe.
Display only. This draws structure and reports what happened to it, it does not fire buy/sell signals and it does not forecast. Educational tool, not financial advice.
Published open-source. The pivot pairing and cleanliness scan, the near-duplicate rejection, the two-mode break test, the polarity-flip lifecycle, the apex pre-filter and the higher-timeframe ring buffer are all readable in the source. Everything above explains what it draws and how it decides what to draw; the code is there so you can check that the description is accurate rather than take it on faith. Read it, fork it, argue with the constants. Wskaźnik

Normalize RSI | TR📊 Normalize RSI | TR – Smart RSI Oscillator with Adaptive Normalization & Trend Signals
This indicator transforms the classic RSI into a dynamic, normalized oscillator that adapts to market conditions. It applies a multi-stage smoothing and normalization process to filter out noise, highlight true momentum shifts, and generate clear trend signals.
🔧 Key Features:
RSI Normalization – Centers RSI around 50 and normalizes it over a user-defined lookback period, creating a clean, bounded oscillator.
Dual Smoothing – Applies an exponential smoothing factor twice, allowing you to control responsiveness and reduce false signals.
Trend Detection – Automatically identifies bullish and bearish trends based on crossing customizable overbought/oversold levels.
Dynamic Color Palette – Choose from 9 color themes (Classic, Modern, Heat, Robust, Accented, Monochrome, Moderate, Aqua, Cosmic) to match your chart aesthetic.
Visual Signals – Displays colored candlesticks, background zones, entry shapes (triangles), and a real-time table with the current trend direction.
Momentum-Based Fill Transparency – The fill area between the zero line and the oscillator adapts to momentum strength, giving you visual cues on volatility.
Multi-Plot Display – Plots the normalized RSI, zero line, overbought/oversold levels, and includes a floating label with the latest value.
⚙️ Customizable Inputs:
RSI Length & Smoothing MA Type (EMA, SMA, RMA, WMA, VWMA, HMA, DEMA, TEMA, TRIMA, FRAMA, SWMA)
Normalization Length & Smoothing Factor
Clipping Factor to preserve extreme moves
Overbought / Oversold Levels (adjustable from -50 to +50)
🚨 Alerts Built-In:
Bullish / Bearish crossover of zero
Entry into Overbought / Oversold zones
📈 Ideal For:
Swing traders and scalpers looking for a refined RSI-based edge
Traders who prefer visual clarity and customizable color schemes
Those who want to combine momentum, trend, and volatility into one indicator Wskaźnik

D1 Support/Resistance GuardD1 S/R GUARD — HIGHER-TIMEFRAME ZONES WITH AN R-BASED ENTRY FILTER
Most support/resistance indicators draw lines. The problem is that by the time you are focused on a 5-minute entry trigger, you are no longer looking at the daily chart — and lines on a busy intraday chart become wallpaper. You end up entering three ticks under a level that has rejected price four times in the last year, and the trade turns against you immediately.
This script does two things about that. It builds daily support and resistance zones ranked by how many times price actually reacted at them, and it converts the distance to the nearest opposing level into R — multiples of your own stop size — so the question stops being the vague "am I near a level?" and becomes the concrete "does this trade have room to pay?"
WHAT IT PLOTS
- Clustered higher-timeframe S/R zones, drawn as boxes, labelled with a touch count
- Prior day high, low and close
- Prior week high and low
- Daily 50, 100 and 200 simple moving averages
- A dashboard showing the nearest level above and below price, the distance to each in price and in R, and a clear LONG / SHORT verdict
HOW THE ZONES ARE BUILT
Step 1 — Pivot detection. The script scans a rolling window of closed higher-timeframe bars (250 by default, roughly a year of daily data) and marks every swing high and swing low. Pivot strength is adjustable: a pivot high at strength 3 must be the highest of its own bar plus the three bars either side of it.
Step 2 — Clustering. Raw pivots are noisy and rarely land on exactly the same price twice. Any pivots falling within a tolerance of each other — expressed as a fraction of higher-timeframe ATR, so it scales across instruments and volatility regimes — are merged into a single zone. Each merge increments that zone's touch count and widens its boundaries to span the pivots inside it. The result is a zone with a real reaction history rather than a line through one arbitrary wick.
Step 3 — Ranking. Zones are scored on touch count plus a recency bonus, so a level that was defended four times including recently outranks one that was defended four times two years ago. Only the highest-scoring zones within a configurable distance of current price are drawn, which keeps the chart readable.
Step 4 — Filtering. A minimum touch threshold (default 2) discards one-off swings entirely.
THE ENTRY GUARD
This is the part that does the work. On every bar the script identifies the near edge of the closest level above price and the closest level below price, drawing from both the clustered zones and the discrete key levels. It then evaluates three blocking conditions:
1. Price is currently inside a zone.
2. The nearest opposing level is inside the danger band — a hard proximity threshold set as a fraction of higher-timeframe ATR.
3. There is less than a minimum number of R between price and that level.
The third condition is the useful one. You supply your stop size, either as a multiple of intraday ATR or as a fixed number of points, and the script divides the distance to the nearest level by it. If your stop is 1R and the nearest resistance is 0.8R above, that long cannot pay even if your read on direction is correct — the level will cap you before your target. The dashboard reports this as a number rather than a feeling.
When a direction is blocked, the dashboard cell turns red and reads STAND DOWN. The background can optionally tint. Alerts fire on the transition into and out of a blocked state, so you can be warned before you are staring at a setup rather than after.
Important: a blocked reading is not a signal to trade the other way. It means this particular entry, at this particular price, does not have the runway to justify the risk. Waiting for a better price or a break of the level are both valid responses.
DAILY MOVING AVERAGES
The 50, 100 and 200 daily SMAs are included as levels and feed the guard on equal footing with everything else. They are pulled as last-closed daily values, so they hold flat through the session instead of drifting as the current day's close moves — which is the correct behaviour for a level you intend to trade against.
They behave differently from pivot zones in one respect worth understanding. Pivot zones carry a touch history; the moving averages do not, so they are judged purely on distance. A rising 50 SMA that price is grinding above during a trend day will therefore block longs repeatedly. If that is too restrictive for how you trade, either narrow the danger band or switch the 50 off and keep the 100 and 200, which tend to be the more consequential levels.
HOW TO USE IT
Add it to your execution timeframe — it is designed for intraday charts, 1m through 15m. Set the stop sizing input to match how you actually size positions; every R figure the script produces depends on it. Then read the dashboard rather than the boxes. The boxes are context; the LONG and SHORT row is the decision.
The minimum-room default of 2R is a starting point, not a rule. Pull your own trade history, measure the distance from each entry to the nearest daily level, and find where your win rate falls off. That number is your threshold, and it will not be the same as anyone else's.
REPAINTING
All higher-timeframe data is requested using the expression with lookahead_on construction, meaning every value comes from a closed higher-timeframe bar. Zones rebuild once per closed bar, not tick by tick. What you see on a historical bar is what you would have seen live. The drawn boxes are refreshed on the last bar for display purposes only; the underlying calculations and alert conditions evaluate on every bar from persistent data.
LIMITATIONS AND NOTES
- Requires sufficient history. The 200 SMA needs 200 daily bars, and the zone engine needs at least a few dozen. Newly listed symbols will show partial output.
- Zones are derived from price structure alone. Volume profile, options positioning and session boundaries are not considered.
- High touch counts cut both ways. A level defended four times is a high-probability reaction point right up until it breaks, and when it breaks the move through it is often larger for the same reason. A decisive close through a heavily-touched zone is information, not an indicator failure.
- The recency bonus is deliberately small relative to touch count. If you trade a fast-rotating instrument you may want structure weighted more toward recent action; adjust the lookback window down rather than the scoring.
All settings are documented with tooltips in the settings panel. Source is open — read it, modify it, tell me what you improve.
This script is a decision-support tool, not a trading system. It produces no buy or sell signals and makes no claim about future performance. Nothing here is financial advice. Test any configuration on your own instrument and timeframe before risking capital. Wskaźnik

Apollo Wave X-LunarApollo Wave X-Lunar
Apollo Wave X-Lunar is a momentum and directional indicator based on the movement and slope of three independent waves: F1, XA, and AK. Each source uses a different price calculation to provide complementary readings of market movement.
The indicator displays three “lights” on the panel:
▲ Lime: wave slope is equal to or above zero, indicating upward momentum.
▼ Orange: wave slope is below zero, indicating downward momentum.
In addition to the lights, the indicator displays a Wave Line whose source can be selected by the user.
⚙️ Parameters
Base Period — len
Defines the period used to filter the waves.
Lower periods: higher sensitivity to price changes and more frequent directional changes.
Higher periods: greater smoothing and lower sensitivity to short-term fluctuations.
The default value is 21.
There is no universally optimal period. The appropriate setting may vary depending on the asset, timeframe, and trading style.
Line Source — lineSource
Selects which of the three sources is used to construct the main chart line.
F1 — HLCC4
Uses the average of High, Low, and twice the Close.
XA — HLC3
Uses the average of High, Low, and Close.
AK — OHLC4
Uses the average of Open, High, Low, and Close.
The three sources are calculated independently for the lights. This parameter only changes the Wave Line displayed on the chart.
📊 How to Interpret
The indicator compares the current wave movement with its previous slope.
▲ F1
Shows the slope direction of the wave based on HLCC4.
▲ XA
Shows the slope direction of the wave based on HLC3.
▲ AK
Shows the slope direction of the wave based on OHLC4.
When all three lights point upward simultaneously, there is greater directional agreement between the three price sources. When all three point downward, there is greater agreement toward the downside.
Differences between the lights may indicate that the different price sources are producing different momentum readings.
🌊 Wave Line
The main line uses the source selected under Line Source.
F1: HLCC4
XA: HLC3
AK: OHLC4
The line color follows its slope:
Lime: positive or neutral slope.
Orange: negative slope.
🔧 Suggested Configuration
The default value of 21 can be used as a starting point.
For a faster reading, try lower periods.
For a smoother reading, try higher periods.
The appropriate configuration should be evaluated according to the asset and timeframe being analyzed. It is recommended to test different settings before using the indicator as part of trading decisions.
⚠️ Disclaimer
Apollo Wave X-Lunar is a technical analysis tool and does not constitute investment advice, an offer, or a guarantee of results.
The indicator's signals and readings should be used together with other analysis tools, risk management, and overall market context.
No technical indicator can guarantee future results. Wskaźnik

MTF VWAP + POC Fan### What it does
Seven fixed-lookback windows on one anchor timeframe. Each window draws a VWAP curve — where the average participant's cost sits over that span — and can optionally draw a POC, the single price bin inside that same window that traded the most volume.
Same window, two different questions:
- **VWAP** — what the average participant paid
- **POC** — where participation actually concentrated
A dashboard reads the seven VWAP endpoints and scores the structure they form.
Default ladder is a daily one: **21 / 63 / 126 / 189 / 252 / 378 / 756** bars — roughly one month through three years. The anchor timeframe is configurable, so the same ladder on Weekly becomes five months through fourteen years.
### Why fixed lookbacks instead of swing anchors
Anchoring a VWAP at a swing high or low answers a real question — "what has been paid since that event" — but those anchors collapse into each other as windows grow. If price has not exceeded its three-month high, then the six-month, twelve-month and three-year highs are all the same bar, and several rungs draw one curve.
Fixed-lookback anchors cannot collide. The bar 252 back and the bar 378 back are always different bars, so seven rungs always mean seven distinct windows. That property is what makes a seven-horizon fan worth drawing at all.
### Reading the curve correctly
This is the part most multi-window VWAP scripts leave ambiguous, so it is worth being explicit.
At its **right edge**, VW252 equals the VWAP of the last 252 anchor-TF bars. That endpoint is the number.
The **tail behind it is not a rolling 252-bar series.** Every point on the drawn curve is the accumulation from the origin that is 252 bars back *today*, so the midpoint of the line is roughly a 126-bar average. The curve does not show what VW252 read on those past dates — on any past date it was anchored 252 bars before *that* date, at a different origin entirely.
The tail is one accumulation path from today's origin. Read historical crossings with that in mind.
### How the VWAP is calculated
Standard volume-weighted mean of the source (default HLC3) from the window's origin bar to its end bar, accumulated over **chart** bars. Origins are located on the anchor timeframe, then resolved to the exact chart bar by binary search.
When volume is missing or zero the engine substitutes 1.0, and tracks the substitution rate **per window**. Two different failures hide under one symptom:
- Missing on nearly every bar (synthetic symbols, some indices) — every bar weighs the same, so the curve is an *unweighted* mean of the source. Usable if you know that is what you are reading.
- Missing on a handful of bars in a real feed — a bar weighing 1.0 against neighbours weighing millions is not averaged in, it is effectively *dropped*. Still a proper volume-weighted mean, over a slightly smaller sample.
Curves whose own window exceeds the warning rate are suffixed with `*` and counted on the dashboard.
### How the POC is calculated
The window's high-low range is divided into bins, and each bar's volume is allocated **in proportion to how much of that bar's range overlaps each bin.**
The obvious shortcut — splitting a bar's volume equally across every bin it touches — is wrong at the edges: a bar with 2% of its range in one bin and 98% in the next would contribute 50/50. Since the POC is an argmax rather than an average, that error does not wash out. It can hand the win to the wrong bin.
Fully covered interior bins are accumulated with a difference array (one increment at the low edge, one decrement at the high edge, resolved in a single prefix sum) rather than a per-bin loop, which keeps the cost at O(bars + bins).
Three deliberate constraints:
**Resolution is capped at one bin per tick.** The bin-count input is a *maximum* resolution, not permission to invent sub-tick precision. If a window's whole range spans forty ticks, a hundred bins would put several bins inside one tick and the argmax would be choosing between prices that cannot trade. The reported level is also snapped to the instrument's tick grid, because an unrounded one-tick bin from 10.00 to 10.01 reports 10.005.
**Bin width is per window.** Each window divides its *own* range, so a P756 bin can be several times wider than a P126 bin. Two POCs landing on the same price are not confirming each other to the same tolerance. Each label's tooltip prints its bin width — read the level as the centre of that band, not as a price.
**POC is suppressed, not flagged, when volume is substituted.** A VWAP with missing volume degrades into an unweighted mean, which is still a usable number. A profile with missing volume becomes a bar-*count* histogram, whose peak answers where price spent the most bars regardless of size traded. That is a different statistic wearing the POC's name, so above a threshold nothing is drawn and the dashboard names the reason.
### Why POC is drawn forward, not backward
By default a POC starts at the last calculated bar and extends right. It is not drawn back across the window it was computed from.
A VWAP tail is a continuous accumulation with a value at every bar. A POC is a single number recomputed every bar with no value anywhere but now. Drawing both back to the same origin would make one line a genuine path and the other a snapshot impersonating one — the same visual gesture carrying two different truth-values, which teaches the wrong reading and creates hindsight support that was never there.
`Window + Forward` is available when you want to see the span, with the understanding that the backward segment is decoration.
Related: a POC **jumps**. It is an argmax, so when a different bin overtakes the leader the level teleports. A POC that sat at 70k yesterday and prints 62k today is not a data error — it is a window with two shelves close in volume. The single line cannot tell you that, which is the honest limitation of showing a POC without its profile.
### The visual grammar
- **Colour = horizon identity**, fixed per rung, never reassigned when other rungs are toggled. 252 is gold whether seven rungs are on or two.
- **Solid, width 2 = VWAP**
- **Dashed, width 1 = POC**, same colour as its VWAP
There is deliberately no horizon-based transparency and no colour-by-price-position. Fading short horizons fought the pairing and restyled everything on every toggle. Colour-by-price-position was redundant with the chart itself — whether a VWAP is above or below price is visible by looking at it — and spending the colour channel on it meant colour was unavailable for identity.
The palette is a cool progression (aqua → light blue → blue → lavender → **gold at 252** → violet → deep purple) so the fan reads as one instrument rather than seven unrelated indicators. Gold breaks the ramp deliberately, because 252 is the horizon most often referenced. Green and red stay out of the palette on purpose: they belong to the candles, and to the dashboard.
The script declares `scale=scale.none` so a distant 756-bar VWAP cannot drag the price axis and compress the candles you are actually trading.
### Seven VWAPs, three POCs
All seven VWAPs ship on. Seven ordered curves read fine, and where they bunch is itself information.
POCs are opt-in per rung, defaulting to **126 / 252 / 756** only — medium-term, annual, multi-year. Seven horizontal levels crowd a chart in a way seven curves do not. P189 and P378 are one click away. Global `Show VWAPs` and `Show POCs` switches let you inspect either family alone.
### The structure dashboard
A 0–100 read on where price sits relative to the fan and whether the fan is ordered.
```
STRUCT 88
P>VW 7/7
STACK +5/6
BIAS STRONG BULL
P>POC 3/3
```
**Price position — 50 points.** How many VWAP endpoints price is above, as a fraction of the drawn rungs, times 50.
**Stack — 50 points.** The adjacent-pair ordering, short over long. Each of the six adjacent pairs scores +1 when the shorter window sits above the longer, −1 when inverted, 0 when they are inside an equality tolerance. Raw range −6 to +6, rescaled to 0–50.
The dashboard shows the **signed raw total** (`+5/6`, `0/6`, `−4/6`) rather than a count of bullish pairs, because that signed number is literally what enters the score. Five bullish plus one tied and five bullish plus one inverted are different fans that a bullish-pair count would render identically.
The tolerance is normalised by the **anchor timeframe's** ATR, not the chart's — otherwise the same daily fan would classify two near-identical VWAPs as tied on a 130m chart and ordered on a 39m one, purely because the chart-TF ATR is smaller.
| Score | Bias |
|---:|---|
| 85–100 | Strong Bull |
| 70–84 | Bull |
| 55–69 | Bull Lean |
| 45–54 | Neutral |
| 31–44 | Bear Lean |
| 16–30 | Bear |
| 0–15 | Strong Bear |
`P>POC` is context only and does **not** enter the score. A volume concentration is a location, not a direction.
### What the score is not
Worth stating plainly, because a 0–100 number invites more confidence than this one has earned.
**The two components are not independent.** Price above every VWAP and a perfectly stacked fan are largely the same market condition seen twice — in a sustained one-way move both max out together, in chop both sit near their middles. Treat 0–100 as one structural reading measured two ways, not as a composite of separate evidence. The extremes are easier to reach than a two-component construction suggests.
**Stack ordering is partly mechanical.** These windows are nested — VW21's bars are a subset of VW63's, which are a subset of VW126's — so in any monotonic trend the ordering *follows* from the trend rather than confirming it independently. Where it earns its keep is at turns, when the short end inverts while price position is still high. That divergence between the two rows is more informative than the combined number.
**It is a step function.** With seven rungs, price position moves in jumps of 7.14 and stack in jumps of 4.17. The reading can cross the entire neutral band between two bars without ever printing a value inside it. Small changes are not drift.
**The score is withheld when horizons are missing.** Unless every enabled rung produced a VWAP and no two rungs share a lookback, STRUCT and BIAS print `—` and a `check` row names the reason. Normalising over whatever horizons happened to exist would let a two-horizon symbol print `STRUCT 100 / STRONG BULL`, indistinguishable at a glance from a seven-horizon reading.
Practical consequence: on a symbol without 756 anchor bars of history, the score stays blank until you turn VW756 off. That is deliberate. Disabling the rungs a symbol cannot support makes the reading an explicit statement about which horizons you are using.
### Confirmed Bars Only
With this off (default), windows extend through the current chart bar and update live.
With it on, **both ends** move to completed bars: lookbacks shift back one anchor bar, and all accumulation — VWAP, POC, the dashboard's reference price, and the stack tolerance's ATR — stops at the last chart bar of the last completed anchor candle. The fan then stops moving intraday entirely, which is what the switch should mean. Labels still sit at the chart's right edge while the values belong to the last completed candle; that gap is the point of the switch.
### Settings worth knowing
- **Anchor Timeframe** — the timeframe every lookback is counted in. Must be at or above the chart timeframe. Every anchor timeframe wants its own ladder; the defaults are a daily one.
- **Profile Bins** — maximum POC resolution, capped at one bin per tick.
- **Stored Chart Bars** — an origin must fall inside stored history or its rung is dropped, not approximated. Default 10,000 because 756 daily bars on a 39m chart is roughly 7,500 chart bars.
- **Dim rungs far from price** — optional, off by default. Fades a rung whose VWAP is beyond a set ATR distance. The whole rung dims together so a pair never splits into one bright line and one faint one. Try `scale.none` alone first.
- **Update Mode** — Live redraws every tick, which is necessary rather than wasteful: Pine destroys drawing objects created on an uncommitted tick, so on the forming bar a redraw every tick is the only way curves stay on screen. On Bar Close draws only on committed executions. Use it, or turn POCs off, if the profile passes trip the calculation time limit.
- **Show Diagnostics Panel** — full accounting of rungs, drawn objects and failure reasons. Off by default; anything genuinely wrong still surfaces on the dashboard's `check` row.
### Known properties
**Chart-timeframe sensitivity.** Origins come from the anchor timeframe, but accumulation uses chart bars, so the same daily setup gives slightly different values on a 39m chart than a 130m one. For the VWAPs this is second order — averaging washes out coarse bucketing. For the POC it is not: an argmax does not average, and a coarse bar spreads its volume uniformly across a range it never traded uniformly through. Expect the POC to shift by a bin or two between chart timeframes, more on symbols with frequent wide-range bars.
**Duplicate lookbacks are counted, never merged.** Two rungs set to the same number draw two identical curves in two colours, which looks like two horizons agreeing and is really one horizon entered twice. The dashboard flags it and withholds the score.
### Why VWAP and POC live in one script
They are computed from the same window definition. Splitting them would mean two indicators independently re-deriving identical origins, and would make it impossible to guarantee that P252 and VW252 cover exactly the same bars — which is the entire point of reading them as a pair. The dashboard reads only the VWAPs; the POC family is excluded from it precisely because it answers a non-directional question.
---
*This is a structural reference tool, not a signal generator. Nothing here produces entries, exits or alerts, and no part of it is a claim about future prices. Published open source so the calculations can be checked rather than taken on trust.*
Wskaźnik

TEWMA Momentum Cloud - [JTCAPITAL]TEWMA Momentum Cloud - is a modified way to use dual-length Triple Exponential Weighted Moving Averages (TEWMA), momentum, and the rate of change of the TEWMA spread for Trend-Following and trend-state analysis.
The indicator is designed to do more than simply determine whether price is above or below a moving average. It compares two differently scaled TEWMA calculations to determine the current directional bias, while simultaneously measuring whether the distance between the two TEWMAs is expanding or contracting.
This creates four primary trend states:
* Bullish + Accelerating — the faster TEWMA is above the slower TEWMA and the difference between them is increasing.
* Bullish + Decelerating — the faster TEWMA remains above the slower TEWMA, but the difference between them is decreasing.
* Bearish + Accelerating — the faster TEWMA is below the slower TEWMA and the difference between them is becoming more negative.
* Bearish + Decelerating — the faster TEWMA remains below the slower TEWMA, but the difference between them is becoming less negative.
A fifth state, Neutral / Flattening , is used when the directional relationship between the two TEWMAs remains bullish or bearish, but the averaged TEWMA is moving in the opposite direction. This helps identify situations where the prevailing directional structure is losing momentum.
The result is a visual trend cloud in which the color of the TEWMA lines changes according to both direction and momentum expansion or contraction .
The indicator works by calculating in the following steps:
Selecting the Price Source
The script begins with a user-selected price source. By default, the source is the Close price.
This source is then used as the raw input for both TEWMA calculations. Because the two TEWMAs use the same source but different lengths, the difference between them primarily reflects the way the market is behaving across two different smoothing horizons.
Determining the Second TEWMA Length
The user specifies the primary Length , which defaults to 50.
The second length is dynamically derived from this value using the Multiplier :
Second Length = Length x Multiplier
The result is rounded to the nearest whole number because moving-average lengths must be represented as integer values.
With the default settings:
50 x 2.50 = 125
Therefore, the two TEWMA calculations use lengths of 50 and 125.
This creates a faster and slower version of the same underlying smoothing methodology. The shorter TEWMA reacts more quickly to changes in price, while the longer TEWMA provides a slower representation of the broader price direction.
Weighted Moving Average Calculation
Before the TEMA calculation is applied, the selected source is first processed through a Weighted Moving Average (WMA) .
The WMA assigns greater importance to more recent observations within its calculation period and progressively less importance to older observations.
This makes the resulting moving average more responsive to recent price changes than a conventional SMA.
The script performs this process separately for both lengths:
WMA(source, Length)
and
WMA(source, Second Length)
The resulting WMA series are then passed into the TEMA calculations.
Triple Exponential Moving Average Calculation
The WMA output is then processed through a Triple Exponential Moving Average (TEMA) .
TEMA is designed to reduce the lag that can occur when repeatedly smoothing a data series.
Conceptually, TEMA uses three levels of exponential smoothing and combines them in a way that reduces a substantial portion of the lag introduced by traditional moving averages.
The general TEMA structure can be represented as:
TEMA = 3 x EMA1 - 3 x EMA2 + EMA3
where EMA1 is the first exponential smoothing, EMA2 is an EMA of EMA1, and EMA3 is an EMA of EMA2.
In this script, TEMA is applied to the WMA rather than directly to price.
This produces:
TEWMA1 = TEMA(WMA(source, Length), Length)
and
TEWMA2 = TEMA(WMA(source, Second Length), Second Length)
The combination of WMA followed by TEMA is what gives the indicator its TEWMA construction.
The purpose of combining these smoothing methods is to create a trend representation that remains substantially smoother than raw price while retaining responsiveness to directional changes.
Creating the Average TEWMA
The two TEWMA calculations are then averaged:
TEWMA = (TEWMA1 + TEWMA2) / 2
This average represents the central line of the indicator.
Instead of relying exclusively on either the faster or slower TEWMA, the average provides a combined representation of both time horizons.
This can make the central trend representation less dependent on one specific smoothing length.
Calculating TEWMA Momentum / Spread
The script then calculates the difference between the two TEWMA values:
Momentum = TEWMA1 - TEWMA2
This is one of the most important calculations in the indicator.
The value is positive when TEWMA1 is above TEWMA2 and negative when TEWMA1 is below TEWMA2.
However, the script does not only look at whether this value is positive or negative. It also compares the current value with its previous value.
Therefore, the indicator is effectively examining the direction and rate of change of the spread between the two TEWMAs .
Detecting Bullish Acceleration
Bullish acceleration occurs when:
TEWMA1 > TEWMA2
and
Momentum > Momentum
The first condition establishes that the faster TEWMA is above the slower TEWMA.
The second condition establishes that the difference between the two TEWMAs is increasing.
Therefore, bullish acceleration means that the bullish separation between the two trend filters is expanding.
This is represented by Signal = 2 .
Detecting Bullish Deceleration
Bullish deceleration occurs when:
TEWMA1 > TEWMA2
and
Momentum < Momentum
The faster TEWMA is still above the slower TEWMA, so the overall directional relationship remains bullish.
However, the spread between the two TEWMAs is shrinking.
This means the bullish structure is becoming less expansive, even though the bullish relationship between the two trend measurements has not necessarily disappeared.
This is represented by Signal = 1 .
Detecting Bearish Acceleration
Bearish acceleration occurs when:
TEWMA1 < TEWMA2
and
Momentum < Momentum
The faster TEWMA is below the slower TEWMA, establishing a bearish relationship.
At the same time, the momentum difference is becoming increasingly negative.
Therefore, the separation between the two TEWMAs is expanding in the bearish direction.
This is represented by Signal = -2 .
Detecting Bearish Deceleration
Bearish deceleration occurs when:
TEWMA1 < TEWMA2
and
Momentum > Momentum
The faster TEWMA remains below the slower TEWMA, so the broader directional relationship remains bearish.
However, the difference between the two TEWMAs is becoming less negative.
This means the bearish separation is contracting.
This is represented by Signal = -1 .
Detecting Neutral / Flattening Conditions
The neutral condition is different from simply checking whether the two TEWMAs have crossed.
The script checks whether the directional relationship between TEWMA1 and TEWMA2 conflicts with the movement of their average.
A neutral state occurs when either:
TEWMA1 > TEWMA2 while TEWMA is falling
or
TEWMA1 < TEWMA2 while TEWMA is rising .
In other words, the two TEWMAs may still maintain a bullish or bearish relationship, but the combined TEWMA is beginning to move in the opposite direction.
This provides an additional way of identifying a loss of directional momentum before relying solely on a crossover.
The neutral state is represented by Signal = 0 .
Assigning the Persistent Trend State
The script stores the current signal state in a persistent variable.
The possible states are:
2 = Bullish + Accelerating
1 = Bullish + Decelerating
-1 = Bearish + Decelerating
-2 = Bearish + Accelerating
0 = Neutral / Flattening
Because the signal variable is persistent, it retains its previous value when none of the explicitly defined conditions changes the state.
This means the indicator is not simply recalculating an independent label on every bar; it maintains the latest identified trend state until another condition updates it.
Assigning the Visual Trend Color
The signal state determines the color used by the plotted TEWMA lines.
Bullish acceleration receives one color, bullish deceleration another, bearish acceleration another, bearish deceleration another, and neutral conditions receive a separate neutral color.
The visual distinction therefore communicates two dimensions simultaneously:
1. Direction — bullish or bearish
2. Momentum behavior — accelerating or decelerating
This allows the user to distinguish between a bullish trend that is strengthening and a bullish trend that is losing expansion, rather than treating both situations as identical.
Plotting the Central TEWMA
The averaged TEWMA is plotted as the primary, thicker line.
This line represents the combined trend estimate derived from the faster and slower TEWMA calculations.
Its color changes according to the current signal state.
Creating the Visual Cloud
The script creates an additional hidden plot at:
TEWMA x 0.9
and fills the area between the primary TEWMA and this lower reference level.
The same visual technique is also applied to TEWMA1 and TEWMA2.
These fills create the visual cloud/ribbon appearance of the indicator.
It is important to understand that these filled regions are primarily visual enhancements . They are not additional volatility bands, standard-deviation bands, ATR bands, or independent support/resistance calculations.
The 0.9 multiplier simply places the second boundary at 90% of the corresponding TEWMA value, creating a proportional visual area beneath the plotted line.
Plotting the Fast and Slow TEWMA
In addition to the averaged TEWMA, the script plots TEWMA1 and TEWMA2 individually.
TEWMA1 uses the shorter user-defined length and therefore represents the faster component.
TEWMA2 uses the multiplied length and therefore represents the slower component.
Viewing both lines allows the user to see the underlying relationship that produces the momentum classification.
Optional State-Change Labels
The script contains an optional Show Labels setting.
When enabled, labels are displayed when the signal changes from its previous state.
The available label descriptions are:
Rising + Widening
Rising + Compressing
Falling + Widening
Falling + Compressing
Flattening
The labels are only created when the current signal is different from the previous signal. This prevents a new label from being printed on every bar while the same state remains active.
The labels therefore focus attention on state transitions rather than continuously repeating the same information.
Buy and Sell Conditions:
This indicator does not contain conventional buy or sell conditions, strategy orders, entries, exits, or backtesting logic.
Instead, it identifies trend states .
The bullish states are:
* Bullish + Accelerating — TEWMA1 is above TEWMA2 and the TEWMA spread is increasing.
* Bullish + Decelerating — TEWMA1 is above TEWMA2 and the TEWMA spread is decreasing.
The bearish states are:
* Bearish + Accelerating — TEWMA1 is below TEWMA2 and the TEWMA spread is becoming more negative.
* Bearish + Decelerating — TEWMA1 is below TEWMA2 and the TEWMA spread is becoming less negative.
The neutral state occurs when the averaged TEWMA moves against the current directional relationship between TEWMA1 and TEWMA2.
This distinction is important because a decelerating trend is not automatically a reversal . For example, a bullish trend can begin compressing while remaining bullish. Likewise, a bearish trend can begin compressing while remaining bearish.
Users can therefore interpret the states according to their own trading methodology. For example, an external trading approach could use bullish acceleration as a trend-confirmation condition, while treating bullish deceleration as a warning that momentum is becoming less expansive. However, the indicator itself does not impose entries, exits, stop-losses, take-profits, or position sizing.
The same principle applies to bearish conditions.
The indicator is therefore best understood as a trend and momentum-state visualization tool , rather than a complete trading strategy.
Features and Parameters:
Source — Selects the price series used as the foundation of both TEWMA calculations. The default is Close.
Length — Defines the primary length used by the faster TEWMA. The default value is 50.
Multiplier — Determines the relationship between the faster and slower TEWMA lengths. The default is 2.50.
Second TEWMA Length — Calculated automatically as Length multiplied by Multiplier and rounded to the nearest integer.
Show Labels — Enables or disables the optional state-transition labels displayed on the chart.
Dual TEWMA Structure — Uses two differently scaled TEWMA calculations to compare shorter-term and longer-term trend behavior.
Momentum Spread — Measures the difference between the fast and slow TEWMA.
Acceleration / Deceleration Detection — Determines whether the TEWMA spread is expanding or contracting.
Five-State Classification — Separates the market into bullish acceleration, bullish deceleration, bearish acceleration, bearish deceleration, and neutral/flattening conditions.
Dynamic Color Coding — Changes the plotted line colors according to the current trend state.
Visual Cloud — Adds proportional filled regions around the plotted TEWMA lines to improve visual trend identification.
Specifications:
Price Source
The price source is the raw market data supplied to the indicator.
The default source is Close , meaning each calculation begins with the closing price of every bar.
The script allows TradingView's standard source selector to be used, so the calculation can be based on another available price series if desired.
The selected source is important because every subsequent calculation is derived from it.
Weighted Moving Average (WMA)
A Weighted Moving Average is a moving average that assigns different weights to observations within its calculation window.
More recent observations receive greater weight than older observations.
Compared with an SMA, this allows the WMA to react more strongly to recent price changes.
In this indicator, the WMA is not the final trend line. It is the first smoothing stage before the TEMA calculation.
This creates a two-stage smoothing structure in which the price data is first weighted toward recent observations and then processed through the TEMA.
Triple Exponential Moving Average (TEMA)
TEMA is a moving-average construction that uses three levels of exponential smoothing.
The purpose is to reduce lag compared with simply applying multiple layers of conventional exponential smoothing.
Its conceptual formula is:
TEMA = 3 x EMA1 - 3 x EMA2 + EMA3
where:
EMA1 = EMA(source)
EMA2 = EMA(EMA1)
EMA3 = EMA(EMA2)
The resulting TEMA attempts to retain smoothness while responding more quickly to changes than a heavily smoothed conventional moving average.
TEWMA
The TEWMA used by this indicator can be understood as a WMA-preprocessed TEMA .
Instead of applying TEMA directly to price, the script first calculates a WMA and then applies TEMA to that WMA.
This combines the weighting characteristics of WMA with the lag-reduction characteristics of TEMA.
The script creates two versions of this construction with different lengths.
Fast TEWMA — TEWMA1
TEWMA1 is calculated using the primary user-defined length.
With the default settings:
TEWMA1 = TEMA(WMA(Close, 50), 50)
Because the length is shorter, this component reacts more quickly to changes in the source than TEWMA2.
It therefore serves as the faster component of the trend comparison.
Slow TEWMA — TEWMA2
TEWMA2 uses the automatically calculated second length.
With the default settings:
50 x 2.50 = 125
Therefore:
TEWMA2 = TEMA(WMA(Close, 125), 125)
The larger length causes this component to respond more slowly to changes in the source.
It therefore represents the slower trend component.
Length Multiplier
The multiplier controls how far apart the two TEWMA horizons are.
The formula is:
Second Length = round(Length x Multiplier)
A larger multiplier creates a greater difference between the fast and slow calculations.
A smaller multiplier brings the two calculations closer together.
This parameter therefore directly influences how sensitive the spread is to changes in market direction.
TEWMA Average
The central TEWMA is calculated as:
TEWMA = (TEWMA1 + TEWMA2) / 2
This creates a central representation of the two trend horizons.
Rather than selecting either the fast or slow calculation as the primary line, the indicator combines both into one average.
This can provide a more balanced representation of the underlying trend structure.
TEWMA Spread / Momentum
The indicator defines momentum as:
Momentum = TEWMA1 - TEWMA2
This is effectively the spread between the fast and slow trend measurements.
When the value is positive, the fast TEWMA is above the slow TEWMA.
When the value is negative, the fast TEWMA is below the slow TEWMA.
The absolute size of the spread also provides information about how far apart the two trend estimates have moved.
Most importantly, the script compares the current spread with the previous spread to determine whether that separation is expanding or contracting.
Widening Momentum
When the TEWMA spread increases in the direction of the prevailing trend, the two TEWMAs are moving farther apart.
During a bullish state, this means TEWMA1 is moving further above TEWMA2.
During a bearish state, this means TEWMA1 is moving further below TEWMA2.
The indicator refers to these conditions as acceleration because the directional separation between the two trend measurements is increasing.
Compressing Momentum
Compression occurs when the spread between the two TEWMAs becomes smaller.
During a bullish state, TEWMA1 can remain above TEWMA2 while moving closer to it.
During a bearish state, TEWMA1 can remain below TEWMA2 while moving closer to it.
This is why deceleration does not necessarily mean that the trend has already reversed.
It means that the separation supporting the current directional structure is becoming less pronounced.
Bullish Acceleration
Bullish acceleration requires:
TEWMA1 > TEWMA2
and:
TEWMA1 - TEWMA2 > previous(TEWMA1 - TEWMA2)
This combines directional positioning with expanding momentum.
The first condition identifies the direction.
The second condition identifies whether that directional separation is strengthening.
Bullish Deceleration
Bullish deceleration requires:
TEWMA1 > TEWMA2
and:
TEWMA1 - TEWMA2 < previous(TEWMA1 - TEWMA2)
The fast TEWMA is still above the slow TEWMA, but the spread is shrinking.
This identifies a bullish structure that is losing expansion.
Bearish Acceleration
Bearish acceleration requires:
TEWMA1 < TEWMA2
and:
TEWMA1 - TEWMA2 < previous(TEWMA1 - TEWMA2)
The spread is becoming increasingly negative.
This means the fast TEWMA is moving farther below the slow TEWMA, strengthening the bearish separation.
Bearish Deceleration
Bearish deceleration requires:
TEWMA1 < TEWMA2
and:
TEWMA1 - TEWMA2 > previous(TEWMA1 - TEWMA2)
The spread remains negative but is becoming less negative.
This means the bearish separation is contracting.
Neutral / Flattening
The neutral condition is designed to detect situations where the average TEWMA is moving against the existing fast/slow directional relationship.
For a bullish relationship, neutral occurs when:
TEWMA1 > TEWMA2
but:
TEWMA < TEWMA
For a bearish relationship, neutral occurs when:
TEWMA1 < TEWMA2
but:
TEWMA > TEWMA
This is useful because a market can remain structurally bullish or bearish according to the relationship between the two TEWMAs while the combined trend measure begins moving in the opposite direction.
The neutral state therefore represents a loss of alignment between directional structure and movement of the combined trend .
Signal States
The script converts the detected conditions into numerical states:
2 = Bullish Acceleration
1 = Bullish Deceleration
0 = Neutral / Flattening
-1 = Bearish Deceleration
-2 = Bearish Acceleration
These numerical values are used internally to determine the visual state of the indicator.
Persistent Signal Variable
The signal is stored in a persistent variable.
This means the current state can remain active across multiple bars until another condition changes it.
The script therefore does not require every bar to generate a completely new classification.
This is particularly useful for the visual presentation because a trend state can remain visible until a meaningful change in the underlying conditions occurs.
Color Coding
The indicator uses different colors for the five states.
The colors are not additional calculations and do not affect the mathematical output.
They are a visual encoding system designed to allow the user to recognize both directional bias and momentum behavior without having to inspect the numerical relationships manually.
Primary TEWMA Line
The averaged TEWMA is displayed as the main, thicker line.
Because it combines the fast and slow TEWMA, it acts as the central visual representation of the indicator's trend structure.
Fast and Slow TEWMA Lines
TEWMA1 and TEWMA2 are also plotted individually.
The difference between these two lines is fundamental to the indicator's state classification.
When they separate, the spread changes.
When they move closer together, the spread contracts.
Their relative position determines whether the market is classified as bullish or bearish, while the change in their separation determines whether that trend is accelerating or decelerating.
Cloud / Fill Calculation
The script creates hidden secondary plots using:
TEWMA x 0.9
TEWMA1 x 0.9
TEWMA2 x 0.9
The area between each original line and its corresponding 90% reference is then filled.
This creates the cloud-like visual appearance.
These fills should not be interpreted as statistical probability bands or volatility envelopes.
They are proportional visual regions derived directly from the corresponding TEWMA value.
Optional Labels
The label system is disabled by default.
When enabled, the script checks whether the current signal state differs from the previous signal state.
A label is then created only at the transition into the new state.
This makes the labels useful for visually identifying when the market changes from one momentum regime to another without placing repetitive labels on every bar.
No ATR or Standard Deviation Component
This indicator does not use ATR, standard deviation, Bollinger Bands, RSI, MACD, volume, or other conventional volatility/momentum indicators.
Its momentum classification comes specifically from the difference between two differently smoothed TEWMA calculations and the change in that difference over time .
This is an important part of the design because the indicator is intentionally focused on the relationship between two trend estimates rather than combining unrelated technical indicators.
Why Combine WMA and TEMA?
WMA and TEMA perform different roles within the calculation.
WMA gives greater emphasis to recent observations.
TEMA then applies a triple-exponential smoothing structure designed to reduce lag compared with repeated conventional smoothing.
Combining them creates a trend filter that attempts to balance smoothness and responsiveness .
The objective is not simply to make the moving average smoother. Excessive smoothing can make a trend indicator slow to react.
Instead, the construction uses multiple forms of smoothing while maintaining a relatively responsive relationship with recent price behavior.
Why Use Two TEWMAs Instead of One?
A single moving average can provide information about direction, but it does not directly provide the same contextual information about how the market behaves across different trend horizons.
Using two TEWMAs creates a relative comparison.
The shorter TEWMA reacts faster.
The longer TEWMA reacts more slowly.
When the faster calculation moves above the slower calculation, the short-term trend representation has moved ahead of the longer-term representation.
When it moves below it, the opposite relationship exists.
This relative structure is the foundation of the indicator's directional classification.
Why Measure the Spread Between Them?
Simply knowing that one moving average is above another can be insufficient.
A bullish relationship can exist while the two averages are rapidly separating, or while they are slowly moving back toward each other.
Those are materially different conditions.
The spread calculation captures this distinction.
An expanding spread indicates increasing separation between the two trend horizons.
A contracting spread indicates decreasing separation.
The indicator therefore adds a second layer of information to the basic fast-versus-slow relationship.
Why Separate Acceleration From Deceleration?
A trend does not necessarily change direction immediately when its momentum begins to weaken.
For example, TEWMA1 can remain above TEWMA2 while the spread starts contracting.
The market can therefore remain structurally bullish while the bullish separation is losing strength.
Likewise, a bearish trend can remain structurally bearish while the bearish separation begins to contract.
Separating acceleration and deceleration allows the indicator to communicate this transition instead of treating every bullish or bearish condition equally.
Why Include a Neutral / Flattening State?
The neutral state provides another layer of information beyond the fast/slow relationship.
If TEWMA1 remains above TEWMA2 but the averaged TEWMA begins declining, the underlying directional relationship and the movement of the combined trend measure are no longer aligned.
The same principle applies in reverse during bearish conditions.
This gives the indicator a mechanism for visually highlighting situations in which the prevailing trend structure may be losing alignment.
How the Components Work Together
The indicator can therefore be viewed as a sequence of three major analytical layers:
Layer 1 — Trend Smoothing
The source is processed through WMA and TEMA to create two TEWMA trend estimates.
Layer 2 — Multi-Horizon Comparison
The faster TEWMA is compared with the slower TEWMA to establish the directional relationship.
Layer 3 — Momentum Expansion / Contraction
The difference between the two TEWMAs is monitored over time to determine whether the directional separation is widening or compressing.
The additional neutral logic then evaluates whether the average TEWMA is moving against the established fast/slow relationship.
This creates a compact framework that attempts to answer two related questions:
What is the current directional relationship?
and
Is that relationship becoming more expansive or less expansive?
How to Interpret the Indicator
Bullish + Accelerating
The faster TEWMA is above the slower TEWMA and the spread is expanding.
This is the strongest bullish state within the indicator's classification system because both directional positioning and spread expansion point in the same direction.
Bullish + Decelerating
The faster TEWMA remains above the slower TEWMA, but the spread is contracting.
The bullish structure remains present, but the separation between the two trend horizons is decreasing.
Bearish + Accelerating
The faster TEWMA is below the slower TEWMA and the spread is expanding negatively.
Both directional positioning and spread behavior are aligned with the bearish side.
Bearish + Decelerating
The faster TEWMA remains below the slower TEWMA, but the bearish spread is contracting.
The bearish structure remains present, but the separation is becoming less pronounced.
Neutral / Flattening
The fast/slow relationship remains directional, but the averaged TEWMA is moving against that relationship.
This represents a loss of alignment and can be interpreted as a transition or weakening state rather than an automatic reversal.
Limitations and Important Considerations:
This indicator is a technical-analysis tool and does not predict future price movements.
It does not contain a strategy engine, position sizing, stop-loss calculation, take-profit calculation, risk management system, or backtesting logic.
The bullish and bearish states should therefore not automatically be interpreted as guaranteed entry or exit signals.
Moving averages are inherently derived from historical price data. Even though the WMA/TEMA construction is designed to remain responsive, the indicator can still react after a price movement has already begun.
The Length and Multiplier settings materially affect the behavior of the indicator. Shorter lengths generally make the calculations more responsive, while longer lengths generally make them slower and smoother.
The indicator does not use a volatility normalization mechanism. The TEWMA spread is measured directly in the price units of the underlying instrument.
The cloud fills are visual representations and should not be interpreted as probability bands, volatility bands, or statistically calculated support/resistance areas.
The neutral state does not guarantee that a reversal will occur. It identifies a specific loss of alignment between the directional TEWMA relationship and the movement of the averaged TEWMA.
Likewise, deceleration does not automatically mean that a trend is ending. It only indicates that the spread between the two TEWMAs is contracting according to the script's calculation.
Users should therefore interpret the indicator within the context of their broader market analysis and risk-management process.
Originality and Design Purpose
The distinctive element of this indicator is not simply the use of moving averages.
The script combines a WMA-preprocessed TEMA structure with two different time horizons and then uses the spread between those two TEWMAs as a momentum-state measurement .
Instead of producing only a binary bullish/bearish classification, the indicator separates directional conditions into acceleration and deceleration states.
This provides a more detailed visualization of the relationship between short-term and longer-term trend behavior.
The purpose of the design is therefore to make the changing relationship between two trend horizons easier to interpret visually, while keeping the underlying calculations focused specifically on TEWMA structure and its momentum spread.
Summary
TEWMA Momentum Cloud combines two differently scaled TEWMAs to create a multi-horizon view of trend direction.
The source is first processed through a Weighted Moving Average and then through a Triple Exponential Moving Average.
The resulting fast and slow TEWMAs are averaged to create the central TEWMA.
The difference between the fast and slow TEWMAs is then calculated as the momentum spread.
The sign of that spread determines the bullish or bearish relationship, while the change in the spread determines whether that relationship is accelerating or decelerating.
An additional neutral condition identifies situations where the averaged TEWMA moves against the prevailing fast/slow relationship.
The result is a five-state trend classification:
Bullish + Accelerating
Bullish + Decelerating
Neutral / Flattening
Bearish + Decelerating
Bearish + Accelerating
The visual cloud, line colors, and optional transition labels are then used to make these states easier to identify directly on the chart.
TEWMA Momentum Cloud is therefore designed as a trend-structure and momentum-state visualization tool , helping users distinguish not only between bullish and bearish conditions, but also between trends that are expanding and trends that are beginning to compress.
Enjoy! Wskaźnik

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.
Wskaźnik

Volatility-Adaptive Moving Average | TR 📝 Overview
This indicator combines a volatility-adaptive moving average with dynamic period adjustment, creating a responsive trend-following system that automatically adjusts to changing market conditions.
The core concept is simple yet powerful: when volatility increases, the moving average becomes more responsive; when volatility decreases, it smooths out – reducing lag while filtering out noise.
⚙️ Key Features
📊 Smart Moving Average Engine
Choose from 15 different MA types:
Standard: EMA, SMA, RMA, WMA, VWMA
Advanced: HMA, SWMA, ALMA, DEMA, FRAMA, KAMA
Complex: T3, T3ALT, TEMA, TRIMA
🔄 Dynamic Period Adjustment
Period changes automatically based on volatility ratio
Uses ATR (Average True Range) to measure current market volatility
Can be smoothed for more stable period transitions
🎯 Visual Signals
Clear BUY/SELL labels on price crossovers
Volatility bands that expand/contract with market conditions
Real-time info label showing key metrics
Statistics table with all important values
🎨 Color Customization
9 different color schemes to match your chart style:
Classic, Modern, Heat, Robust, Accented, Monochrome, Moderate, Aqua, Cosmic
🔧 How It Works
ATR Calculation: Measures current market volatility
Average ATR: Establishes baseline volatility
Volatility Ratio: Compares current vs average volatility
Dynamic Period: Adjusts MA length based on this ratio
Adaptive MA: Plots the volatility-adjusted moving average
📈 Use Cases
✅ Trend Following – Capture trends early without excessive whipsaws
✅ Volatility Trading – Adjust position sizing based on market conditions
✅ Entry/Exit Signals – Get clear crossover signals with minimal lag
✅ Market Analysis – Visualize volatility expansion/contraction in real-time Wskaźnik

[Kpt-Ahab] Savings Plan IND Savings Plan Indicator
This indicator simulates and documents a complete savings plan directly on the TradingView chart. Deposits, dividends, purchases, sales, and costs are processed through a shared savings-plan account, making the cash balance and cash flow transparent and traceable.
Features:
- Initial capital with first purchase
- Regular deposits with optional periodic increases
- Fractional or whole units
- Automatic use of available cash when the regular DCA budget is insufficient to purchase the minimum tradable quantity
- Chart warning when a DCA purchase cannot be executed
- Four manual or adaptive DIP-buy levels
- Automatic profiles: Defensive, Balanced, and Aggressive
- Manual or automatic profit taking with trailing and cash rebalancing
- Minimum price increase required between two TP sales
- Transactions at the confirmed bar close or at the bar open
- Dividend processing
- Transaction, broker, custody, and dividend costs
- TradingView alerts for DCA, DIP, and TP events
- Detailed purchase and sale labels
- Marking of the highest profit point and the largest portfolio drawdown
- Full statistics table or compact mobile view
- Tables, labels, and alert messages in English, German, or French
The statistics include, among other values, deposits, cash balance, units held, cost basis, market value, portfolio value, realized and unrealized results, total costs, drawdowns, cumulative return, and the annualized return (XIRR).
Mobile Table
A reduced mobile view can be enabled for smaller screens. It displays the most important portfolio, return, drawdown, cost, and transaction information using shorter labels and smaller text.
Transaction and Alert Notes
With "Confirmed close", signals are triggered only after the bar has been confirmed at its closing price. On daily charts, the exchange may already be closed by the time the signal becomes available.
With "Bar open", the evaluation is performed at the opening price of the new bar. The Auto model uses only confirmed data from the previous bar. The opening price of the new bar is not necessarily identical to the previous closing price, for example when a price gap occurs.
The indicator does not place real orders. Automatic settings and historical results do not guarantee future performance and do not constitute investment advice.
Wskaźnik

MA Slots - Multi-TimeframeMA Slots - Multi-Timeframe
A moving average toolkit built around one idea: instead of separate, duplicated MA settings for each chart timeframe, you configure a flat pool of MA "slots" once, and each slot decides for itself which timeframes it appears on.
How it works
- 20 native slots. Each has its own Period, Type (SMA/EMA/RMA/VWMA/WMA), Source, Color, and Width — plus four checkboxes: Intraday / Daily / Weekly / Monthly. Check one box and that slot shows only while your chart is on that timeframe class, computed directly from your chart's own bars — a normal, smoothly-updating line, nothing fetched from elsewhere. Check two or more boxes (e.g. Daily and Weekly) and the same MA definition covers both — you don't need to re-enter the same period/type twice to reuse it across timeframes; the boxes just say where else that one definition applies. Only one box is ever "live" at a time, since a chart can only be one timeframe class at once.
- 5 cross-timeframe overlay slots, for the specific case of wanting a different timeframe's MA visible on your current chart — e.g. a Weekly MA overlaid on a Daily chart. These are separate from the 20 native slots because they work differently under the hood (see Limitations below).
- 4 timeframe-scoped cloud fills — one each for Intraday/Daily/Weekly/Monthly. Each shades the area between two of your 20 native slots (pick which two by number), colored by which one is above the other. Because the picker is scoped to a single timeframe class, and because the script validates your choice against that class's own checkboxes, a mismatched pick (e.g. picking a slot that isn't enabled for the timeframe you're viewing) shows a clear on-chart warning instead of silently doing nothing.
How to use it
Set up a slot's Period/Type/Source once, then tick whichever timeframe(s) you want it visible on. With 20 slots × several settings each, expect a long settings panel — it's organized into one numbered group per slot so you can navigate it without scanning a flat list.
Why it's original
This isn't a per-timeframe-group design (a fixed number of MAs hardcoded to each of four separate sections) the way most multi-timeframe MA scripts are built. It's a flat, shared-definition model where one MA can serve multiple timeframes at once without duplicate configuration, with a separate, clearly-labeled mechanism for the genuinely different cross-timeframe-overlay case, and built-in validation feedback for the cloud feature rather than a silent failure mode.
Limitations
- The 5 overlay slots use request.security() to pull a different timeframe's data onto your current chart. Because that source timeframe updates less often than your chart, the line will hold flat and then step to a new value — this is expected, not a bug. It also means historical bars can show that timeframe's completed value earlier than a live chart would have (a well-known repainting trade-off of this technique) — worth knowing if you use it for precise historical analysis.
- The 20 native slots avoid this entirely: they only ever show data native to the chart you're currently viewing, so there's no repainting risk there.
- A slot with no timeframe boxes checked simply won't appear anywhere until you check at least one — that's intentional (all 20 slots aren't meant to be active by default).
Open-source, MPL 2.0 licensed. Wskaźnik

Pattern Atlas : Geometric Indicator [AxeAlgo]Pattern Atlas : Geometric Indicator
A chart-native scanner for 16 classical price-structure ("geometric") chart
patterns. It tracks confirmed swing pivots as they form and, when a run of
pivots satisfies the geometry of a known pattern and its breakout condition, it
marks the pattern on the chart with an outline box, an optional construction
skeleton, a measured-move target, and a labelled pin signal. It also keeps a
live status table of every pattern it knows.
All pattern-recognition logic lives in the companion Pine library
"Pattern Atlas : Geometric ". This script is the visualization and
alerting layer on top of it, so the detection rules stay in one place that can
be maintained and audited on their own.
Patterns detected
Reversal patterns: Head & Shoulders and its Inverse; Double Top and Double
Bottom; Triple Top and Triple Bottom; Rounding Top and Rounding Bottom; Diamond
Top and Diamond Bottom; Broadening Formation; and the V-Top / V-Bottom spike.
Continuation patterns: Ascending Triangle; Descending Triangle; Symmetrical
Triangle; Rising and Falling Wedge; Bull and Bear Flag; Bull and Bear Pennant;
Rectangle; and Cup & Handle with its Inverted form.
Structural patterns: Island Reversal and Bump-and-Run Reversal.
How it works
First, a rolling list of confirmed swing highs and lows is maintained. The
"Pivot left bars" and "Pivot right bars" inputs set how many bars on each side
of a candidate must be less extreme for it to count as a pivot. Higher values
give fewer, more significant pivots and a longer confirmation lag.
Next, each pattern function inspects the recent pivot sequence for its defining
shape together with the price move that confirms it. For example, Head &
Shoulders looks for three peaks with a lower-shoulder relationship and a close
back through the neckline; an Ascending Triangle looks for a flat resistance
base with a rising support line and a close through the base.
Each match reports its direction (bullish or bearish), the exact pivots it was
built from, a text description, a strength score, and a measured-move price
target.
Strength score
The strength score runs from 0 to 100 percent and measures how decisively price
broke through the pattern's confirmation level, relative to the pattern's own
price range. A higher score means a cleaner, more committed break.
Patterns defined by a single point, such as the Spike and the Island Reversal,
have no internal range to measure against and always score a neutral 50 percent.
The "Minimum pattern strength to show" input filters marginal matches off the
chart and out of the alerts.
Measured-move targets
The target is a classical projection: the pattern's own height added to or
subtracted from the breakout point, shown as a small price label. No ray is
drawn out to it.
Targets are not shown for the Spike, the Island Reversal, or the Bump-and-Run
Reversal, because those patterns have no reliable height to project from.
Repainting
Every box, line, target, and pin is drawn only on a closed bar. Each match is
gated so it appears, and alerts, only once, on the bar it is first confirmed.
Swing pivots are only known a number of bars after they occur, equal to
"Pivot right bars". That confirmation lag is structural to pivot-based analysis,
not repainting. Nothing already drawn is moved or removed on later bars.
What you see on the chart
A box outlines the full pivot span of each match, coloured by direction.
Construction lines draw a zig-zag through the exact pivots that built the
pattern. This is off by default.
Construction points place a small circle on each of those pivots. This is also
off by default.
A target label shows the measured-move price.
A pin signal is a thin stem with a glowing gem at its tip, placed below the bar
for a bullish match and above it for a bearish one. Hovering the gem shows the
full list of matches on that bar with their strength and targets.
The scanner table lists every pattern with a live status column. When a pattern
matches on the current bar the row shows its name and strength percent; when it
does not, the row shows a dash. Hovering any row shows that pattern's
description.
Inputs
Pivot Detection controls the left bars, right bars, and the maximum number of
pivots tracked.
The Reversal, Continuation, and Structural groups each have a master enable
switch plus one checkbox per pattern, so a whole category can be turned off in
one click.
Display controls the boxes, construction lines, construction points, targets,
and pin signals; the minimum strength filter; the table on/off, position, and
text size; and the bullish and bearish colours.
Watermark switches between a Dark and a Light theme.
Alerts
There is one alert condition per pattern, plus an "Any Bullish Chart Pattern"
and an "Any Bearish Chart Pattern" condition.
There is also a single dynamic alert() call that fires once per closed bar with
the full list of patterns found on that bar, along with their strength and
targets. Add it using the "Any alert() function call" option when creating the
alert.
Every alert condition is gated to confirmed bars in the code itself, so none of
them can fire from a still-forming bar regardless of the alert frequency chosen.
Notes
Chart-pattern recognition is inherently approximate. Treat matches as structured
context rather than mechanical trade signals, and confirm them with your own
analysis.
The indicator works best on liquid instruments and on timeframes where swings
are well defined. Very low timeframes produce noisy pivots.
This is not financial advice.
Dependency: Pattern Atlas : Geometric , a Pine library.
Wskaźnik

ICT Combined Venom Silver Bullet Displacement LiquidityThirteen switchable ICT modules in one overlay, built to replace several separate scripts on one chart. Nothing here predicts price — every module is a mechanical description of something that already happened.
MODULES
1-3 SESSION MODEL. Three independent instances of one CISD engine: Venom NY plus two Silver Bullet windows (10:00-11:00 and 14:00-15:00 NY, London preset included). Each builds an opening range, waits for a directional raid, locates the change-in-state-of-delivery level at the last opposing candle's open, and confirms when a candle CLOSES back through it — body close, not wick. On confirmation the order block and most recent unmitigated FVG are drawn.
4 DISPLACEMENT. Candles whose range is a standard-deviation outlier and that leave a gap behind. Confirmed bars only.
5 LIQUIDITY. Prior day/week/month, Asia and London highs and lows. A sweep requires raid AND rejection — through the level and closing back within the same candle. A close beyond is acceptance, not a sweep.
6 FIRST PRESENTED FVG. The first gap of the AM and PM sessions with its 50% (consequent encroachment). Always sourced from 1-minute data whatever the chart timeframe, and tested against the middle candle so the opening candle cannot form it. Retained across days.
7 OPENING RANGE GAP. Prior regular-session close to today's open, with 50% and quadrants.
8 PREMARKET DEALING RANGE. The 07:00-09:00 NY range graded into quadrants and octants, locked at 09:00 and carried forward. Premium and discount are measured against THIS range, not the session or daily range.
9 BODY / WICK LAW. A demand zone holds while bodies stay in its upper half, supply while they stay in the lower half. Wicks may cross the 50% freely; only a closed body is a violation. Runs against modules 6, 7 and 8. A filter, not a signal.
10 AM REGIME CLASSIFIER. Scores how likely the morning is to consolidate. READ THIS BEFORE ENABLING: it encodes a claim that is not established fact, ships with untested default thresholds as a measurement instrument, and its gate over other modules' alerts is off by default and should stay off until the calibration record earns it.
12 SUSPENSION BLOCKS. An FVG carrying a volume imbalance at BOTH ends — three stacked spans with no body trade across any of them. Read from the chart timeframe.
13 NDOG / NWOG. Settlement print to the next session's open, drawn as solid blocks and deliberately not retired when filled, because price returns to them for weeks. A settlement window that never prints yields no gap rather than one measured against a stale close.
DASHBOARD. The premarket range and which side of equilibrium price sits on, plus a calibration summary: logged sessions split by premarket classification, reporting median realised morning efficiency per group with sample sizes, flagged when thin.
FVG GEOMETRY. An FVG edge is a wick; where the neighbouring candle's body does not reach it, that space is a volume imbalance belonging to the same inefficiency. Edges widen to include it, never narrow. Extending this to the library-drawn zones in modules 1-3 is a separate switch, off by default, with a diagnostic counter so it can be verified rather than assumed.
USING IT
Switch modules off and add them back one at a time. Modules 5, 8 and 6 together are a complete framework and a reasonable place to stop. Zones mark where a reaction is plausible — they are not entries, and nothing here manages risk or sizes a position.
CREDITS
Reuses open-source work under the Mozilla Public License 2.0.
TFlab, from "ICT Venom Trading Model" and "Silver Bullet ICT Strategy": the CISD detection routine, the opening-range state machine, and the order block and FVG handling. This script also calls TFlab's libraries OrderBlockRefiner_TradingFinder, OrderBlockDrawing_TradingFinder and FVGDetectorLibrary. The engine behind modules 1-3 is substantially TFlab's work.
tradeforopp (TFO): the displacement measure in module 4.
fadizeidan, from "ICT Open Range Gap & 1st FVG": the volume-imbalance FVG geometry, sourcing the first presented gap from one minute, the middle-candle session test, and the opening range gap definition.
Original here: parameterising TFlab's engine so three overlapping windows run independently; the whole liquidity module; multi-day retention and carry rules for the first presented gap; the premarket dealing range and grid; the body/wick test; suspension blocks; NDOG/NWOG; the verified-coordinate approach to unifying FVG geometry; and the regime classifier shipped with the means of checking it. Several source defects are also fixed — the opening range absorbed the first bar of the trading window, a Bar Back Check input was overridden by a hardcoded value, four colour inputs were never referenced, box count was left at the library default, and the displacement module repainted intrabar.
The concepts themselves — fair value gaps, consequent encroachment, displacement, liquidity raids, premium and discount, the first presented gap — are ICT's (Michael J. Huddleston) and are not claimed as original.
LIMITATIONS
Intraday only; session windows cannot resolve on daily and above. Module 6 needs a minute chart and stops populating silently beyond the available one-minute history, so an empty older day may mean missing data rather than no setup. NDOG/NWOG approximate the settlement print on daily and above. Drawings are subject to TradingView's 500-object limits. Signals confirm on bar close, one bar after the move that caused them. Module 10's thresholds are untested defaults.
Published under the Mozilla Public License 2.0, consistent with the sources.
Wskaźnik

Split VWAPWhat it does
Split VWAP cuts every bar horizontally at the session VWAP and draws it as two candles at the same position: one spanning the low up to VWAP, one spanning VWAP up to the high. Each partial takes the bar's open and close clamped into its own range, and a share of the bar's volume proportional to its height. Where VWAP sits at or beyond a bar's extreme, one partial collapses to zero height and the other takes the whole bar and all of its volume; the collapsed one is hidden by default.
A single candle gives you four prices and one volume total, but says nothing about how that activity was distributed relative to the session's average price. Splitting the bar at VWAP and attributing volume to each side makes that distribution visible.
How the colouring works
Each partial is coloured from two changes, both measured against the previous bar's partial on the same side of VWAP: the change in attributed volume, and the change in clamped close.
In the default mode, "Volume hue OKLCh", each change gets a channel of its own. The volume change moves the hue along a continuum — red (
#ea6c5c, hue 29) when it fell, green (
#05b28d, hue 171) when it held, blue (
#7b8efa, hue 274) when it rose. The price change moves the lightness: lighter when the close rose, darker when it fell.
All three anchors sit at an OKLCh lightness of 0.680 and hold as much chroma as their hue can carry at that lightness, capped at 0.16 so the ends do not shout over the middle. Green is the quiet one because green simply cannot hold as much. OKLCh is used rather than HSL because HSL treats lightness as a function of the hue you happen to be on, so a fixed magnitude renders brighter on some hues than others; in OKLCh, lightness, chroma and hue move independently.
Bodies are hollow when the partial's clamped close is above its clamped open, and solid otherwise. A dot marks the VWAP level itself, coloured by the same scheme applied to the whole bar.
Three further modes are included — Quadrant intensity, Bilinear blend and Polar OKLCh. These read the two changes as four corner colours instead of two channels, one per sign combination, and use magnitude to drive chroma and opacity. Every corner and anchor colour is an input.
Scaling
Every series is normalised against the dispersion of its own bar-to-bar changes: 2.5x the mean absolute change over a lookback, which is roughly two standard deviations for a well-behaved distribution but far less sensitive to the occasional volume spike.
Measuring each series against itself matters more than it sounds. A partial carries only a fraction of the bar's volume, so normalising its volume change against the whole bar's average volume compresses that axis and leaves the colour field stuck near the middle. In the other direction, half the ATR is smaller than a typical close-to-close move, so the price axis clips on a large share of bars. It also gives the VWAP-pinned partial a usable scale: when a bar closes above VWAP the lower partial's close is pinned to the cut, so its only movement is VWAP drift — small in absolute terms, but perfectly legible against its own dispersion.
The consequence worth holding on to while reading the chart: the colour says how unusual a change is for that partial, not how large it is in absolute terms.
Setup
The script paints over the chart's native candles, but Pine cannot hide the chart symbol itself. For the cleanest result, right-click the chart, open Settings -> Symbol, and uncheck Body, Borders and Wick.
Settings worth knowing
Gradient mode — the four schemes described above.
Price lightness span — how far a full-strength price change moves the lightness off the anchor, in OKLCh lightness. Default 0.16. A wider span reads more decisively but costs colour at both ends, because sRGB is widest in the middle and narrows toward black and toward white. Rather than let the channels clip, the requested chroma is fitted to whatever the lightness and hue can actually carry, so bright bars are pastel and dark bars are saturated.
Response ramp — how quickly the colour responds as a change grows. 1.0 is proportional; the default 0.6 reaches most of the response earlier, so only genuinely quiet bars stay washed out.
Price change scale / Volume change scale — the lookbacks for the two normalisers.
Transparency at no change — how far quiet bars recede. Lower it if the quiet end reads too faint.
Limitations
Volume attribution is proportional to segment height, not measured from intrabar data. It is a shape-preserving approximation, not a true intrabar volume profile.
The VWAP is session-anchored, so the split level resets at each session boundary and the first bars of a session sit close to it.
On a strongly trending session, price can run far enough from the session VWAP that one partial collapses on most bars and the display degrades toward ordinary candles. That is expected behaviour rather than a fault.
The script requires a symbol that reports volume, and raises a runtime error on symbols that report none.
Originality
This is original work. The bar splitting, the volume attribution, the per-partial normalisation, and the OKLCh colour handling — including the OKLab conversions and the chroma fitting, neither of which Pine provides — are implemented from scratch. No third-party code is reused. Wskaźnik

cephxs / CISD [base]What this solves
A CISD (Change In State of Delivery) marks the moment one side loses
control: price closes back through the run of candles that made the last
push. This script finds those moments, draws the level , and removes the
level when it fails.
What makes it different
Most CISD tools mark the open of the last opposing candle and stop there.
This one tracks the whole opposing run, not just its last candle. It
records the true extreme of the move and extends the level while the run
continues. It commits only when a candle closes through the level. It also
classifies a special case — the propulsion block — where a new CISD forms
after price holds inside the zone of an earlier CISD. Propulsion blocks get
a thinner line, so you can see the difference between continuation and a
fresh reversal. The trade-off is patience: the script draws nothing as
confirmed until a close of the breaking candle... You will never get the level at the exact turn.
How it works
A swing point forms. The script walks back through the run of
same-direction candle bodies that came before it. The open of the first
candle in that run is the CISD level.
The script draws the level as a dotted line — a pending CISD. If the
opposing move continues, the script moves the pending level with it and
updates the true extreme of the run.
When a candle closes through the level, the script confirms the CISD.
The line becomes solid, and the script places a marker on that bar.
If a pending CISD gets no confirmation close within its timeout, the
script removes it. If price later crosses the swing point that created a
confirmed CISD, the script removes that CISD. A broken level does not stay
on your chart.
A propulsion block is a confirmed CISD whose reversal extreme moved into
the zone of an earlier, still-valid CISD in the same direction and held.
The script draws it with a 1px line and gives it no Fibonacci projections.
Fibonacci projections
Each confirmed CISD can project extension levels from its stretch, in the
direction of the new delivery. Two anchor modes:
Body — projects from the candle bodies of the stretch.
Wick — projects from the true peak or trough of the whole
opposing move, wicks included.
Levels -0.5 through -4.5 have individual toggles and colors. The script
always draws levels 0 and 1 as faint reference lines. The script caps
projections per direction. On charts of less than 1 hour, new projections
in one direction must form at least 2 chart-hours apart. This gap protects
a well-placed recent projection from clustered CISDs.
How to use it
Load the script on your execution timeframe with the default settings.
It works on all symbols and timeframes.
A dotted line is a pending CISD. Do not act on it. A solid line is a
confirmed change in delivery. The level often acts as support or
resistance on a retest.
A thin solid line is a propulsion block. Read it as continuation from
an earlier level, not as a fresh reversal.
If a confirmed level disappears, price broke the swing point that
created it. Treat this removal as the invalidation.
Use the Fibonacci extensions as draw-on-liquidity targets for the move
that follows confirmation.
Settings that matter
CISD Directional Bias — default Auto. When you trade one side
of a higher-timeframe bias, set it to Bullish or Bearish.
CISD Size Filter — default on, Regular. This setting removes
stretches that are small in relation to current volatility. The smallest
preset (Really small) keeps more CISDs. The largest preset (Juicy) keeps
only significant moves.
CISD Sensitivity — default Standard. This setting controls how
many bars a pending CISD waits for its confirmation close (Standard 10,
Max 20).
Show only Macro CISD? — default off. When this setting is on,
confirmation must occur in the macro windows (minutes 00-10, 24-36, 50-59
of each hour).
Filter by Purge — default off. When this setting is on, a CISD
forms only after a sweep of a nearby swing, within your bar tolerance.
Show All Historical CISD? — default off. When this setting is
on, invalidated CISDs stay on the chart as dashed lines. The maximum-count
limit no longer applies.
Calculate From — default Body. Set it to Wick to anchor
Fibonacci projections at the true extreme of the opposing move.
Limitations
Confirmation is close-based. A confirmed CISD does not repaint. But
you get it one closed candle after the turn, never at the turn.
Pending (dotted) levels are provisional by design. They move while the
opposing run extends, and they disappear on timeout. Do not trade a dotted
line as a confirmed level.
The macro time filter uses fixed New York-aligned windows. On
timeframes of more than 1 hour, the filter has little meaning.
The script has no alerts. It is a charting tool.
The script computes levels only over the most recent bars of chart
history, not the full loaded history.
Credits
CISD is a concept from the ICT (Inner Circle Trader) body of work. The
detection engine, filters, propulsion-block classification, and projection
logic are original code. I extracted them from my own larger toolkit and
published them standalone, so traders can read, audit, and reuse the code.
FAQ
Does it repaint?
Confirmed lines and markers do not repaint. Pending dotted lines update
live, and the script can remove them. This behavior is their job, not a
defect.
Why did a confirmed line disappear?
Price traded back through the swing point that created it. The level
failed, so the script removed it. If you want to keep failed levels on the
chart, enable Show All Historical CISD.
Why do some CISDs have no Fibonacci levels?
Propulsion blocks get no projections. Projections have a cap per
direction. On charts of less than 1 hour, a minimum spacing gap applies.
This is a tool for your own analysis, not trading advice. Test it
on your own instruments and timeframes before you even think about risking money on it.
Wskaźnik

Volatility Regime Tracker | NickJoanVolatility Regime Tracker | NickJoan
Core Idea
Volatility Regime Tracker measures the dispersion of price relative to its recent average and classifies the current market environment into distinct volatility states. Instead of just showing raw volatility values, the indicator uses percentile-based thresholds combined with moving average direction to identify three persistent regimes: LOW, NEUTRAL, and HIGH.
The script goes beyond simple volatility measurement by tracking how long each regime has lasted and comparing it to historical averages, giving you a statistical expectation for when the current regime might end.
The indicator can be used in two ways:
• As a volatility gauge, where you monitor the current volatility percentage and its trend.
• As a regime detection tool, where the background colors and duration table help you anticipate volatility state changes.
Calculation Logic
The indicator works through three main stages:
1. Volatility calculation
For the selected price source, the script first calculates the standard deviation over a user-defined lookback window. This absolute volatility is then normalized by the average price to produce a percentage-based measure.
• The script calculates the standard deviation of the source over the lookback period.
• It calculates the simple moving average of the source over the same period.
• It divides standard deviation by average price and multiplies by 100.
• It optionally annualizes the result using √365 for crypto daily charts.
This creates a coefficient of variation measure that shows how much price typically deviates from its recent average as a percentage.
2. Regime classification
The script then determines whether current volatility is high, low, or neutral relative to recent history.
• It calculates the percentile rank of current volatility over a regime lookback window.
• It compares this percentile to user-defined thresholds (default: 30th and 70th percentiles).
• It classifies volatility as HIGH (above upper threshold), LOW (below lower threshold), or NEUTRAL (between thresholds).
3. Dual confirmation
To reduce false signals, the script combines percentile ranking with moving average direction.
• It calculates a moving average of the volatility series.
• It checks whether current volatility is above or below this MA.
• It assigns regime states based on both percentile and MA direction.
This dual-confirmation approach produces five distinct visual states that map to three underlying regimes.
Background Color Logic
The script uses a two-layer color system to show both regime state and confidence level.
Strong signals (darker colors)
• Dark red: High percentile AND above MA (strong high volatility)
• Dark green: Low percentile AND below MA (strong low volatility)
Moderate signals (lighter colors)
• Light red: Neutral percentile but above MA (rising volatility)
• Light green: Neutral percentile but below MA (falling volatility)
Uncertain signals
• Gray: Percentile and MA direction disagree (conflicting signals)
This color structure allows you to distinguish between high-confidence regime readings and transitional or uncertain states.
Regime State Mapping
The indicator consolidates the five color states into three regime categories for duration tracking:
• LOW (0): Any green shade (dark or light) - volatility is low or falling
• NEUTRAL (1): Gray - volatility is in transition or conflicting
• HIGH (2): Any red shade (dark or light) - volatility is high or rising
This mapping ensures the duration statistics reflect the broader regime environment rather than short-term color fluctuations.
Duration Tracking Logic
The script continuously monitors regime changes and builds a historical record of how long each regime typically lasts.
Duration measurement
• When a regime change is detected, the script calculates how many bars the previous regime lasted.
• This duration is stored in an array specific to that regime type (LOW, NEUTRAL, or HIGH).
• The process repeats for each regime change, building a distribution of historical durations.
Statistical analysis
• The script calculates the average duration for each regime type from the stored history.
• It calculates the standard deviation of those durations.
• It computes confidence intervals at ±1 standard deviation (~68% confidence).
Real-time tracking
• The script counts how many bars the current regime has lasted.
• It displays this count alongside the historical average and confidence bounds.
• This allows you to see whether the current regime is typical, unusually short, or unusually long.
Duration Table Output
The table displays four rows of information for each regime type:
• Current bars in regime (if active) or "—" (if inactive)
• Historical average duration for LOW regimes
• Lower bound (average − 1 SD)
• Upper bound (average + 1 SD)
Interpretation
• If current bars < lower bound: regime is unusually short (may extend further)
• If current bars ≈ average: regime is typical (no strong expectation either way)
• If current bars > upper bound: regime is unusually long (may be nearing end)
Chart Output
The indicator displays three visual elements in a separate pane below the price chart:
Volatility line
• Shows the current annualized volatility percentage
• Plotted in blue for clear visibility
Moving average line
• Shows the smoothed volatility trend
• Plotted in gray with thicker linewidth
• Can be toggled off via input
Background color
• Shows the current volatility regime state
• Uses five color states mapped to three regimes
• Can be toggled off via input
Duration table
• Positioned at middle-right of the chart
• Shows current bars, average, and confidence intervals
• Can be toggled off via input
Inputs
The indicator has four main input groups.
CALCULATION
• Volatility Lookback (bars): defines the window used to calculate standard deviation. Default: 50.
• Annualize (√365): toggles annualization of volatility. Recommended for crypto daily charts.
• Source: selects the price series used in the calculation (default: close).
MOVING AVERAGE
• Type: chooses the MA type (SMA, EMA, WMA, RMA). Default: EMA.
• Length: sets the MA lookback period. Default: 30.
• Show Moving Average: toggles MA visibility on the chart.
VOLATILITY REGIME
• Regime Lookback (bars): defines the window used for percentile rank calculation. Default: 100.
• Low Threshold (percentile): sets the lower percentile boundary. Default: 30.
• High Threshold (percentile): sets the upper percentile boundary. Default: 70.
• Show Background Color: toggles regime coloring.
DURATION TABLE
• Show Duration Table: toggles the statistics table visibility.
• History Lookback (days): controls how many bars of history to use for average calculations. Default: 365.
Alerts
The script includes four alert conditions:
Volatility Regime Change
• Triggers on any regime transition (LOW → NEUTRAL, NEUTRAL → HIGH, etc.)
• Useful for monitoring all state changes
Low Volatility Regime
• Triggers when entering LOW regime (green background)
• Useful for breakout preparation or position size increase
Neutral Volatility Regime
• Triggers when entering NEUTRAL regime (gray background)
• Useful for identifying transition periods
High Volatility Regime
• Triggers when entering HIGH regime (red background)
• Useful for risk reduction or heightened awareness
How to Use It
This indicator is best used as a volatility filter and regime-aware positioning tool, not as a standalone entry signal.
Volatility regime filter
Use the regime colors to filter your trading approach:
• LOW regimes (green): Favor breakout strategies, increase position size
• HIGH regimes (red): Reduce position size, exercise caution (volatility can persist or reverse depending on market context)
• NEUTRAL regimes (gray): Wait for clearer signals or reduce exposure
Duration-based anticipation
Use the duration table to anticipate regime changes:
• If current bars approach upper bound: expect potential regime change soon
• If current bars are well below average: expect regime to continue
• If current bars exceed upper bound: regime is extended, watch for reversal
Trend confirmation
Use the volatility trend to confirm price action:
• Rising volatility (light red → dark red): confirms trend expansion or increased uncertainty
• Falling volatility (light green → dark green): confirms consolidation or stabilization
• Conflicting signals (gray): suggests uncertainty or transition
Practical Interpretation
Here is a simple way to read the results:
LOW regime (green)
• Price is tightly clustered around its average
• Volatility is below historical norms
• Often precedes breakout moves
• Good for trend-following entries
HIGH regime (red)
• Price is widely dispersed from its average
• Volatility is above historical norms
• Can indicate trending expansion, shock events, or panic conditions
• Reduce position size; assess whether context suggests continuation or reversion
NEUTRAL regime (gray)
• Volatility is transitioning or conflicting
• No clear regime signal
• Wait for clearer confirmation
Duration statistics
• Average: typical length of this regime type
• Lower/Upper bounds: normal range (~68% of cases)
• Current bars: where you are in the distribution
Best Use Cases
Typical uses include:
• Crypto volatility regime detection
• Position sizing based on volatility state
• Breakout vs. consolidation strategy filter
• Risk management and exposure control
• Multi-asset volatility comparison
• Regime-aware trade timing
It is especially useful when you want to objectively measure whether volatility is high or low relative to recent history, and whether the current regime is typical or extended.
Notes
The indicator is designed for daily crypto charts but works on any timeframe.
• Daily timeframe: "History Lookback (days)" represents calendar days
• Other timeframes: "History Lookback (days)" represents bars, not calendar days
The metric table is only as good as the selected lookback periods and thresholds.
• Shorter volatility lookback: more reactive but noisier
• Longer volatility lookback: smoother but may lag sudden changes
• Shorter regime lookback: faster regime detection but more whipsaws
• Longer regime lookback: more stable but slower to detect changes
• Tighter thresholds (e.g., 25/75): fewer regime changes, higher confidence
• Wider thresholds (e.g., 35/65): more regime changes, earlier detection
The Z-Score-style duration statistics are relative to the selected history window, so their meaning depends on how much data you include. Wskaźnik

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. Wskaźnik

Wskaźnik

Opening Range Gap (ORG) [TH Trader]Opening Range Gap (ORG) Zones
This indicator maps the overnight gap between the prior session's settlement (16:14 NY close) and the regular session open (09:30 NY), then divides that range into Fibonacci-style levels so you can track how price interacts with the gap throughout the day.
How it works:
Anchors are captured via a minute-by-minute walk over 1-minute data on the chart's own symbol, so both the 16:14 settlement price and the 09:30 open are always caught precisely — regardless of your chart's timeframe or Extended Hours setting
The gap range is divided into customizable levels (0/Open, 12.5%, 25%, 37.5%, 50%/CE, 62.5%, 75%, 87.5%, 100%/Close), each individually toggleable with its own color
The midpoint (CE) is highlighted separately as it often acts as a key reference for gap-fill trades
A background box shades the full gap zone, and a label shows the gap size in both points and percentage
Tracks whether each ORG has been "filled" (price has traded back to the settlement price) — fill detection uses your chart's own bars, so toggling Extended Hours changes what counts as filled
Extension styles:
Cap at day end — zone freezes at the end of each session
Cap at time of day — zone freezes at a custom cutoff time
Extend all lines right — zones extend indefinitely
Extend unfilled ORGs — filled zones are removed from the chart, keeping only unfilled gaps visible (with an option to keep the most recent ORG visible even after it fills)
How to use it:
Use the gap size label to gauge overnight volatility relative to recent history
Watch how price reacts at each Fibonacci level within the gap, especially the 50% (CE) level, for potential support/resistance or gap-fill setups
Combine with the CME Overnight Range and Anchored VWAP for additional overnight-positioning context
Works on any intraday timeframe; disabled on Daily/Weekly/Monthly charts since the concept requires intraday anchors Wskaźnik

VWAP DeltaVWAP Delta is an oscillator that plots each bar's open, high, low and close as their distance from the volume-weighted average price, instead of showing price and VWAP side by side. It's built for anyone who wants to see how far, and how consistently, price is trading away from its volume-weighted average — for example to judge how stretched an intraday move already is, or how a recent push compares to the pace of previous ones — rather than only whether price sits above or below VWAP.
The delta of each bar is measured against an EMA baseline built from the delta close, and both can optionally be smoothed with a Hull moving average before that comparison. Because VWAP accumulates from the start of each session and depends on volume, it is an intraday tool and returns na on symbols or timeframes where volume data isn't available. The indicator can display this relationship as a filled area or as its own set of candles, with colors that adapt automatically to the current bias and, in candle style, to whether momentum is currently building or fading.
Calculation
VWAP Smoothing: applies a Hull moving average to the delta series before plotting, with an adjustable length.
Baseline Length: EMA length of the baseline that the delta is compared against.
Appearance
Graphic Style: visual style for the delta series: Area or Candle.
Bull / Bear Area Color: (Area style) fill color for when the delta line is above its baseline, and for when it's below.
Bull Candle Color: (Candle style) two colors for a bullish candle body — the left one while the body is expanding versus the previous bar, the right one while it's contracting.
Bear Candle Color: (Candle style) the same pair of colors for a bearish candle body.
In Area style, the delta close is plotted as a single line against its EMA baseline, and the space between them is filled — in Bull Area Color while the delta line is above the baseline, in Bear Area Color while it's below. Only the fill is visible; the delta and baseline lines themselves stay hidden. In Candle style, the fill disappears and the delta is drawn instead as its own set of candles, built from the delta's open, high, low and close relative to VWAP; when smoothing is enabled, the high and low are clamped to the smoothed open and close, so the smoothing itself can never invert a candle's body. Each candle is colored by comparing its own delta open and close: a candle whose delta close sits above its delta open takes a bull color, any other candle — including one where open and close are exactly equal — takes a bear color; within each of those two colors, the shade further distinguishes whether the current body is larger than the previous one (expanding) or smaller (contracting). A zero line marks where price and VWAP coincide.
This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success. Use it at your own discretion and risk; past results are not indicative of future performance. Wskaźnik
