Hull ALMAHull ALMA | MisinkoMaster
The Hull ALMA (HALMA) is a low-lag, hybrid moving average engineered to solve one of technical analysis's oldest trade-offs: lag versus smoothness. Classical moving averages like the SMA or EMA suffer from heavy lag during fast trend changes, while ultra-responsive averages like the standard Hull Moving Average (HMA) are notoriously prone to overshooting and producing sharp noise during sideways consolidation.
By replacing the weighted moving average core of the classic Hull algorithm with Arnaud Legoux Moving Averages (ALMA), the Hull ALMA eliminates lag through Gaussian-weighted smoothing rather than simple linear weighting. The result is a fluid, low-latency trend line that tracks price shifts rapidly while filtering out false breakouts and market noise.
How It Works (The Core Architecture)
The indicator combines the mathematical structure of the Hull transformation with Gaussian curve filtering:
Half-Length and Full-Length Gaussian Smoothing: The algorithm calculates two baseline ALMAs—one over half the lookback period (hln_halma) and one over the full lookback period (len_halma).
Lag Reduction Transformation: Following the classic Hull formulation, the full-period ALMA is subtracted from twice the half-period ALMA (2 * ALMA_half - ALMA_full) to project price direction forward and neutralize lag.
Square-Root Gaussian Smoothing: The projected series is smoothed a final time using an ALMA calculated over the square root of the lookback period (sln_halma), producing an ultra-smooth curve without introducing phase delay.
Dual-Confirmation Trend Filter: The algorithm concurrently tracks standard HMA slope alongside HALMA slope to ensure structural alignment before confirming regime shifts.
Key Features
Gaussian-Weighted Lag Elimination: Replaces linear weighting with ALMA's Gaussian curve distribution, providing superior smoothness and reduced overshoot.
Dual-Moving-Average Confluence: Evaluates both HALMA and HMA slope agreement to confirm high-probability trend direction.
On-Chart Candle Morphing: Automatically recolors main price candles (vibrant cyan for bullish trends, vivid red for bearish trends) to maintain clear visual alignment with active indicator state.
Multi-Line Overlay: Plots both the primary HALMA curve and the complementary HMA baseline directly on your price pane for easy visualization of moving average dynamics.
Input Parameters & Optimization Guide
Source: Sets the input price series used for calculations (Default: OHLC4).
HALMA Length: Sets the baseline lookback window. A default of 70 bars balances macro trend tracking with short-term responsiveness (Default: 70).
Offset: Controls the Gaussian distribution offset within the ALMA engine. Higher values increase responsiveness to recent price changes (Default: 0.85).
Sigma: Controls the width of the Gaussian filter. Higher values sharpen the smoothing focus, while lower values broaden the window (Default: 6).
Trading Strategies & Execution
Dual-Slope Regime Shifts
Bullish Alignment: Confirmed when both the HALMA and standard HMA are sloping upward, turning price chart candles cyan.
Bearish Alignment: Confirmed when both the HALMA and standard HMA are sloping downward, turning price chart candles red.
Dynamic Support & Resistance
In established trends, the HALMA line serves as dynamic trailing support during bull moves and dynamic resistance during bear moves. Look for pullbacks toward the HALMA curve for low-risk continuation entries in the direction of the active trend state.
Disclaimer: Trading financial markets involves high risk. This technical script is designed as an informational analytical tool to support your rule-based mechanical execution system and does not constitute financial advice. Индикатор

Ticker Tag [theUltimator5]This indicator is a compact, dynamic, over-engineered... tag. It was designed to show a bunch of information about the chart at a glance rather than actually having to look at the chart for yourself.
The tag is designed to be as visually pleasing as possible ( by my standards, at least ) while providing the maximum amount of information that can be mentally absorbed with two seconds after glancing at the tag.
If you don't care about the chart information as much, you can customize it in the settings to turn it into a logo-style tag that can be horizontally and vertically adjusted relative to the chart with your own custom text.
At its center is the current ticker symbol, surrounded by directional corner brackets and accompanied by the company name, an optional company-specific tagline, the current price, daily percentage change, and a configurable five-segment strength meter.
By default, the center of the tag displays the chart's ticker symbol.
The ticker can be replaced with custom Logo Text through the indicator settings if a different abbreviation or label is preferred.
The company-name line can be independently enabled or disabled (disabled in image above)
Ticker Tag contains a large internal library of company-specific market-themed taglines. When a supported ticker is detected, an appropriate phrase is automatically displayed beneath the company name. The tagline is displayed in an italicized style to visually separate it from the company name.
Automatic taglines can be disabled independently from the company-name display, and users can enter their own 'Bottom Tagline Override', which is A custom tagline takes precedence over the automatically mapped phrase.
If no predefined tagline exists for a ticker, the indicator simply omits that line rather than inserting a generic fallback.
Above the central ticker, the indicator normally displays the current price using the symbol's native minimum tick formatting.
The price is dynamically colored according to the current day's performance:
Positive day: Positive Color (Green default)
Negative day: Negative Color (Red default)
Consolidating/low-directionality condition: White (special condition)
A custom top text can also replace the live price entirely. When custom top text is used, it uses its own configurable color rather than the market-state coloring applied to the live price.
The lower portion of the tag displays the live percentage change from the previous daily close.
The calculation is:
Current Price / Previous Daily Close − 1
and is displayed as a percentage.
The percentage is colored using the selected Positive and Negative colors so the current day's direction can be identified at a glance.
This daily calculation is performed from daily-timeframe data even when the indicator is being viewed on an intraday chart.
Four brackets frame the central ticker and act as a simple visual representation of the current day's direction.
The brackets use the Positive Color when the current price is above the previous daily close and the Negative Color when price is below it.
When a previous daily close is unavailable, the current daily open is used as the directional reference.
These brackets are separate from the strength meter and therefore provide a quick daily directional cue regardless of which signal is selected for the meter.
Below the main ticker symbol is a five-segment strength meter. This is designed to give a very quick price action indication for the current timeframe
The meter converts the selected market signal into a normalized 0–100 strength score and progressively fills from left to right.
The default color progression moves from weak to strong:
Red → Orange → Yellow → Lime → Green
Unfilled segments remain dimmed.
Each segment's color can be customized independently.
The meter is intentionally progressive. If the fourth segment is illuminated, for example, the first three segments are illuminated as well.
Selectable Strength Signals
The strength meter can be driven by any of six different calculations:
1) Combined Score
2) RSI
3) MACD
4) Bollinger Bands
5) Stochastic
6) ATR
A small letter beside the meter identifies the selected source:
C - Combined Score
R - RSI
M - MACD
B - Bollinger Bands
S - Stochastic
A - ATR
This makes it possible to change the meter's interpretation without losing track of the active calculation.
Several of the meter's underlying signals naturally operate on very different numerical scales.
To make them comparable, Ticker Tag normalizes them into a common 0–100 framework.
For unbounded signals, the indicator evaluates the signal relative to its own historical mean and standard deviation:
Normalized Score = 50 + 15 × Z-Score
The result is then constrained between 0 and 100.
Under this system:
50 represents approximately neutral or historically average behavior.
Values progressively above 50 represent increasingly strong positive conditions.
Values progressively below 50 represent increasingly weak or negative conditions.
The normalization lookback is user configurable and defaults to 252 bars (1-year in daily timeframe)
Because this strength meter operates on the current chart timeframe, changing the chart timeframe also changes the context being measured.
The default meter mode is Combined Score.
The combined score combines five different measurements into an equal-weighted composite:
1) RSI - A standard 14-period Relative Strength Index is calculated and then statistically normalized relative to its own history.
2) MACD - The difference between the standard MACD line and signal line using : 12 / 26 / 9 settings is normalized relative to its historical distribution.
3) Bollinger Bands - A 20-period Bollinger Band with a two-standard-deviation envelope is used to determine where price sits within the band structure. That position is then normalized relative to its historical behavior.
4) Stochastic - A 14-period Stochastic calculation with a three-period smoothing component contributes a direct 0–100 momentum measurement.
5) ATR Directional Volatility - ATR is combined with directional movement information rather than being treated as pure volatility alone.
The indicator considers the difference between +DI and −DI and scales it according to the instrument's ATR as a percentage of price relative to its historical ATR behavior. This produces a directional-volatility measurement intended to distinguish volatility associated with bullish directional pressure from volatility associated with bearish directional pressure.
The five normalized components are then equally weighted
The result drives the five-segment meter.
The Combined Score is intended to provide a broader view of current market strength than any single momentum calculation alone.
Consolidation Detection
Ticker Tag can also visually identify periods where directional trend strength becomes weak.
When white/Bold Price on Low ADX is enabled (on by default), the live price changes to bold white text when the indicator's consolidation criteria are satisfied.
The condition evaluates multiple conditions that all need to result in true:
1) ADX below the user-defined low threshold
2) +DI below 25
3) −DI below 25
4) relatively little separation between the directional components
This state is intended to visually distinguish low-directionality or consolidating conditions from ordinary bullish and bearish price movement.
It affects only the default live-price display. If custom Top Text is entered, that text retains its selected custom color.
Positioning
Ticker Tag is positioned beyond the most recent chart bar rather than directly on top of historical candles. The horizontal position begins one bar beyond the last chart bar and then applies the user-defined **Offset from Right Edge**.
The default horizontal offset is 30 bars.
Vertical positioning is volatility aware.
Instead of using a fixed percentage of price, the vertical offset is measured in multiples of ATR:
Tag Position = Current Price + Vertical Offset × ATR
A value of:
0 positions the tag near current price.
A positive value moves it above current price.
A negative value moves it below current price.
Because the offset scales with ATR, its placement adapts more naturally across instruments with very different prices and volatility characteristics.
The ATR length used for positioning is independently configurable.
In summary (if you read this far), the Ticker Tag is a compact, dynamic, over-engineered... tag. Индикатор

Smart Money Structure & Dynamic Equilibrium Suite [ICT Pro]Smart Money Structure & Dynamic Equilibrium Suite
Overview & Purpose
Smart Money Structure & Dynamic Equilibrium Suite is an advanced, high-precision technical analysis visual tool engineered for Pine Script v6. Designed specifically for modern Price Action, Smart Money Concepts (SMC), and Inner Circle Trader (ICT) analysts, this script provides clean visual overlays for key liquidity boundaries, trend momentum, and range midpoints without cluttering chart aesthetics.
Instead of displaying unnecessary lines or repainting historical indicators, this suite focuses purely on real-time structural clarity, dynamic range evaluation, and institutional volume tracking.
Key Features & Technical Components
1. Auto-Swept Previous Day High & Low (PDH / PDL)
- Institutional Liquidity Levels: Automatically tracks and plots the Previous Day High (PDH) and Previous Day Low (PDL) as horizontal daily boundaries.
- Dynamic Disappear / Swept Logic: Once price crosses or sweeps a daily liquidity level during an active trading session, the swept level automatically vanishes from the chart. This ensures your view remains clean and focused only on active, unmitigated daily liquidity targets.
- Full Visual Customization: Adjust line colors, text colors, line thickness, and stroke style (Solid, Dashed, or Dotted) directly from the inputs menu.
2. Connected Dynamic Equilibrium Range
- 50% Midpoint Calculation: Continuously calculates the real-time 50% Equilibrium price zone based on customizable local swing lookback periods.
- Connected Line Extension: Features an extended horizontal line that connects seamlessly to the "EQUILIBRIUM" text label on the right margin, eliminating visual gaps or confusion about range boundaries.
3. Smart Volume Spike & Trend Candle Glow Engine
- Directional Candle Glow: Color-codes chart candles based on dual Moving Average alignments—Neon Green during bullish momentum and Neon Red during bearish momentum.
- Golden Volume Spike Highlighting: Dynamically overlays high-volume institutional candles in a distinct Glowing Gold color whenever current bar volume exceeds customizable moving average multipliers. This makes it effortless to spot institutional expansion bars.
4. Major Intermediate Term Swing Badges (ITH / ITL)
- Structural Pivot Badges: Automatically flags confirmed major high and low points using clear ITH (Intermediate Term High) and ITL (Intermediate Term Low) badges.
- Customizable Sensitivity: Adjust the pivot lookback sensitivity to tailor the detector for scalp, intraday, or higher-timeframe swing trading.
Full Inputs & Parameter Configuration Guide
1. Moving Average & Ribbon Controls
- Show MAs: Enables or disables the visibility of the two core Moving Averages on the chart.
- MA Type: Choose between EMA (Exponential), SMA (Simple), or WMA (Weighted) calculation methods.
- Fast MA Length: Defines the lookback period for the fast directional moving average (Default: 9).
- Slow MA Length: Defines the lookback period for the baseline moving average (Default: 21).
- MA Line Thickness: Adjusts stroke width for both moving averages (1 to 4 pixels).
- Show MA Ribbon Glow: Toggles the background color fill between the Fast and Slow MAs on or off.
2. Smart Candle Glow Settings
- Enable Trend Candle Coloring: Toggles custom candle coloring based on MA trend direction.
- Highlight Volume Spikes: Turns on or off the special Golden Candle overlay for high-volume bars.
- Volume Spike Threshold: Set the volume multiplier relative to the 20-period volume average (Default: 1.8x).
3. Equilibrium Settings
- Show Equilibrium Level: Turns the 50% range midpoint line on or off.
- Equilibrium Lookback Period: Sets the number of historical bars evaluated to compute the local range midpoint.
- Line Style & Thickness: Customize whether the line appears Solid, Dashed, or Dotted, as well as its thickness and color.
4. Daily Liquidity Settings (PDH / PDL)
- Show PDH & PDL: Toggles display of Previous Day High and Low levels.
- PDH/PDL Line Style & Thickness: Select custom visual preferences for daily boundaries.
- Color Pickers: Separate line and text color options for both High and Low daily levels.
Step-by-Step Guide: How to Use This Tool Effectively
Step 1: Determine Structural Bias
Use the Trend Ribbon Cloud and candle coloring to establish current market bias. Green candles and ribbons indicate bullish control, while Red candles signify bearish dominance.
Step 2: Monitor Daily Liquidity Targets
Observe active PDH and PDL lines as primary liquidity pools. When a line disappears from your chart, it confirms that liquidity at that level has been swept by price.
Step 3: Evaluate Value Zones
Refer to the Equilibrium step-line to determine whether current price trades above 50% (Premium territory) or below 50% (Discount territory) relative to recent market swings.
Step 4: Identify Institutional Volume Expansion
Pay close attention to Glowing Gold candles. Volume spikes often coincide with smart money entries, order block mitigations, or explosive range breakouts.
Trading Disclaimer & Risk Warning (House Rules Compliance)
Educational Disclaimer:
This script is strictly a visual analysis and charting utility designed for technical educational purposes. It does NOT offer financial advice, trade signals, investment recommendations, or automated buy/sell algorithms.
Risk Acknowledgment:
Financial trading carries inherent risk, and historical market behavior depicted by visual indicators does not guarantee future results. Users are fully responsible for their own trading decisions and risk management strategies. Индикатор

DUAL Relative Strength Index (Settings: 14 14 28)RSI with Dual Smoothing MA
A modified version of TradingView's built-in RSI indicator with a second RSI-based moving average added.
The standard RSI includes a single smoothing MA. This version adds a second, fully independent one — so you can run a fast MA alongside a slow MA and compare the RSI's short-term movement against its longer-term trend in the same pane.
Features
Two separate RSI-based MAs, each with its own type and length (SMA, EMA, SMMA/RMA, WMA, VWMA)
Independent color selection for each line
Either MA can be switched off entirely by setting its type to "None"
Optional Bollinger Bands on the first MA (as in the original)
Regular bullish/bearish divergence detection and alerts (as in the original)
Settings
RSI Settings: RSI length, source, divergence calculation
Smoothing: first MA — defaults to 14 SMA, yellow
Smoothing 2: second MA — defaults to 28 SMA, orange
Ways to use it
The fast MA crossing above the slow MA can be read as strengthening momentum; crossing below, as weakening
Both MAs sitting on the same side of the 50 level can serve as directional confirmation
The distance between the two lines gives a sense of how quickly momentum is shifting
This indicator does not generate standalone buy or sell signals. It is intended as a confirmation tool within your own system, and settings should be tested against the symbol and timeframe you trade.
Based on TradingView's open-source built-in "Relative Strength Index" indicator.
İngilizce:
Ways to use it
The fast MA crossing above the slow MA can be read as strengthening momentum; crossing below, as weakening
Crossovers that occur in the extreme zones (below 30 / above 70) tend to be more meaningful than those in the middle range (roughly 40–60), where the RSI often moves sideways and the MAs cross back and forth, producing noise
Both MAs sitting on the same side of the 50 level can serve as directional confirmation
The distance between the two lines gives a sense of how quickly momentum is shifting Индикатор

EMA Reversal Squeeze K8EEMA Reversal Squeeze K8E
The EMA Reversal Squeeze K8E is designed to identify potential momentum reversals by detecting a specific sequence of EMA compression and directional flipping.
Works on lower time frames only
The indicator monitors the 9 EMA, 20 EMA, and 50 EMA internally and looks for situations where the three averages come tightly together before reversing their order.
How LONG signals work
A LONG setup begins when:
EMA 9 < EMA 20 < EMA 50
All three EMAs are within 1 point of each other
The EMAs compress further to within 0.5 points
The EMA structure then flips to EMA 9 > EMA 20 > EMA 50
The final flip occurs while the EMAs remain within 1 point
The indicator then prints a LONG signal on the first qualifying candle.
How SHORT signals work
A SHORT setup is the exact opposite:
EMA 9 > EMA 20 > EMA 50
All three EMAs are within 1 point
The EMAs compress to within 0.5 points
The EMA structure flips to EMA 9 < EMA 20 < EMA 50
The final flip occurs while the EMAs remain within 1 point
The indicator then prints a SHORT signal on the first qualifying candle.
Why the squeeze matters
The idea behind the setup is that when the 9, 20, and 50 EMAs become extremely compressed, the market is showing a period of reduced separation between short-, medium-, and longer-term momentum.
When that compression is followed by a complete EMA order reversal, it can indicate that momentum is transitioning to the opposite direction.
The EMA lines are intentionally hidden from the chart so the indicator provides clean LONG and SHORT signals without clutter.
Note: This indicator is a technical analysis tool and should not be considered financial advice. Signals should be evaluated alongside price action, market structure, volatility, session levels, and your own risk-management rules. Индикатор

EMA + VWAP + Sessions + ORB v2EMA + VWAP + Sessions + ORB
An all-in-one intraday toolkit combining trend, mean-reversion, session-timing, and opening-range tools in a single overlay — every element independently customizable.
📈 Triple EMA
Three fully independent EMAs, each with its own length, color, visibility toggle, and line style (Solid / Dashed / Dotted). Defaults: 9 (red) / 21 (white) / 50 (blue).
⚖️ VWAP
Session-anchored VWAP with adjustable color, line width, and style (Solid / Dashed / Dotted). Default: yellow.
🎨 Adjustable Dash/Dot Spacing
Dashed and Dotted styles use a custom-built rendering method so they show exactly as much chart history as Solid lines — no artificial history limit. Dash length, dash gap, and dot gap are all independently tunable to match your timeframe.
🌍 Session Overlay
Highlights the London, New York, Tokyo, and Sydney sessions directly on the chart. Each session has its own show/hide toggle, editable time window, and color. Choose between full background shading or a band that hugs just the session's high/low range — useful for spotting session overlaps and volatility windows at a glance.
🎯 Opening Range Breakout (ORB)
Define any custom time window (not locked to fixed 5/15/30-min presets) and the script plots the resulting opening range as a shaded box with extending high, low, and halfway (50%) lines. Includes:
Optional breakout and retest signals, with failed-retest detection
Previous-day range visibility
Built-in alert conditions for both simple level crosses and confirmed breakouts
🎯 ORB-Based Take-Profit Levels
Six auto-calculated TP lines — TP1/TP2/TP3 for both long and short scenarios — measured as configurable multiples of the ORB range, projected from the ORB midpoint. Default multiples are 1x / 2x / 3x, each independently adjustable, so you can size targets to your own risk model.
Fully customizable colors and toggles across every component — EMAs, VWAP, all four sessions, and every ORB element — so the indicator can be tuned to match any chart theme or trading style. Индикатор

Индикатор

Индикатор

THE 4TH DESKWatermark + ATR + 4 EMA
A three-in-one overlay indicator combining a chart watermark, an ATR-based stop-loss reference, and a four-line EMA ribbon — each independently configurable and toggleable.
Watermark
Displays the current symbol, exchange prefix, timeframe, and (optionally) percentage change in a customizable table anchored to any corner or edge of the chart. Includes an editable signature/branding field, adjustable text sizes, and a custom color with transparency support.
ATR Value Table
Calculates Average True Range (length and smoothing method both configurable — RMA, SMA, EMA, or WMA) multiplied by a user-defined multiplier, useful for setting stop-loss distances. Shown in its own bordered table, positioned and styled independently from the watermark.
4 EMA Ribbon
Plots four exponential moving averages (default periods: 13, 34, 55, 200) on the price chart, each with its own configurable length and color — useful for trend identification and dynamic support/resistance.
All three components have their own input group in the settings panel (Watermark / ATR / 4 EMA), so you can enable, disable, or restyle each piece independently without affecting the others.
Индикатор

Dynamic Oscillator (RSI, MACD, Stoch, Stoch RSI)Description:
This indicator combines four of the most widely used momentum and trend oscillators—RSI, MACD, Stochastic RSI, and Stochastic—into a single, unified pane.
Originality and Usefulness:
The primary issue with combining multiple bounded (0-100) and unbounded (MACD) oscillators into a single pane is overlapping, which creates an unreadable chart. This script solves that problem by introducing a Dynamic Auto-Scaling and Stacking Algorithm.
Instead of rendering all indicators on the same axis, the script dynamically assigns a visual 100-point tier (base level) to each activated indicator. If an indicator is toggled off in the settings, the script automatically recalculates the bases and shifts the remaining active indicators down to fill the void (auto-scale). This ensures a clean, non-overlapping visualization that saves valuable chart space, especially for users who rely on multiple momentum confirmations.
To achieve this, the script utilizes invisible base plots and custom helper functions drawing extended dashed lines (line.new with extend.both) to act as smart visual separators that adapt dynamically based on how many indicators are currently active.
Underlying Concepts & How It Does It:
1. MACD Normalization (Unbounded to Bounded):
Since the MACD does not have a fixed upper or lower bound, directly overlaying it with bounded oscillators is impossible without distortion. This script uses a mathematical workaround: it calculates the highest absolute value among the MACD line, Signal line, and Histogram over a 100-bar lookback window using ta.highest(). It then generates a proportional scaling factor to compress the MACD data precisely into a 100-point visual zone. The visual crosses, trend direction, and histogram shapes remain mathematically accurate to a traditional MACD, but scaled to fit the stacking environment.
2. Relative Strength Index (RSI) & Divergence:
The script includes a standard RSI (default 14-period). It is equipped with an automated Regular Divergence detection system. The logic uses ta.pivotlow and ta.pivothigh with customizable lookback windows (left and right) to identify price extremes compared to RSI extremes. Furthermore, users can enable a moving average smoothing line directly applied to the RSI calculation (SMA, EMA, WMA, VWMA, or Bollinger Bands).
3. Stochastic & Stochastic RSI:
The script calculates the traditional Stochastic Oscillator (%K and %D) using the standard ta.stoch() function based on Close, High, and Low. Additionally, it provides the Stochastic RSI, applying the Stochastic formula directly to the RSI values rather than price data, increasing sensitivity for identifying short-term overbought/oversold conditions.
How to Use It:
● Toggle System: Open the indicator settings and use the checkboxes to turn specific oscillators ON or OFF. The layout will adapt automatically.
● Confluence Trading: Use this stacked view to spot confluences. For example, spotting a Regular Bullish Divergence on the RSI occurring simultaneously with a MACD zero-line cross and a Stochastic %K/%D crossover in the oversold zone.
● Clean Visualization: The indicator uses custom transparent boundaries and dashed separator lines to keep your workspace structured.
(Note: This script is published for educational purposes to demonstrate dynamic vertical scaling of mixed-bound arrays).
Disclaimer:
This script is strictly an analytical tool for educational and informational purposes only. It does not constitute financial advice, nor is it an invitation, solicitation, or recommendation to buy or sell any financial instrument. The developer of this indicator assumes no responsibility or liability for any trading decisions, financial losses, or actions you take based on this tool. Trading in financial markets involves a high degree of risk, and all trading decisions are entirely in your own hands. Past performance of any trading system is not indicative of future results. Always Do Your Own Research (DYOR) and test strategies on a paper trading account before risking real capital. Индикатор

TRADLEWARE-DCA+Trend ETF
DCA + Trend: Monthly Contributions with a Bear-Market Exit and Dip-Ladder Re-entry
This strategy treats "putting money in every month" and "managing the pile of money already invested" as two separate jobs. A fixed monthly contribution never stops, even in a bear market — but the accumulated stack gets pulled out entirely when the long-term trend breaks, and put back to work gradually as the market recovers rather than all at once.
The target here is beating plain monthly dollar-cost averaging, not simple buy-and-hold. On broad-market ETFs, which tend to trend upward over long horizons, DCA already captures much of the benefit of buying dips just by staying systematic — a real bar to clear, not a strawman. It's also the one this strategy has consistently cleared across every asset tested so far (see Known limitations for where it falls short of buy-and-hold's raw return instead).
How it works
Every calendar month, a fixed dollar amount is invested, regardless of what the trend is doing — this means fixed dollars buy more shares exactly when the market is cheap, which is the whole point of dollar-cost averaging. Separately, a 200-day SMA acts as a trend filter for the accumulated position: when price closes below it, the entire stack built up so far is sold. When the trend recovers, that money doesn't necessarily go back in all at once — instead it can be split into tranches that buy in stages as price falls further below its prior peak during the bear market, so more of the recovery budget lands at genuinely lower prices instead of guessing the exact bottom.
Entry
Three separate mechanisms add to the position:
Monthly DCA: on the first bar of every calendar month, a fixed dollar amount is invested — by default, this keeps happening even during a bear market (can be turned off to pause contributions below the trend line instead)
Dip-ladder tranches: after a bear-market exit, the re-entry budget is split equally across up to three pieces, regardless of how deep each one triggers — each buys when price falls a further fixed percentage below the running all-time high (15%, 20%, and 30% below, by default) — this uses the all-time high as the reference level specifically because, unlike the moving average, it does not sink during the bear market
Lump sum recovery: any part of the re-entry budget that wasn't already spent by the dip-ladder tranches is deployed in one shot on the first bar the trend recovers
Exit
The entire accumulated position (not the monthly contributions still to come) is sold in full the moment price closes below the 200-day SMA — a trend-broken event, not something that unwinds gradually. An optional "death cross" confirmation (50-day SMA also below the 200-day SMA) can be required before treating a dip as a genuine bear market, which reduces false exits during brief pullbacks.
Parameters
SMA period: 200 days (the trend filter for the exit)
SMA hysteresis band: a dead zone around the SMA, on by default. The regime only flips bullish above SMA×(1+band) or bearish below SMA×(1-band); price sitting between those two lines just holds whatever state it was already in. This filters out marginal SMA crossings that would otherwise trigger an exit and re-entry over a move that never became a real trend break — most such round trips re-buy at close to the same price they sold at, paying costs without capturing anything. Set to 0 to require only a plain SMA cross.
Monthly DCA amount: fixed dollar amount invested on the first bar of each month
Lump re-entry percentage: how much of the value that was sold at the exit gets redeployed on recovery (0 = skip lump entirely and resume monthly DCA only; higher = more of the recovery captured, at the cost of more drawdown if the recovery turns out to be a false one)
Death cross confirmation: off by default; when enabled, requires the 50-day SMA below the 200-day SMA before treating the market as unsafe
DCA during bear regime: on by default; contributions keep buying through the bear market instead of pausing
Dip-ladder toggle and three rung levels (percentage below the running high): default 15%, 20%, 30% below; any rung can be set to 0 to disable it
Whole-share DCA: off by default. A fractional monthly quantity (contribution amount smaller than one share) rounds down to zero on most equity brokers and never fills or fires an alert. Turning this on banks any unspent contribution and carries it to the next month, firing a whole-share order once enough has accumulated
Label offset: how far the buy/sell trade labels sit from the bar, in multiples of ATR(14)
Chart labels
Every fill is marked directly on the chart: a green label below the bar for each buy (tagging which mechanism fired — DCA, LUMP, or RUNG 1/2/3, combined if more than one lands on the same bar) and a red label above the bar for each exit (CRASH EXIT or PERIOD END), showing the blended profit/loss across everything that closed on that bar. Since one crash exit can unwind dozens of separate monthly contributions and dip-ladder buys at once, the P&L shown is the combined result of all of them, not just one trade. Both label types also show the cash left in the account after that fill — useful for keeping an eye on how close the pool is to running dry, since TradingView blocks an order it can't cover and DCA/lump/rung buys stall until the next sale refills it.
Costs modelled
0% commission (typical for US equity brokers), 1 tick slippage, fills at next bar's open.
Intended assets and timeframe
Daily bars, US equity ETFs. Built and tested on MGK specifically, using the settings published as its defaults (death-cross confirmation off, rungs at 15/20/30% below the running high) — that combination is the only one checked end-to-end against a live TradingView run. Seven other broad-market, growth, value, equal-weight, and momentum funds — QQQ, VOO, IVW, IVE, RSP, SPYM, and SPMO — were also tested, each with its own settings rather than MGK's defaults left unchanged, and are very likely to beat plain monthly DCA too: that pattern held without exception on every asset checked so far. Their validated combination is different from what's published here — death-cross confirmation on and wider rungs at 20/30/40% — which is the better starting point if you switch tickers, with QQQ as the one exception even to that (see Known limitations): it pairs better with death-cross confirmation off and the hysteresis band set to 2% instead. Parameter choices matter more than they might look — death-cross on/off, the lump percentage, and the rung spacing have each swung the outcome by a wide margin in testing — so tuning for whichever asset and regime you're actually using, rather than leaving the MGK-tuned defaults unchanged, is worth the effort.
Known limitations
The exit reacts at the next bar's open after the trend breaks, so it lags fast crashes rather than anticipating them. In a slow, grinding bear market, the dip ladder's fixed rungs can all fire and the market can keep falling anyway, leaving a larger paper loss than the version without a ladder — the extra return the ladder aims to capture on recovery is paid for with real, and sometimes severe, worst-case pain during a prolonged decline. Size the lump and rung percentages to a drawdown you could actually hold through, not just a comfortable one. Bear-market DCA contributions can sit on paper losses for a long time before a recovery arrives. Switching to one of the other seven validated funds calls for different settings than the published MGK defaults — see Intended assets and timeframe above. QQQ specifically pairs better with the death-cross confirmation off and the hysteresis band at 2% rather than either of the other two combinations. For VOO, turning death-cross confirmation on is a genuine trade-off rather than a clear-cut fix: it gives a smaller drawdown and better Calmar ratio at the cost of slightly lower return and Sharpe. TradingView's own chart price does not include dividends, so a live TradingView backtest will differ somewhat from a dividend-adjusted one, though trade dates should still match. Over the published defaults' validated window, trade count sits below the sample size usually wanted for stable statistics — treat this as a directional result to build on, not a confirmed edge, until it's been checked over a longer window or across more of the validated assets.
If you already hold a lump-sum position and plan to add ongoing contributions on top of it, don't feed the lump into this strategy's own trading — a crash exit sells everything it holds at once, lump included, and testing found that dragged results down noticeably compared to keeping an existing lump in a separate buy-and-hold position and only running new contributions through this strategy. Even limited to just the ongoing contributions, though, this strategy's trading is not guaranteed to beat simply holding those same contributions — in the scenarios tested so far, plain buy-and-hold of the contributions matched or outperformed running them through the strategy's exit/re-entry logic. Treat this as a tool for managing how an existing trend-following thesis gets traded, not as a proven improvement over doing nothing.
Стратегия

MYND Adaptive Parameter Optimizer v1.0MYND Adaptive Parameter Optimizer
A genuine walk-forward self-tuning engine - it doesn't just use a moving average or RSI length you picked once, it periodically re-tests a range of lengths against recent history and adopts whichever one actually worked best.
WHAT IT DOES
Every N bars (your Recalibration Interval), this indicator tests a range of candidate lengths for either a Moving Average Crossover engine or an RSI Mean-Reversion engine against a bounded recent evaluation window, scores each candidate by how well its historical signal events actually predicted the next move, and adopts whichever length scored best - until the next recalibration. This is real walk-forward re-optimization built into the indicator itself, not a single fixed parameter you set once and hope keeps working.
HOW IT WORKS
Choose one mode per instance: Moving Average Crossover (favors trending behavior) or RSI Mean-Reversion (favors range-bound behavior) - add a second copy of the tool if you want both running side by side. The candidate search only runs periodically, never every bar, and uses efficient techniques (a prefix-sum trick for MA mode, one linear pass per candidate for RSI mode) to stay cheap even while testing up to 25 candidate lengths at once. Once a length is adopted, live plotting and signals use one simple, standard call every bar until the next recalibration.
Beyond the in-sample fitness score each recalibration produces, this tool also grades its own LIVE signals out-of-sample - a genuinely honest check on whether the adopted length is actually working going forward, not just how it looked during the search that chose it.
KEY FEATURES
A live dashboard showing the currently adopted length, the in-sample fitness score and event count from the last recalibration, a rolling out-of-sample Live Signal Accuracy stat, and time until the next recalibration attempt. A dedicated alert the moment the adopted length actually changes. An optional volume-confirmation gate on signals. Light/Dark theme presets plus a colorblind-safe signal color option. Full customization throughout, with tooltips on every setting that benefits from one.
IMPORTANT - this tool always renders in a separate lower pane, in both modes. Pine's overlay setting is fixed at compile time and can't switch between "on the price chart" and "separate pane" based on a runtime mode selection - so rather than a hack, Moving Average mode plots the adaptive MA's %-distance from price (oscillating around a zero line) instead of overlaying the MA line directly on price. RSI mode plots the adaptive RSI itself (0-100). Both modes signal off the same real underlying cross events either way.
HOW TO USE IT
Works out of the box with sensible defaults. Expect a genuine warm-up period after first adding it to a chart - the optimizer needs a meaningful amount of history before its first real recalibration can run, and uses Candidate Length - Min as a placeholder until then. Watch the Adopted Length on the dashboard over time to see how the tool responds to changing market character, and compare the in-sample fitness score against the out-of-sample Live Signal Accuracy for an honest read on whether it's actually working right now.
SETTINGS WORTH TUNING FIRST
Recalibration Interval and Evaluation Window - lengthen either for steadier, less frequent length changes; shorten for faster adaptation. Candidate Length - Min/Max/Step - defines the search range; note the number of tested candidates is capped at 25 for compute-cost reasons. Minimum Events for Valid Score - raise it to require more statistical support before a candidate can win.
ALERTS
The 4 standard alerts (Bullish/Bearish Signal, Live Accuracy Warning, and the ALL Signals combo) use TradingView's normal alertcondition() system. The Adopted Length Changed alert is different - it uses Pine's dynamic alert() function since it announces a changing numeric value, so set it up with Condition -> this script -> "Any alert() function call" rather than a named condition.
This tool can only tell you what would have worked recently on this symbol/timeframe - it is not a guarantee of what will keep working, which is exactly why the out-of-sample Live Signal Accuracy stat exists as a separate, honest check. This tool is provided for informational and educational purposes and does not constitute financial advice. Trading involves risk; past performance and historical patterns do not guarantee future results. Индикатор

Momentum Bands | BreakoutThis strategy hunts for N-bar breakouts confirmed by volume expansion — but instead of trading every breakout blindly (like a standard Opening Range or Donchian breakout), it runs price through a trend filter and an RSI momentum check first. Breakouts that align with the EMA trend and show accelerating RSI get traded as genuine continuation moves. Breakouts that fire against the prevailing trend, with RSI already rolling over, get treated as exhaustion — and faded instead of chased. Built-in ATR-based position sizing and a trailing stop round it out into a complete, risk-managed system rather than just a signal generator.
Key Features
Trend-gated entries — EMA fast/slow cross defines regime; longs only trade with the trend, fades only trade against it
Volume-confirmed breakouts — requires expansion above the rolling volume average, not just a price poke
RSI momentum-exhaustion filter — distinguishes accelerating momentum (real breakout) from divergence (fakeout)
ATR-based risk sizing — position size auto-scales to a fixed % of equity risked, using ATR-derived stop distance
ATR trailing stop — lets winners run instead of capping them at a fixed target
Glowing ATR bands — layered, fading visual bands around trend basis for at-a-glance regime read
Breakout candle highlighting — candles color-shift on signal and while a position is open
Live + archived trailing-stop path — see the stop while a trade is open, and its full trail once closed
How It Works
Price breaks above the highest high of the last N bars with volume above its rolling average — that's the breakout trigger.
EMA fast vs. slow defines trend direction.
RSI and its rate of change are checked at the breakout bar: still climbing and near its own recent peak = momentum confirms. Already fading or below its recent peak = momentum diverges.
Confirmed + with-trend → long. Diverging + against-trend → short (fade).
Every entry is sized off account risk %, not a fixed share count, and exits on an ATR stop plus ATR trailing stop.
Tips
Backtest across multiple symbols and volatility regimes before trusting the defaults — breakout/fade systems behave very differently in trending vs. choppy markets
Widen nLen (breakout lookback) on lower timeframes to reduce noise-driven false breakouts
If fades are underperforming, try disabling allowShorts and running long-only to isolate performance
Tighten rsiConfirmLvl for higher-conviction (fewer, cleaner) long signals
Use the glowing bands as a quick visual regime check even when not actively watching signals
Стратегия

Kinetic MTF Trend & Structure RibbonsKinetic Trend & Structure Ribbons is a multi-layer trend framework designed to make market structure visible across multiple time horizons on a single chart.
Instead of treating moving averages as isolated crossover signals, Kinetic organizes them into a visual hierarchy: Execution → Trend → Structure → Long-Term Regime
The goal is simple: quickly identify whether price is trending, pulling back, compressing, transitioning, or undergoing a deeper structural change.
The framework is primarily designed around stocks and swing trading , while retaining enough short-term information to assist with lower-timeframe execution.
Core Concept
Markets operate across multiple time horizons simultaneously.
A short-term selloff can occur inside a strong intermediate uptrend. An intermediate downtrend can occur while long-term structure remains bullish. Likewise, a short-term breakout means much more when the larger structural layers are aligned behind it.
Kinetic separates these horizons visually rather than compressing everything into a single bullish/bearish signal.
The framework is designed to answer four questions:
1. What is price doing right now?
2. What direction is the active trend?
3. Where is deeper market structure?
4. What is the long-term regime?
The relationship between these layers is often more important than any individual moving average.
Visual Hierarchy
1. Execution Ribbon
The fastest group of averages follows price closely and represents short-term market behavior.
Use it to observe:
*Short-term momentum
* Expansion and contraction
* Trend rotation
* Pullbacks
* Reclaims
* Early changes in direction
When the ribbon is tightly compressed, the market may be entering equilibrium.
When it expands cleanly in one direction, short-term trend strength is increasing.
2. Gaussian Trend Line
The Gaussian filter acts as a smooth trend spine between short-term price action and the broader structural ribbons.
Its purpose is to reduce short-term noise while remaining responsive enough to identify meaningful changes in direction.
Watch for:
* Price reclaiming or losing the Gaussian
* Changes in Gaussian slope
* Interaction between the Gaussian and execution ribbon
* Compression between the Gaussian and larger trend structure
The Gaussian should be interpreted in context rather than as a standalone buy or sell signal.
3. Blue Trend Ribbon
The blue ribbon represents the primary trend layer.
This is the area where normal pullbacks within an established trend can often be distinguished from more meaningful structural deterioration.
Key characteristics include:
* Rising + expanding: strengthening bullish trend
* Falling + expanding: strengthening bearish trend
* Flattening: trend momentum is weakening
* Compressing: equilibrium or transition
* Price repeatedly respecting the ribbon: established trend behavior
The location of the execution layer and Gaussian relative to the blue ribbon provides additional context.
4. Gold Structure Ribbon
The gold ribbon represents slower, deeper market structure.
Because this layer reacts more slowly than the blue trend ribbon, interaction with gold generally represents a more significant event than an ordinary short-term pullback.
The gold ribbon can help distinguish between:
* Routine trend retracement
* Intermediate correction
* Structural reset
* Major trend transition
A market can lose its short-term trend while its deeper structure remains intact.
This distinction is one of the central ideas behind Kinetic.
5. Red Long-Term Regime
The red layer represents the slowest structural reference within the framework.
It is intended to provide long-term regime context rather than short-term entries.
Think of the hierarchy as:
Fast price behavior
↓
Execution
↓
Gaussian
↓
Blue Trend
↓
Gold Structure
↓
Red Long-Term Regime
As price penetrates progressively deeper layers, the significance of the move generally increases.
Reading the Framework
Bullish Alignment
The cleanest bullish environments occur when the layers become progressively ordered beneath price.
Typical characteristics:
* Price above the execution ribbon
* Execution ribbon expanding upward
* Gaussian rising
* Blue trend ribbon rising
* Gold structure ribbon rising
* Faster layers positioned above slower layers
This creates a visual hierarchy in which shorter-term momentum is supported by progressively deeper structure.
Bearish Alignment
The opposite configuration represents bearish alignment.
Typical characteristics:
* Price below the execution ribbon
* Execution ribbon expanding downward
* Gaussian falling
* Blue trend ribbon declining
* Gold structure deteriorating
* Faster layers positioned beneath slower layers
The more completely the hierarchy becomes inverted, the more significant the bearish regime.
Compression → Expansion
One of the most important concepts in Kinetic is compression and expansion.
During compression, multiple layers begin moving closer together. Trend separation decreases and the market approaches equilibrium.
Compression itself does not predict direction.
Instead, it identifies an environment where the existing trend structure has weakened and a new directional move may eventually develop.
The subsequent expansion provides the directional information.
Compression
Look for:
* Narrowing ribbons
* Flattening slopes
* Gaussian convergence
* Price repeatedly crossing the same structural area
* Reduced separation between fast and slow layers
Expansion
Look for:
* Ribbon separation increasing
* Consistent slope developing
* Price holding one side of the framework
* Faster layers leading slower layers
* Structural ordering becoming increasingly clean
Compression represents potential energy. Expansion reveals direction.
Pullbacks vs. Structural Breaks
Not every decline is bearish.
This framework was specifically designed to preserve the distinction between short-term weakness and long-term structural weakness.
For example, price may:
1. Lose the execution ribbon while remaining above blue.
2. Enter the blue trend ribbon while gold remains intact.
3. Lose blue and test deeper gold structure.
4. Lose both trend and structure and begin approaching the long-term regime layer.
These events should not be treated as equivalent.
The deeper price moves through the hierarchy, the more meaningful the structural deterioration becomes.
The same concept applies in reverse during recovery from a bearish regime.
Trend Transitions
Markets rarely move instantly from fully bullish to fully bearish structure.
Transitions frequently occur progressively:
Expansion → Deceleration → Compression → Rotation → Reordering → Expansion
Kinetic is designed to make this process visible.
Rather than attempting to predict every turning point, the framework allows the trader to observe the market reorganizing itself across multiple time horizons.
Practical Use
Kinetic is best used as a context and structure framework, not as a mechanical buy/sell system.
Potential applications include:
* Trend identification
* Swing-trade filtering
* Pullback evaluation
* Structural support/resistance
* Compression identification
* Breakout context
* Trend continuation
* Regime identification
* Multi-timeframe alignment
* Risk management context
A trader may combine the framework with independent tools such as price action, volume, relative strength, volume profile, or anchored VWAP depending on their methodology.
These external tools are not required for the framework itself.
Signals
Where enabled, Kinetic includes visual signals designed to highlight changes within the faster components of the framework.
Signals should not be interpreted as automatic entries or exits.
Their significance depends heavily on surrounding structure.
For example, a bullish short-term signal occurring above rising blue and gold ribbons represents a very different environment from the same signal occurring beneath declining structural layers.
Context comes first. Signal comes second.
Timeframe Philosophy
Kinetic uses multiple structural horizons so that a lower-timeframe chart can retain awareness of the larger trend.
This makes it particularly useful for traders who execute on shorter charts while making decisions based on higher-timeframe structure.
The objective is not to make every timeframe look identical.
It is to maintain a consistent structural framework while allowing price behavior to be examined at different levels of detail.
What Kinetic Is — and Isn’t
Kinetic is designed to visualize trend architecture.
It is not intended to:
* Predict exact tops or bottoms
* Generate guaranteed trade entries
* Replace risk management
* Eliminate false breakouts
* Function as a standalone trading strategy
The framework organizes information that already exists in price into a more intuitive structural hierarchy.
Its value comes from interpreting the relationships, slopes, ordering, compression, and expansion of those layers.
Quick Reference
Execution Ribbon → Short-term behavior and rotation
Gaussian → Smoothed trend spine
Blue Ribbon → Primary trend
Gold Ribbon → Deeper market structure
Red Layer → Long-term regime
The basic visual rule:
Ordered + expanding = trend
Compressed + intertwined = equilibrium / transition
Reordered + expanding = new trend structure
Final Notes
Kinetic was built around a simple premise: Price should not be viewed against one moving average or one timeframe in isolation.
Trend exists as a hierarchy.
Short-term momentum moves first. Intermediate trend follows. Deeper structure moves more slowly. Long-term regime changes slowest of all.
Kinetic brings those layers together so that their relationship can be read visually on a single chart.
Execution → Trend → Structure → Regime
The goal is not to predict what the market must do next.
The goal is to make it easier to see what the market is doing now.
Индикатор

FCPO KDJ Tower HA EMA StrategyFCPO 5-Min Strategy Backtest v1 — A day-trading strategy for FCPO (Malaysia Crude Palm Oil Futures, BMD:FCPO1!) built on a 5-layer confluence system: KDJ + Tower (Baota) + Heikin Ashi + EMA20 + MACD. It uses the exact same entry logic as the companion "FCPO 5min Signal System v2" indicator, converted to the Strategy Tester to validate signal quality.
Entry Conditions (all 5 layers must align) :
- Layer 1 — Trend filter: price above EMA20 = long only; below EMA20 = short only
- Layer 2 — Momentum: MACD histogram direction (5,20,5)
- Layer 3 — Extreme signal: KDJ J value < 20 (oversold) or > 80 (overbought)
- Layer 4 — Candle confirmation: Heikin Ashi direction matches raw candle close direction
- Layer 5 — Final filter: Tower (Baota) line flips red (bullish) / green (bearish)
- Entries only when flat; each signal fires once, on the first bar all conditions align
Exit Rules (intraday discipline) :
- Fixed stop-loss / take-profit: 8 points each by default (1 lot = RM25 per point, i.e. RM200 / RM200)
- Max holding time: 60 bars by default (can be disabled)
- End-of-day liquidation at 17:45 — no overnight positions
- No new entries after 17:15 (MYT)
Backtest Settings : commission RM12.5/lot and 1-tick slippage included; initial capital 10,000, fixed 1 lot.
How to Use : Open FCPO1! (or BMD:FCPO1!) on a 5-minute chart — keep regular candlesticks (do NOT enable Heikin Ashi candles, as fill prices would be distorted) — add the strategy, then open the Strategy Tester. All parameters (EMA / KDJ / MACD / stop-take points / time windows) are adjustable in the settings panel.
Disclaimer: This script is a technical-analysis tool for validation only. Backtest results do not guarantee future performance, and this is not financial advice. Futures trading involves high risk; always use proper risk management and stop-loss discipline.
FCPO 5分钟 策略回测 v1 —— 基于 KDJ + 宝塔线 + Heikin Ashi + EMA20 + MACD 五层共振入场系统的 FCPO(马来西亚棕榈油期货,BMD:FCPO1!)日内交易策略,与「FCPO 系统警报 v2」指标使用同一套入场逻辑,用于在策略回测器中验证信号质量。
入场条件(五层全部满足才开仓) :
- 第1层 大方向:价格在 EMA20 上方只做多,下方只做空
- 第2层 动量背景:MACD 柱状线方向(5,20,5)
- 第3层 极端信号:KDJ J 值 < 20(KDJL)或 > 80(KDJH)
- 第4层 K线确认:Heikin Ashi 同向 + 普通K线收盘同向
- 第5层 最终过滤:宝塔线翻红 / 翻绿
- 只在空仓时进场,信号首次满足时只触发一次
出场规则(按日内交易纪律) :
- 固定止损 / 止盈:默认各 8 点(1手合约每点 = RM25,即 RM200 / RM200)
- 最长持仓超时:默认 60 根K线(可关闭)
- 日内强平:17:45 触发清仓,不留隔夜仓
- 17:15 后不开新仓
回测设置 :已含手续费(RM12.5/手)与滑点(1 tick);初始资金 10,000,固定 1 手。
使用方法 :FCPO1!(或 BMD:FCPO1!)5 分钟图 → 保持普通K线蜡烛模式(不要开 Heikin Ashi 蜡烛,否则成交价失真)→ 添加策略 → 打开策略回测器查看结果。EMA / KDJ / MACD / 止损止盈点数 / 时间窗口等参数均可在设置面板调整。
提醒:本策略仅为技术分析验证工具,回测结果不代表未来表现,不构成任何投资建议。期货交易风险高,请务必配合资金管理与止损纪律。 Стратегия

SHM - RSI Momentum MatrixSHM - RSI Momentum Matrix (Pine Script v6)
Executive Overview
The SHM - RSI Momentum Matrix is a quantitative, sub-pane momentum filter engineered for high-probability trend-following strategies. Acting as the dedicated momentum gate for the Sovereign Horizon Matrix (SHM) v8.0 ecosystem, this indicator isolates high-velocity structural breaks while strictly filtering out late, momentum-exhausted entries.
Rather than using standard, single-timeframe momentum oscillators that chop during consolidation, the Matrix utilizes a Timeframe-Locked RSI Engine paired with dual Weighted Moving Averages (WMAs) and a macro structural trend filter.
Core Architectural Pillars: How It Works
1. Timeframe-Locked RSI Momentum Engine
* Non-Repainting Security Calculations: Uses request.security() with offset closed bars (rsi_raw ) to eliminate repainting.
* Higher-Timeframe Alignment: By default, the RSI calculation is locked to a 24-hour (1440) rolling evaluation window regardless of the chart timeframe you are viewing.
* Narrow Velocity Gates & Exhaustion Caps:
* Long Entry Gate (42.0 – 48.0 RSI): Captures bullish acceleration before price becomes overbought. If RSI exceeds 48.0, the system flags the move as overextended and blocks the signal.
* Short Entry Gate (46.0 – 52.0 RSI): Captures bearish distribution before price reaches oversold levels.
2. Dual WMA Structural Framework
* Fast Institutional WMA (63): Tracks immediate directional momentum shifts.
* Macro Baseline WMA (480): Acts as the primary macro structural trend floor/ceiling.
* Sensitivity Filter (41 SMA): Ensures price is trading on the correct side of short-term structure before validating a setup.
3. Macro Tide Filter
Requires price action to align with the macro 480 WMA trend direction (Price > 480 WMA for Longs; Price < 480 WMA for Shorts), ensuring you never trade against primary market tide.
4. Experimental Baseline Price Action Module
Offers customizable baseline geometry execution mode:
* Candle Body Trigger: Requires a confirmed candle Close cross over the 63 or 480 WMAs.
* Candle Wick Trigger: Captures intraday High/Low wick breaches across WMA lines for faster sensitivity.
Joint Visual Connection with SHM 8.0
When paired with the main SHM 8.0 Overlay Strategy, this indicator pane serves as the visual "truth engine" that explains why a trade signal is allowed or rejected on the main price chart.
+-------------------------------------------------------------------------+
| MAIN CHART (SHM 8.0 Strategy Overlay) |
| - Price crosses 63/480 WMA baseline |
| - Displays BUY/SELL strategy execution labels |
+-------------------------------------------------------------------------+
|
v (Synchronized Confirmation)
+-------------------------------------------------------------------------+
| SUB-PANE (SHM - RSI Momentum Matrix) |
| - RSI Wave enters shaded Velocity Zone (Teal = Long / Red = Short) |
| - Prints matching BUY/SELL label directly on the Locked RSI Line |
+-------------------------------------------------------------------------+
1. Synchronized Signal Labels: When a valid entry condition triggers on the main chart, an identical BUY or SELL label prints at the exact same candle inside the RSI Momentum Matrix sub-pane.
2. Shaded Entry Threshold Zones:
* Teal Zone: Visualizes the 42.0 – 48.0 Long momentum window.
* Red Zone: Visualizes the 46.0 – 52.0 Short momentum window.
Note- Make sure that both scripts have the same numbers to receive proper signal.
3. Instant Rejection Audit: If you see a WMA line cross on the main price chart without a corresponding BUY/SELL label in the RSI sub-pane, the sub-pane visually demonstrates that RSI was outside the shaded velocity zone—protecting capital from false breakouts.
Key Parameter Settings Guide
Input Group Parameter Recommended Default Description
1. Core Framework Fast WMA / Slow WMA 63 / 480 Structural trend baselines.
Structural Sensitivity 41 Short-term trend confirmation filter.
2. Macro Tide Enable Macro Tide True Forces alignment with the 480 WMA trend.
3. RSI Matrix Locked Timeframe 1440 (Daily) Locks RSI to HTF calculation.
Lookback Period 33 RSI calculation length.
Long Min / Max 42.0 / 48.0 Bullish momentum velocity window.
Short Max / Min 52.0 / 46.0 Bearish momentum velocity window.
Best Practices for Trading
* Timeframe Flexibility: Best utilized on Daily (24h) or 4H charts for crypto, index futures (SPY/NQ), and FX macro trend trading.
* Bar Close Confirmation: Always wait for the active candle to close to ensure full RSI higher-timeframe data synchronization.
Индикатор

Trend EMA (MTF) + 4H 200 EMAfWHAT THIS DOES
Plots a higher-timeframe trend EMA on any chart (default: 60-period EMA of daily closes), colored by its slope: green while rising, red while falling. A second reference line plots the 200 EMA computed on 4-hour bars regardless of your chart timeframe. Floating chips at the end of each line identify them at a glance ("Daily trend EMA" / "4H 200 EMA"), with the trend chip showing a live direction arrow.
KEY FEATURES
- Trend EMA timeframe is selectable: Hourly, 4-Hour, or Daily (length configurable, default 60)
- Slope coloring: the line turns green when rising and red when falling, so trend state is readable without any oscillator
- Hover-to-peek bar coloring: hover over or select the indicator and the price bars instantly color green/red based on whether price is above or below the trend EMA. Click empty chart space and the coloring disappears. No settings required.
- Permanent bar coloring: if you prefer always-on painting, enable it in the Style tab ("Price bar coloring (permanent)")
- Session pinning: EMAs are computed on a fixed data session (Extended 24H by default), so the 4H 200 EMA shows the SAME value whether you view it from a 15-minute, 4-hour, or 3-day chart
- Smart labels: the two chips automatically split apart vertically when the lines converge, so they never overlap
HOW IT WORKS
- The higher-timeframe EMA is requested with gaps enabled, so it prints once per HTF bar and draws as a smooth connected line on intraday charts instead of a stair-step
- Slope state is persisted across the in-between bars, driving the line color, the label color, and the direction arrow
- The data session is pinned via ticker.modify(). Extended-hours data only exists on intraday charts, so an intraday EMA inherited from chart data changes value when you switch to daily+ timeframes. Pinning the session removes that inconsistency, which is a subtle but real problem with most MTF EMA scripts.
- The peek feature works by plotting exact candle copies behind the main price bars, colored by position vs the EMA. TradingView raises a hovered or selected indicator above the main series, which reveals them; deselecting drops them behind the bars again.
HOW TO USE IT
- Trend filter: take longs while the trend EMA is green and price holds above it, shorts while red and below. The bar-peek gives an instant read on how price has interacted with the EMA historically.
- Pullback reference: on intraday charts, the daily trend EMA often acts as a dynamic pullback zone within trends.
- The 4H 200 EMA is a slower structural reference; confluence of the two lines tends to mark meaningful support/resistance zones.
SETTINGS
- Trend EMA: timeframe, length, width, rising/falling colors
- Bar coloring: above/below colors (used by both peek and permanent modes)
- 4H 200 EMA: show/hide, color, width
- Labels: show/hide, offset from last bar
- Data: session used for intraday EMAs (Extended 24H / Regular hours / Chart)
NOTES
- Designed for chart timeframes at or below the selected EMA timeframe. On higher timeframes the intraday EMAs are sampled once per chart bar (coarser but consistent thanks to session pinning).
- The peek feature relies on solid candle/bar styles. With hollow candles, disable the "Bars above/below EMA" plots in the Style tab.
- If bars appear permanently colored after adding the indicator, right-click it and choose Visual order > Send to back.
This is a technical analysis tool for educational purposes, not financial advice. Индикатор

3x MTF MA Zones [josseliani]3x MTF MA Zones is a clean multi-timeframe moving average overlay designed for dynamic support/resistance, trend structure and higher-timeframe context.
The indicator combines up to three independently configurable moving averages in one chart overlay. Each MA can use its own type, length, source and timeframe, allowing higher-timeframe moving average structure to be displayed directly on a lower-timeframe chart.
In addition to the three MAs, the indicator can identify the directional relationship between the two longer moving averages and visually highlight changes in that structure.
Three Independent Moving Averages
Each MA can be configured separately.
Available settings include:
MA type: EMA, SMA, WMA or SMMA
Source
Length
Timeframe
Color
Line width
Visibility
The default configuration uses SMMA 50 / 100 / 200.
If the timeframe field is left empty, the MA is calculated using the current chart timeframe.
A different timeframe can be selected independently for each MA. For example, a trader working on a 1-minute chart can display moving averages calculated from the 5-minute or 15-minute timeframe without changing charts.
Confirmed Higher-Timeframe Values
The optional Use Confirmed HTF Values setting controls how higher-timeframe moving averages are displayed.
When enabled, the indicator uses the last completed higher-timeframe MA value. This keeps the higher-timeframe structure stable while the current higher-timeframe candle is still developing.
When disabled, the currently developing higher-timeframe MA value can be displayed instead.
MA Zones
Optional fills can be displayed between:
MA 1 and MA 2
MA 2 and MA 3
This allows nearby moving averages to be viewed as broader dynamic structure zones rather than only as individual lines.
These areas can be useful for observing pullbacks, price reactions and confluence between several moving averages.
MA Cross and Trend Context
The indicator also monitors the relationship between the displayed moving averages.
When all three MAs are visible, the two MAs with the longest selected periods are used for the cross analysis.
If only two MAs are visible, those two are used instead.
A confirmed crossover between the selected pair changes the current directional state:
Green background — bullish MA structure
Red background — bearish MA structure
The background remains active until an opposite crossover changes the directional state.
The crossover itself can also be marked with a small diamond and an optional vertical divider through the chart.
These elements are intended to make changes in the broader MA structure easy to identify without adding separate indicators to the chart.
How I Use It
I mainly use 3x MTF MA Zones to keep higher-timeframe structure visible while trading lower timeframes.
One configuration I use for intraday gold scalping is 5-minute SMMA 50 / 100 / 200 displayed on a 1-minute chart.
I use the moving averages and the areas around them as possible:
trend-structure zones
dynamic support and resistance
reaction areas
pullback areas
continuation levels
higher-timeframe confluence
The background gives an additional visual reference for the current relationship between the longer moving averages.
This is only an example of my own configuration. The MA types, periods and timeframes can be adapted to different markets and trading styles.
Alerts
The indicator includes two types of alerts.
MA Touch Alerts
Each of the three moving averages has an independent touch alert.
A touch is detected when price reaches the corresponding MA. Each MA also has its own cooldown setting to help prevent repeated notifications while price is consolidating around the same level.
MA Cross Alerts
Separate bullish and bearish alerts are available when the selected MA pair crosses and the directional state changes.
This makes it possible to receive notifications both when price reaches an MA area and when the broader moving-average structure changes.
What Makes 3x MTF MA Zones Different
The purpose of 3x MTF MA Zones is to combine several related parts of moving-average analysis in one compact overlay.
Instead of using several separate MA indicators, each moving average can be configured independently with its own type, source, period and timeframe.
The indicator then combines these MAs with optional structure zones, confirmed higher-timeframe values, automatic cross analysis of the relevant longer-period MAs, visual trend-state highlighting and independent touch and crossover alerts.
The result is a simple multi-timeframe structure map that can remain on the trading chart without requiring constant switching between timeframes.
Notes
3x MTF MA Zones does not generate automatic buy or sell signals.
The green and red background represents the directional relationship between the selected moving averages after a confirmed crossover. It should not be interpreted as an automatic instruction to enter a trade.
Moving averages are based on historical price data, and interaction with an MA or MA zone does not guarantee support, resistance, continuation or reversal.
The indicator is intended as a visual market-structure and planning tool and should be combined with the user's own analysis and risk-management process. Индикатор

Volatility Regime Breakout [Squeeze + ATR + Trend + PreAlert]Volatility Regime Breakout
A hybrid indicator combining three layers of confirmation to detect the birth of high-volatility regimes and filter out low-quality entries in sideways markets.
How it works:
🔹 Squeeze (BB vs KC): detects when Bollinger Bands compress inside Keltner Channels — a low-volatility phase that historically precedes strong directional moves.
🔹 Pre-Alert: before the release, the indicator measures whether the compression is accelerating (band-width contraction) to give you early warning (purple background + ⚠ icon) that an entry may be developing — this is not an entry signal, it's an early heads-up.
🔹 Expansion confirmation (ATR Ratio): on squeeze release, the script requires the ATR to be genuinely expanding relative to its baseline, filtering out false breakouts with no real range/momentum behind them.
🔹 Trend direction (EMA + slope): only generates a buy/sell signal when the breakout aligns with the underlying trend direction, avoiding counter-trend entries on the first impulse.
Includes:
Three distinct background states: normal squeeze, pre-alert, confirmed breakout
BUY/SELL signals on bar close only (no repainting)
Suggested Stop Loss / Take Profit levels based on ATR (visual reference only, not automatic execution)
Independent, configurable alerts for pre-alert and confirmed entry, with custom messages
All sensitivity parameters are adjustable from the settings panel
Recommended for: BTC and high-volatility crypto assets, 1h timeframe and above to reduce noise.
⚠️ This script is a technical analysis tool, not an automated trading system or financial advice. SL/TP levels are for reference only. We recommend validating the logic through your own backtesting before using it on a live account, and always applying proper risk management. Индикатор

TP/SL Toolkit [AxeAlgo]OVERVIEW
TP/SL Toolkit is a fast/slow EMA crossover strategy built around a modular take-profit and stop-loss engine. The crossover logic is intentionally simple — it exists mainly to give the exit engine something to trade — because the real purpose of this script is the exit engine itself: every take-profit, stop-loss, trailing-stop, break-even, time-based-exit and trend-filter calculation is written as a small, self-contained Pine Script function with no dependency on the rest of the script.
That means any of these functions can be copy-pasted directly into your own strategy and used as-is, without pulling in anything else from this script. This publication is written and commented with that specific audience in mind — Pine coders who want ready-made, tested exit logic rather than another closed black-box signal.
═══════════════════════════════════════════════════════════════════════
WHAT THE STRATEGY DOES
A fast EMA and a slow EMA are calculated from the chosen source price. When the fast EMA crosses above the slow EMA (a "Golden Cross"), the strategy opens a long and closes any open short. When the fast EMA crosses below the slow EMA (a "Death Cross"), it opens a short and closes any open long. This is one of the oldest and most widely known trend-following patterns in technical analysis — it performs best while a market is trending and is prone to whipsaws (false signals) in sideways, choppy conditions. An optional ADX-based trend filter (explained below) exists specifically to reduce that weakness.
Every trade can optionally carry a take-profit and a stop-loss, calculated one of four ways, selectable from a single input:
- Points mode places the exit a fixed number of ticks from entry. The distance is constant in price terms regardless of how far price has moved, and is converted from "points" to real price using the symbol's minimum tick, so the same input behaves sensibly on instruments with very different price scales.
- Percentage mode places the exit a fixed percentage of the entry price away, so the distance automatically scales with price and stays comparable across symbols trading at very different price levels.
- ATR mode places the exit a multiple of the Average True Range away from entry, so exits automatically widen during volatile conditions and tighten during quiet ones instead of staying fixed.
- Pivot mode sets the stop-loss at the most recently confirmed swing high or low (market structure) and derives the take-profit as a risk:reward multiple of that stop's distance, mirroring how many discretionary traders place stops beyond structure. Because a pivot only confirms a fixed number of bars after it actually forms, this mode is inherently a few bars delayed relative to the live swing point — a stop placed at "the last pivot" was already that many bars old at the moment the trade opened. This is disclosed here because it affects how the backtest results for Pivot mode should be interpreted.
On top of the static take-profit/stop-loss, two independent stop-management mechanisms are available and can be combined:
- A trailing stop that recalculates every bar to sit a fixed distance (points, percentage, or ATR multiple — same three distance types as above) behind the best price reached since entry, and can only tighten in the trade's favor, never loosen.
- A break-even stop that sits still until the trade has moved favorably by a chosen trigger distance, at which point it jumps once to entry price (plus an optional small offset) and stays there or better from then on, so the trade can no longer turn into a loss once triggered.
When both are enabled, the script keeps whichever of the two is currently more protective on any given bar. On the chart, the take-profit and stop-loss are drawn as shaded zones (boxes) stretching from the entry price to the current bar rather than as flat lines — the stop-loss zone changes color once the break-even stop actually triggers, so a trade that has become risk-free is visually distinct from one still risking a real loss.
An optional time-based exit force-closes a trade that is still open after a configurable number of bars, instead of waiting indefinitely for take-profit or stop-loss to be hit.
An optional ADX trend filter withholds new entries while ADX is below a configurable threshold (i.e., while the market isn't trending strongly), which is the standard way to reduce EMA-crossover whipsaws in range-bound conditions. The filter only gates new entries — an already-open trade still closes normally on an opposite crossover regardless of the filter's state.
A compact on-chart status table (optional, position configurable) shows the current trend direction, position, entry price, take-profit, stop-loss, computed risk:reward, and ADX reading, so the trade's state is readable at a glance instead of having to trace colored zones back to their exact values.
═══════════════════════════════════════════════════════════════════════
HOW TO USE IT
As a strategy: pick a TP/SL mode, optionally enable the trailing stop and/or break-even stop, optionally enable the ADX trend filter, and run it through the Strategy Tester like any other strategy. Every input has an in-editor tooltip explaining exactly which mode it applies to.
As a toolkit: each exit mechanism — points-based, percentage-based, ATR-based, and pivot-based TP/SL, the trailing-stop updater, the break-even-stop calculator, the two-stop combiner, the time-based-exit check, and the ADX trend-filter gate — is written as an independent function with no external state, documented inline with what it takes in and what it returns. Any one of them can be lifted into another script without needing the rest of this one.
═══════════════════════════════════════════════════════════════════════
ALERTS
Two alert conditions are provided — a bullish crossover ("buy") signal and a bearish crossover ("sell") signal — both gated by the same trend filter used for actual entries, so an alert only fires when the strategy would genuinely take that trade.
═══════════════════════════════════════════════════════════════════════
BACKTESTING NOTES & DISCLAIMER
This script is published primarily to demonstrate and share reusable exit-management code, not as a ready-to-trade signal service or a claim of profitability. The default strategy settings do not model commission or slippage and use a fixed starting capital with no margin restriction — before drawing any conclusion from the Strategy Tester's results, set the commission, slippage, initial capital, and position sizing to values that realistically match your own broker/exchange and account size. Backtested and simulated results have well-known limitations (including curve-fitting and lack of live-market friction) and do not guarantee similar performance going forward.
Nothing in this script or its description constitutes financial advice. Trading involves substantial risk of loss and is not suitable for everyone. Past performance — simulated or real — is not indicative of future results. Test thoroughly on a paper/demo account before considering any live use, and use position sizing appropriate to your own risk tolerance.
═══════════════════════════════════════════════════════════════════════
Стратегия

Futia Deviation Bands█ OVERVIEW
Futia Deviation Bands (200D SMA / 48M SMA) plots, in a separate pane, the percentage deviation of price from two fixed-timeframe simple moving averages: the 200-day SMA and the 48-month SMA. Both series are computed from daily and monthly data regardless of the chart timeframe. The thesis is that extreme downside stretch from these two reference trends has historically marked two distinct classes of mean-reversion conditions in broad equity indexes: a short-horizon tactical condition and a rare long-horizon undervaluation condition.
█ HISTORY / BACKGROUND
The method derives from the contrarian trading framework described by Carl Futia in the book The Art of Contrarian Trading (2009). Futia proposed the 48-month simple moving average of a broad stock index as a rough proxy for long-term fair value, and used deviations from the 200-day moving average as a tactical gauge of bearish sentiment extremes. In his framework these price conditions are meant to be combined with a discretionary assessment of crowd psychology; this indicator implements only the mechanical price conditions.
The conceptual basis is mean reversion around trend. A close far below the one-year trend (200-day SMA) reflects a compressed, fear-driven market state that has tended to resolve over weeks to months. A close far below the four-year trend (48-month SMA) is a much rarer state, historically clustered into a small number of major bear market episodes, and reflects deep departure from long-run value rather than short-term sentiment.
█ HOW IT WORKS
The script performs the following computations on every chart bar:
It requests daily data for the chart symbol and computes 100 * (close / SMA(close, 200) - 1), the percentage deviation of the daily close from the 200-day SMA.
It requests monthly data for the chart symbol and computes 100 * (close / SMA(close, 48) - 1), the percentage deviation of the monthly close from the 48-month SMA.
When the confirmed-bars input is enabled, both requests return the value of the previously completed daily or monthly bar, using the standard non-repainting higher-timeframe pattern (offset by one bar with lookahead on). When disabled, the requests return the developing value of the current daily or monthly bar with lookahead off.
Condition 1 is true when the daily deviation is at or below the Condition 1 threshold (default -10 percent).
Condition 2 is true when the monthly deviation is at or below the Condition 2 threshold (default -20 percent).
The pane background is shaded aqua when only Condition 1 is active, orange when only Condition 2 is active, and red when both are active.
A small triangle marker labeled C1 or C2 is drawn at the bottom of the pane on the first bar where each condition becomes true after being false.
Three alert conditions are provided: Condition 1 onset, Condition 2 onset, and both conditions active.
█ HOW TO USE
The indicator loads in its own pane below the chart. The aqua line is the deviation from the 200-day SMA; the orange line is the deviation from the 48-month SMA. A dotted gray line marks zero deviation, and dashed horizontal lines mark the two thresholds.
Because both series are pinned to daily and monthly resolutions through higher-timeframe requests, the indicator can be applied to any chart timeframe and will display the same deviation values. On intraday charts each bar shows the most recent completed daily and monthly readings when the confirmed-bars input is on. A daily chart is the natural resolution for routine monitoring, since Condition 1 is defined on daily closes.
Interpretation follows the two-condition design. Condition 1 identifies short-horizon stretch below the one-year trend; in the historical record of the S&P 500 from 1950 to 2018 it occurred roughly 21 distinct times, and it says nothing about whether a bear market has ended. Deep bear markets have triggered it repeatedly on the way to lower lows. Condition 2 identifies deep departure from the four-year trend; in the same record it was active in only a few dozen monthly observations, clustered into a small number of major bear market episodes. The red combined state corresponds to the deepest of those episodes. The indicator is a conditioning and context tool, not a complete trading system, and its author intended such conditions to modulate exposure around a baseline allocation rather than to switch fully in and out of a market.
█ SETTINGS
Condition 1: % below 200-day SMA. The deviation threshold at or below which Condition 1 is active. Default -10.
Condition 2: % below 48-month SMA. The deviation threshold at or below which Condition 2 is active. Default -20.
Use confirmed HTF bars (no repaint). When on, both deviations update only when the underlying daily or monthly bar closes, so signals do not change intrabar. When off, the current developing daily and monthly values are used and can change until those bars close. Default on.
█ WHAT MAKES IT ORIGINAL
The script combines two deviation measures from different fixed timeframes in a single pane and keeps both pinned to their native resolutions independently of the chart timeframe. Most deviation or distance-from-average tools compute on the chart resolution, which changes the meaning of the reading whenever the user changes timeframes. Here the 200-day and 48-month references are structural: they always mean one year of trading days and four years of months. The pairing is also specific: one fast sentiment-stretch measure and one slow value-stretch measure, with a distinct visual state for their intersection, which historically has been the signature of the deepest bear market conditions. The threshold logic, the non-repainting toggle, and the onset markers implement the mechanical portion of a published discretionary framework in reproducible form.
█ NOTES / LIMITATIONS
The 48-month SMA requires at least 48 completed monthly bars, and the 200-day SMA requires at least 200 completed daily bars. On symbols with shorter history the corresponding line returns na and does not render.
The thresholds were studied on a broad large-cap equity index (S&P 500 daily history, 1950 to 2018). On individual stocks, volatile sector indexes, or other asset classes, deviations of these magnitudes occur at very different frequencies and the default thresholds are not calibrated for them.
With the confirmed-bars input off, the current daily and monthly deviation values update intrabar and a condition can appear and disappear before the underlying bar closes. With it on, values lag by one completed daily or monthly bar.
Higher-timeframe values are obtained with request.security. On chart timeframes above daily or monthly, each chart bar displays the last completed reading available within that bar.
Condition 2 changes state only on monthly closes, so it is inherently slow and infrequent by construction.
The indicator generates context conditions, not trade signals with defined exits, position sizing, or risk management.
Индикатор

Minor H1 BIAS Analyse## 1. Purpose of the Script
The **Minor H1 BIAS Analyse** is designed to determine the short-term directional market BIAS.
It does not provide entries. Instead, it evaluates several trend, momentum, and structure conditions and classifies the market as:
Long
Short
Neutral
The script should therefore be used as a directional filter together with a separate entry strategy.
---
## 2. Structure of the Minor BIAS
The Minor BIAS is based on five components:
EMA Trend
Price vs EMA
Current Candle Direction
Previous H1 High / Low Break
Market Structure Break
Each bullish condition adds one point to the Bull Score.
Each bearish condition adds one point to the Bear Score.
The maximum possible score is:
5 Long
5 Short
---
## 3. EMA Trend
The script uses two exponential moving averages:
Fast EMA: 20
Slow EMA: 50
If the Fast EMA is above the Slow EMA:
+1 Long
If the Fast EMA is below the Slow EMA:
+1 Short
This represents the basic trend direction.
---
## 4. ATR Neutral Buffer
The script uses an optional ATR buffer around the EMAs.
Default settings:
ATR Length: 14
ATR Multiplier: 0.20
The buffer creates a neutral zone around the EMAs.
Price must move clearly above or below both EMAs before the condition becomes bullish or bearish.
This helps filter small movements and market noise.
---
## 5. Price vs EMA
For a bullish condition, price must close above both EMAs plus the ATR Buffer.
Result:
+1 Long
For a bearish condition, price must close below both EMAs minus the ATR Buffer.
Result:
+1 Short
If price remains inside the buffer area:
No Score
The dashboard displays:
Inside Buffer
---
## 6. Current Candle Direction
The script also evaluates the current candle.
Bullish Candle:
Close above Open
+1 Long
Bearish Candle:
Close below Open
+1 Short
Doji:
No Score
This adds a simple momentum component to the BIAS.
---
## 7. Previous H1 High / Low Break
The script checks whether price closes above or below the previous candle.
Close above Previous High:
+1 Long
Close below Previous Low:
+1 Short
No Break:
No Score
This filter can be enabled or disabled in the settings.
The script uses the candle close, not only the wick.
---
## 8. Market Structure
The script also analyzes the previous market structure.
Default Lookback:
5 candles
It calculates:
Structure High
Structure Low
If price closes above the Structure High:
Bullish Structure Break
+1 Long
If price closes below the Structure Low:
Bearish Structure Break
+1 Short
If neither level is broken:
Range
No Score
---
## 9. Score System
The final Minor BIAS is calculated from the Bull Score and Bear Score.
Possible Long points:
EMA Trend
Price vs EMA
Bullish Candle
Previous High Break
Bullish Structure Break
Possible Short points:
EMA Trend
Price vs EMA
Bearish Candle
Previous Low Break
Bearish Structure Break
A minimum of three points is required.
---
## 10. Minor LONG
The Minor BIAS becomes Long when:
Bull Score is at least 3
and
Bull Score is greater than Bear Score.
Example:
Bull Score: 4
Bear Score: 1
Result:
MINOR LONG
---
## 11. Minor SHORT
The Minor BIAS becomes Short when:
Bear Score is at least 3
and
Bear Score is greater than Bull Score.
Example:
Bull Score: 1
Bear Score: 4
Result:
MINOR SHORT
---
## 12. Neutral
If neither side reaches the required conditions, the BIAS remains Neutral.
Example:
Bull Score: 2
Bear Score: 2
Result:
NEUTRAL
Neutral therefore represents an unclear or mixed market situation.
---
## 13. Dashboard
The dashboard shows the current state of every component.
It contains:
BIAS
EMA Trend
Price vs EMA
H1 Candle
Previous H1 Break
Structure
ATR Buffer
It also displays the current:
Bull Score / Bear Score
Example:
4 / 1
This makes it possible to understand why the current BIAS is Long, Short, or Neutral.
---
## 14. Chart Visualization
The script can display:
Fast EMA
Slow EMA
Previous H1 High / Low
Structure High / Low
BIAS Background
BIAS Label
Dashboard
Each visualization can be enabled or disabled individually.
The calculations continue to work even when the corresponding chart elements are hidden.
---
## 15. Alerts
The script includes alerts for:
Minor H1 LONG
Minor H1 SHORT
Minor H1 NEUTRAL
These can be used to receive a TradingView notification when the directional BIAS changes.
---
## 16. Meaning for Trading
The Minor BIAS should not be treated as an entry signal.
A simple trading rule would be:
**MINOR LONG:** Prefer Long setups.
**MINOR SHORT:** Prefer Short setups.
**NEUTRAL:** Wait for clearer conditions.
The actual entry should come from a separate trading setup.
---
## 17. BIAS Strength
The score can also be used to estimate the strength of the current direction.
3 Points:
Valid directional confirmation
4 Points:
Strong confirmation
5 Points:
Very strong alignment
For example:
5 / 0 Long
represents stronger bullish confirmation than:
3 / 2 Long
even though both are classified as MINOR LONG.
---
## 18. Important Timeframe Note
The current script uses the timeframe of the active chart.
That means the calculations are only truly based on H1 when the indicator is used on a **1-hour chart**.
If the script is placed on M5 or M1, the calculations also use M5 or M1 data.
For a true H1 BIAS that remains identical on every chart, the calculations would need to use fixed 60-minute data.
---
## 19. Conclusion
The **Minor H1 BIAS Analyse** is a score-based directional filter.
It combines:
Trend
Price Position
Momentum
Previous Candle Break
Market Structure
At least three confirmations are required for a directional BIAS.
The final result is:
MINOR LONG
MINOR SHORT
NEUTRAL
Its purpose is to identify the stronger short-term market direction before a separate entry setup is considered.
++ This was only used on NQ ++
Индикатор

Auto AVWAP - Core and Adaptive LevelsAuto AVWAP Core and Adaptive Levels
This indicator plots automatically anchored Volume Weighted Average Price levels designed to represent dynamic support and resistance.
It expands the traditional Auto AVWAP concept into a multi-level structure composed of:
- Core AVWAPs: the primary active support and resistance references.
- Adaptive AVWAPs: additional levels anchored at subsequently confirmed market swings.
- Developing candidates: optional previews of potential Adaptive anchors.
The objective is to preserve relevant volume-weighted references while allowing new AVWAPs to emerge during persistent directional moves. This can be particularly useful when an older AVWAP remains structurally relevant but becomes too distant from current price to represent nearby support or resistance.
Core calculation
Each AVWAP is calculated as:
AVWAP = Sum(Price × Volume) / Sum(Volume)
The indicator can use:
- High for resistance AVWAP calculations.
- Low for support AVWAP calculations.
When “Use High/Low instead of HLC3” is disabled, both directions use:
HLC3 = (High + Low + Close) / 3
Using High and Low generally creates greater separation between support and resistance AVWAPs. HLC3 produces a more conventional volume-weighted average.
Core AVWAPs
The indicator maintains one active Core AVWAP in each direction:
- Core Resistance AVWAP.
- Core Support AVWAP.
The Core Resistance AVWAP is violated when the selected violation source remains above it for the configured number of consecutive bars.
The Core Support AVWAP is violated when the selected violation source remains below it for the configured number of consecutive bars.
When a Core AVWAP reaches its violation threshold:
1) The active Core AVWAP stops immediately.
2) Its completed historical segment remains visible.
3) Its accumulators stop receiving new price and volume data.
4) The indicator waits for a confirmed replacement anchor.
5) The confirmed candidate becomes the new Core AVWAP.
This separates invalidation from replacement. A violated Core AVWAP is not kept active merely because its replacement has not yet been confirmed.
Adaptive AVWAPs
Adaptive AVWAPs provide additional support and resistance references during extended trends.
A new Adaptive AVWAP can be considered when:
- price has moved a configurable ATR distance from the newest valid AVWAP;
- the minimum number of bars between anchors has elapsed;
- a qualifying Stochastic RSI episode occurs;
- price reacts sufficiently from the candidate extreme;
- the selected top or bottom confirmation is completed;
- the anchor satisfies the configured spacing and progression rules;
- and an Adaptive AVWAP slot is available.
Each Adaptive AVWAP:
- begins at its own confirmed top or bottom;
- maintains independent price-volume accumulators;
- remains independent from the Core and other Adaptive AVWAPs;
- has its own consecutive-violation counter;
- remains active while respected;
- and stops only when its individual violation rule is satisfied.
The indicator supports up to 10 Adaptive AVWAPs per direction.
Adaptive creation distance
“Distance required from newest AVWAP (ATR)” determines how far price must move from the newest valid AVWAP before the indicator begins searching for an additional Adaptive anchor.
A lower value:
- creates Adaptive AVWAPs more frequently;
- keeps references closer to price;
- and may produce more overlapping levels.
A higher value:
- produces fewer Adaptive AVWAPs;
- requires greater separation from existing levels;
- and emphasizes larger market movements.
Anchor spacing and timing
“Minimum spacing between anchors (ATR)” prevents new Adaptive anchors from being created too close to the newest valid anchor.
“Minimum bars between anchors” imposes an additional time-based separation.
These controls work together with the creation-distance requirement to reduce redundant AVWAPs.
Progressive anchors
When “Require progressively higher lows / lower highs” is enabled:
- Adaptive support anchors must form at progressively higher lows.
- Adaptive resistance anchors must form at progressively lower highs.
This setting emphasizes directional progression.
When disabled, the indicator can accept sufficiently separated anchors that are not strictly progressive. This may be useful when a trend experiences a deeper correction before resuming.
Top and bottom confirmation
The indicator provides three confirmation modes.
Reaction only
The candidate requires:
- the relevant Stochastic RSI reversal;
- and a minimum price reaction measured in ATR.
This is the fastest and most sensitive mode.
Pivot confirmed
In addition to the required reaction, the candidate extreme must remain unbroken for the configured number of bars.
This reduces anchors generated from brief or unstable extremes.
Pivot + Structure break
This is the default and most selective mode.
A resistance anchor requires:
- an overbought Stochastic RSI episode;
- a candidate high;
- a bearish K/D reversal;
- the configured downward reaction in ATR;
- the high to remain unbroken for the required number of bars;
- and a close below the microstructure low captured around the extreme.
A support anchor requires the inverse sequence:
- an oversold Stochastic RSI episode;
- a candidate low;
- a bullish K/D reversal;
- the configured upward reaction in ATR;
- the low to remain unbroken for the required number of bars;
- and a close above the corresponding microstructure high.
All confirmation events must belong to the same candidate episode.
Candidate expiration
Unconfirmed candidates expire after the configured timeout.
When a candidate expires:
- its accumulated state is cleared;
- it cannot be confirmed much later;
- and it does not produce a historical AVWAP.
This prevents stale oscillator events from generating delayed or unrelated anchors.
Core and Adaptive invalidation
Every active Core and Adaptive AVWAP maintains an independent consecutive-violation counter.
The violation source can be selected from:
- Close: uses the candle close.
- Open: uses the candle open.
- High/Low: uses High for resistance violations and Low for support violations.
A resistance AVWAP is violated when the selected source remains above it.
A support AVWAP is violated when the selected source remains below it.
For example, with six consecutive bars selected:
- a resistance AVWAP stops after six consecutive violations above it;
- a support AVWAP stops after six consecutive violations below it.
If a bar does not violate a level, that AVWAP’s counter returns to zero.
The “Count only closed bars” option prevents an unfinished real-time candle from temporarily advancing the violation counter.
Historical origin display
Candidates remain hidden while unconfirmed.
When a Core or Adaptive candidate is confirmed, the indicator reconstructs and displays the AVWAP from its true anchor rather than displaying it only from the confirmation candle.
This preserves the complete origin and development of confirmed AVWAPs without displaying candidates that were rejected or expired.
The reconstructed origin uses the same direction, generation color, transparency, width, and approximate dotted style as the active AVWAP.
AVWAP interaction alerts
The indicator monitors every active Core and Adaptive AVWAP independently for three types of price interaction:
- Touch.
- Directional rejection.
- Failed violation.
These events are separated by direction into support and resistance alerts.
Touch
A touch occurs when the candle enters a configurable ATR-based zone around an active AVWAP.
The interaction zone is defined as:
AVWAP ± Touch Tolerance × ATR
A touch does not require the candle to close on a particular side of the AVWAP.
To reduce repeated notifications, a touch alert is triggered only when price enters the interaction zone. Additional candles remaining inside the same zone do not generate new touch alerts. The touch state resets after price leaves the zone.
Directional rejection
A rejection requires more than a simple touch.
The candle must:
- interact with the AVWAP;
- return to the valid side;
- close at least the configured ATR distance away from the AVWAP;
- and form in the expected directional candle color.
A resistance AVWAP rejection requires:
- the candle to touch or penetrate the resistance interaction zone;
- the candle to close back below the resistance AVWAP;
- the close to finish at least the configured rejection distance below the AVWAP;
- and a bearish candle, where Close is below Open.
A support AVWAP rejection requires:
- the candle to touch or penetrate the support interaction zone;
- the candle to close back above the support AVWAP;
- the close to finish at least the configured rejection distance above the AVWAP;
- and a bullish candle, where Close is above Open.
Doji candles, where Close equals Open, are not classified as rejection candles.
This directional-candle requirement is intended to distinguish an actual reaction from a candle that merely crosses or finishes near an AVWAP.
Failed violation
A failed violation occurs when price begins violating an AVWAP but returns to the valid side before reaching the number of consecutive bars required for full invalidation.
For a resistance AVWAP:
1) Price evaluates above the AVWAP according to the selected violation source.
2) A partial consecutive-violation count begins.
3) The count reaches the configured minimum partial-violation requirement.
4) Price returns to the valid side before reaching full invalidation.
For a support AVWAP, the inverse sequence applies below the level.
A failed violation does not require the reversal candle to be bullish or bearish. Its purpose is to identify an unsuccessful multi-bar violation sequence rather than a single-candle rejection pattern.
Interaction alert settings
Touch tolerance (ATR)
Defines the size of the interaction zone surrounding every active AVWAP.
A lower value requires price to approach the AVWAP more precisely.
A higher value detects interactions occurring within a wider volatility-adjusted area.
Minimum rejection close distance (ATR)
Defines how far the rejection candle must close back on the valid side of the AVWAP.
Increasing this setting requires a stronger reaction before a rejection alert is generated.
Minimum partial violation bars
Defines how many consecutive violation bars must occur before a return to the valid side can be classified as a failed violation.
For example:
- A value of 1 detects a failure after any single partial violation.
- A value of 2 requires at least two consecutive violation bars.
- The partial count must remain below the full invalidation threshold.
Confirm interactions only on closed bars
When enabled, touch, rejection, and failed-violation events are confirmed only after the candle closes.
This prevents temporary intrabar movements from producing interaction alerts that may disappear before the bar is complete.
Plots
The indicator can display:
- Core Resistance AVWAP.
- Core Support AVWAP.
- Up to 10 Adaptive Resistance AVWAPs.
- Up to 10 Adaptive Support AVWAPs.
- Optional developing Adaptive resistance candidate.
- Optional developing Adaptive support candidate.
Core AVWAPs use stronger red and green styling.
Adaptive resistance AVWAPs use orange, fuchsia, purple, and related shades.
Adaptive support AVWAPs use blue, aqua, teal, and related shades.
Developing candidates are hidden by default to reduce chart noise.
Alerts
The indicator includes alert conditions for:
- New Adaptive resistance AVWAP.
- New Adaptive support AVWAP.
- Resistance AVWAP invalidation.
- Support AVWAP invalidation.
- Resistance AVWAP touch.
- Support AVWAP touch.
- Resistance AVWAP rejection.
- Support AVWAP rejection.
- Failed resistance AVWAP violation.
- Failed support AVWAP violation.
Because TradingView alert conditions cannot dynamically create a separate selectable alert for every array slot, interaction alerts are aggregated by event type and direction.
For example, “Support AVWAP rejection” indicates that price rejected at least one active Core or Adaptive Support AVWAP. It does not identify the individual AVWAP slot in the static alert message.
How to use
- Treat support AVWAPs as potential dynamic support references.
- Treat resistance AVWAPs as potential dynamic resistance references.
- Use Core AVWAPs as the primary active market references.
- Use Adaptive AVWAPs to monitor newer levels formed during extended trends.
- Reduce the ATR creation distance to capture more intermediate anchors.
- Increase it to retain only more widely separated Adaptive levels.
- Use “Pivot + Structure break” when stronger confirmation is preferred.
- Use “Reaction only” when faster but less selective anchoring is desired.
- Increase the consecutive-violation requirement to make levels more persistent.
- Prefer confirmed closes when the objective is to reduce intrabar noise.
- Use touch alerts as early notifications that price is interacting with an active AVWAP.
- Use directional rejection alerts when a candle touches the level and confirms a reaction in the expected direction.
- Use failed-violation alerts to identify unsuccessful attempts to invalidate an AVWAP.
- A rejection and a failed violation represent different events: rejection is a directional candle pattern, while failed violation is the cancellation of a partial multi-bar violation sequence.
- Increase the rejection distance when stronger reactions are preferred.
- Increase the minimum partial-violation count to filter isolated failed breaks.
- Adjust settings according to the symbol, timeframe, session structure, liquidity, and volatility regime.
Example starting configuration
For an intraday chart, a possible starting configuration is:
- Maximum Adaptive AVWAPs per direction: 3 to 5
- ATR length: 14
- Distance required from newest AVWAP: 1.0 to 2.0 ATR
- Minimum bars between anchors: 12 to 24
- Minimum spacing between anchors: 0.5 to 1.0 ATR
- Required price reaction: 0.5 ATR
- Confirmation mode: Pivot + Structure break
- Bars without a new extreme: 3
- Microstructure lookback: 5
- Consecutive bars to invalidate: 3 to 6
- Violation source: Close
- Count only closed bars: Enabled
- Touch tolerance: 0.10 ATR
- Minimum rejection close distance: 0.15 ATR
- Minimum partial violation bars: 1
- Confirm interactions only on closed bars: Enabled
These values are starting points rather than universal settings.
Open-source reuse and credits
This script is based on the open-source indicator:
“Auto AVWAP (Anchored-VWAP)” by Electrified.
Original source:
This version substantially extends and changes the original lifecycle model by adding:
1) Pine Script v6 implementation.
2) Separate Core and Adaptive AVWAP architecture.
3) Up to 10 independent Adaptive AVWAPs per direction.
4) Independent price-volume accumulators for every active level.
5) Independent consecutive-violation counters.
6) Immediate invalidation separated from replacement confirmation.
7) ATR-based Adaptive AVWAP search.
8) Configurable distance and spacing between anchors.
9) Configurable minimum time between Adaptive anchors.
10) Optional progressively higher-low and lower-high requirements.
11) Isolated Stochastic RSI candidate episodes.
12) Reaction, pivot, and microstructure confirmation modes.
13) Candidate expiration to prevent stale confirmations.
14) Historical reconstruction from each confirmed anchor.
15) Consistent styling before and after confirmation.
16) Separate creation and invalidation alerts.
17) Independent lifecycle management for Core and Adaptive levels.
18) ATR-normalized interaction zones for all active Core and Adaptive AVWAPs.
19) Touch alerts with zone-entry latching to reduce repeated notifications.
20) Directional rejection alerts requiring bearish resistance-rejection candles and bullish support-rejection candles.
21) Failed-violation alerts based on incomplete consecutive-violation sequences.
22) Configurable closed-bar confirmation for AVWAP interaction events.
Limitations
- AVWAPs are analytical references, not guaranteed support or resistance.
- Stronger confirmation reduces false anchors but introduces additional delay.
- Lower ATR-distance settings may produce many overlapping Adaptive AVWAPs.
- Higher distance and spacing settings may omit useful intermediate swings.
- Stochastic RSI behavior depends on the selected symbol and timeframe.
- Volume quality varies across markets and data providers.
- HLC3 can make support and resistance AVWAPs appear closer together.
- Touch and rejection zones are ATR-based and may require adjustment across volatility regimes.
- Directional rejection alerts describe candle behavior around an AVWAP; they do not guarantee continued movement away from the level.
- Failed-violation alerts identify an incomplete invalidation sequence, but price may attempt another violation shortly afterward.
- Aggregated interaction alerts identify the event type and direction but do not specify the individual Core or Adaptive AVWAP slot.
- Historical reconstruction uses TradingView drawing objects and may not render identically to native plot points.
- TradingView imposes limits on historical drawing objects.
- Historical behavior does not guarantee future results.
- This is a decision-support tool, not a guaranteed-profit system.
- Risk management is required. Индикатор
