RSI Divergence Entry Engine [trade_w_samet]🎯 RSI Divergence Entry Engine
RSI Divergence Entry Engine is a pivot-confirmed RSI divergence, optional trend-filtering, ATR-based trade-mapping, historical visualization, alert, and statistics indicator designed to help traders study how regular bullish and bearish RSI divergences can be converted into a structured chart workflow.
The script is built around one central idea:
A confirmed RSI divergence should be treated as analytical context first, and as a tracked trade setup only when the active direction filter and trade-state rules allow it.
The engine identifies regular RSI divergence between confirmed RSI pivots and corresponding price pivots.
When a divergence is confirmed, the script can:
• Display the divergence inside the RSI panel
• Fill the region between the RSI path and its divergence reference line
• Draw a three-layer neon divergence line directly between the corresponding price pivots on the main chart
• Evaluate the active trend-filter mode
• Open one tracked bullish or bearish setup when the signal is eligible
• Calculate an ATR-based Stop Loss
• Calculate TP1, TP2, and TP3
• Extend risk/reward boxes while the trade remains active
• Preserve completed trade boxes and historical TP price labels
• Track TP3 wins, Stop Losses, Win Rate, NET R, Average R, and Profit Factor
• Display a full desktop dashboard or a compact mobile dashboard
• Send separate TradingView alert conditions
• Support one combined “Any alert() function call” workflow
• Apply Dark Mode, Light Mode, or Mobile Theme styling
The indicator includes:
• Fixed RSI 14 calculation using closing prices
• Pivot-based regular bullish divergence detection
• Pivot-based regular bearish divergence detection
• Adjustable Pivot Lookback
• Adjustable Confirmation Bars
• A fixed internal pivot-distance window
• Confirmed-bar divergence acceptance
• RSI-panel bullish and bearish divergence lines
• RSI-panel divergence-area fills
• Main-chart three-layer neon divergence lines
• Adjustable main-chart BULLISH / SELL label size
• Fixed compact RSI-panel labels
• Dark Mode
• Light Mode
• Mobile Theme
• EMA 200 Trend Filter
• Supertrend filter using ATR 10 and factor 3.0
• Higher-timeframe EMA 200 Trend Filter
• Adjustable higher timeframe
• ATR-based Stop Loss
• Adjustable ATR period
• Adjustable ATR Stop Loss multiplier
• Adjustable TP3 target from 1R to 7R
• Automatically calculated TP1 and TP2
• One active tracked trade at a time
• Conservative same-candle TP3 / SL handling
• Permanent historical TP / SL boxes
• Historical TP1, TP2, and TP3 price labels
• Dynamic active-trade price labels
• TP3 TARGET HIT labels
• Stop Loss result labels
• Full desktop statistics dashboard
• Two-row Mobile Theme dashboard
• Static alertcondition() support
• Dynamic alert() support
• “Any alert() function call” compatibility
• Bold-italic visual text
• Pure-white Dark Mode label text
• Hidden status-line input values
• Main-chart overlay visuals from a separate RSI pane
• Loaded-history trade statistics
The purpose of the script is to provide a transparent visual framework for reviewing confirmed RSI divergence, directional context, mapped risk, target structure, and bar-based historical outcomes.
It is not financial advice.
It is not an automated trading system.
It does not execute broker orders.
It does not calculate position size.
It does not guarantee that a divergence will produce a reversal.
It does not guarantee that the displayed Win Rate, NET R, or Profit Factor will continue in future market conditions.
It does not include spread, commission, slippage, latency, financing, or partial fills.
It does not reproduce the exact intrabar path inside historical candles.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, RSI Divergence Entry Engine does the following:
• Calculates RSI using a fixed 14-period length and closing prices.
• Searches the RSI series for confirmed pivot lows and pivot highs.
• Compares each confirmed RSI pivot with the previous eligible pivot of the same type.
• Compares the corresponding price low or high with the prior price pivot.
• Identifies regular bullish divergence when RSI forms a higher low while price forms a lower low.
• Identifies regular bearish divergence when RSI forms a lower high while price forms a higher high.
• Requires the distance between the two confirmed pivots to remain inside the fixed internal range window.
• Waits for the required right-side confirmation bars before accepting a pivot.
• Displays confirmed divergence inside the RSI panel.
• Draws the same confirmed price-pivot relationship on the main chart with a neon line.
• Evaluates the selected trend-filter mode.
• Rejects a tracked entry when the trend filter does not allow that direction.
• Rejects a tracked entry when an opposite divergence is simultaneously present.
• Rejects a tracked entry while another trade is active.
• Opens a tracked trade at the close of the divergence-confirmation candle.
• Calculates Stop Loss distance from ATR.
• Places TP1 and TP2 at proportional distances inside the final TP3 target.
• Tracks only TP3 as the winning exit.
• Tracks Stop Loss as a -1R loss.
• Extends the active profit and loss boxes until the trade closes.
• Preserves completed boxes as historical trade visuals.
• Preserves historical TP1, TP2, and TP3 price labels.
• Updates the dashboard with bar-based historical statistics.
• Provides separate static alerts and combined dynamic alerts.
The script does not use machine-learning prediction.
It does not claim that RSI divergence predicts the future with certainty.
Its dashboard is not TradingView Strategy Tester.
Its statistics are calculated internally from the script’s own bar-touch rules.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
RSI divergence describes disagreement between price direction and RSI pivot direction.
A regular bullish divergence occurs when:
• price forms a lower low
• RSI forms a higher low
A regular bearish divergence occurs when:
• price forms a higher high
• RSI forms a lower high
The divergence can indicate that momentum is not confirming the newest price extreme.
However, divergence alone does not answer:
• whether the broader trend supports the reversal
• whether price is above or below a long-term directional reference
• whether Supertrend agrees with the signal
• whether the selected higher timeframe agrees with the signal
• where a volatility-adjusted Stop Loss should be mapped
• where intermediate and final targets should be displayed
• whether another tracked trade is already active
• whether historical bar touches reached TP3 or Stop Loss first
• how the signal behaves across Dark, Light, or Mobile layouts
The script therefore combines the divergence calculation with an optional trend filter and a fixed trade-tracking model.
The complete workflow is:
RSI pivot confirmation
→ price-pivot comparison
→ regular divergence confirmation
→ RSI-panel visualization
→ main-chart neon price-divergence line
→ optional trend-filter validation
→ one-active-trade check
→ entry at confirmation-candle close
→ ATR-based Stop Loss
→ TP1 / TP2 / TP3 mapping
→ historical bar-touch tracking
→ TP3 or SL result
→ dashboard statistics
→ static and dynamic alerts
The modules are not intended to operate as unrelated indicators.
Each module supports the same process: identifying a confirmed divergence, deciding whether it is eligible for tracking, mapping the trade structure, and recording the result under explicit rules.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE RSI DIVERGENCE MARKER
━━━━━━━━━━━━━━━━━━━━━━
A basic RSI divergence script can stop after drawing a line between two oscillator pivots.
RSI Divergence Entry Engine continues beyond that step.
A confirmed divergence can move through the following stages:
RSI pivot appears
→ right-side confirmation bars complete
→ previous eligible RSI pivot is located
→ pivot distance is validated
→ corresponding price pivots are compared
→ bullish or bearish divergence is confirmed
→ RSI divergence region is displayed
→ main-chart neon price-divergence line is displayed
→ active trend filter is evaluated
→ opposite-direction conflict is rejected
→ existing active-trade state is checked
→ ATR risk distance is calculated
→ entry, SL, TP1, TP2, and TP3 are stored
→ trade boxes extend through time
→ TP3 or SL is detected
→ completed trade is added to statistics
→ historical TP prices remain visible
The RSI module identifies the momentum disagreement.
The trend-filter module defines whether the tracked entry is directionally permitted.
The ATR module adapts the Stop Loss distance to current volatility.
The target module translates the chosen TP3 R multiple into three visual target levels.
The trade-state module prevents overlapping tracked positions.
The statistics module summarizes the outcomes produced by those exact rules.
The alert module communicates divergence, entry, TP3, and Stop Loss events.
This coordinated process makes the publication an entry-engine framework rather than only a divergence drawing tool.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The indicator operates from a separate RSI pane while using force-overlay visuals for selected elements on the main chart.
The internal RSI configuration is:
• RSI length: 14
• Source: close
• Regular bullish divergence: enabled
• Regular bearish divergence: enabled
• Hidden bullish divergence: internally disabled
• Hidden bearish divergence: internally disabled
• Minimum pivot separation: 5 bars
• Maximum pivot separation: 60 bars
The user controls:
• Pivot Lookback
• Confirmation Bars
• Main-chart signal-label size
• ATR Period
• Stop Loss Distance in ATR
• TP3 Target in R
• Trend Filter
• Higher-Timeframe Trend Timeframe
• Theme Mode
First, the script calculates RSI:
osc = ta.rsi(close, 14)
The script then detects confirmed RSI pivots:
pivotLowValue = ta.pivotlow(osc, lbL, lbR)
pivotHighValue = ta.pivothigh(osc, lbL, lbR)
A pivot is not known on the pivot candle itself.
It becomes confirmed only after the selected Confirmation Bars have closed to its right.
The script then retrieves the previous confirmed pivot value, price value, and pivot bar.
Regular bullish divergence requires:
• current RSI pivot low above the previous RSI pivot low
• current price low below the previous price low
• valid pivot distance
• confirmed current chart bar
Regular bearish divergence requires:
• current RSI pivot high below the previous RSI pivot high
• current price high above the previous price high
• valid pivot distance
• confirmed current chart bar
The confirmed divergence is then displayed in two places:
• RSI pane
• Main price chart
The trend filter is applied only to the tracked trade entry.
This means a confirmed divergence can remain visible even when:
• the selected trend filter rejects the direction
• another trade is already active
• bullish and bearish conditions conflict on the same calculation
This separation is intentional.
The divergence visual represents analytical context.
The main-chart BULLISH or SELL trade label represents an entry that the tracking engine actually accepted.
━━━━━━━━━━━━━━━━━━━━━━
📉 RSI CALCULATION
━━━━━━━━━━━━━━━━━━━━━━
The Relative Strength Index is calculated from closing prices using a fixed length of 14.
The RSI line is displayed in blue.
The RSI pane includes:
• 70 Overbought line
• 50 Middle line
• 30 Oversold line
Dark Mode uses:
• black RSI-panel background
• red Overbought line
• white dotted Middle line
• green Oversold line
Light Mode uses:
• white RSI-panel background
• dark Middle line
• red Overbought line
• green Oversold line
The 70 and 30 lines provide visual context.
They are not mandatory divergence conditions.
A bullish divergence can be detected outside the Oversold region.
A bearish divergence can be detected outside the Overbought region.
The script does not require RSI to cross 30 or 70 before accepting a divergence.
━━━━━━━━━━━━━━━━━━━━━━
🔍 PIVOT DETECTION MODEL
━━━━━━━━━━━━━━━━━━━━━━
Pivot Lookback controls the number of candles examined on the left side of a potential RSI pivot.
The default value is 5.
Higher values generally produce larger and less frequent swing points.
Lower values generally produce smaller and more frequent swing points.
Confirmation Bars controls the number of completed candles required on the right side of the potential pivot.
The default value is 1.
A higher Confirmation Bars value provides more right-side confirmation but increases delay.
A lower value confirms earlier but can identify smaller structures.
The script also requires the previous pivot to be between 5 and 60 bars away.
These minimum and maximum distance values are fixed internally to keep the public settings panel compact.
The pivot model is symmetrical:
• pivot lows are used for bullish divergence
• pivot highs are used for bearish divergence
━━━━━━━━━━━━━━━━━━━━━━
🟢 REGULAR BULLISH DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━━
A regular bullish divergence is confirmed when:
• a new RSI pivot low is confirmed
• the previous eligible RSI pivot low exists
• the current RSI pivot low is higher than the previous RSI pivot low
• the current corresponding price low is lower than the previous price low
• the pivot distance is between the fixed internal limits
• the current calculation bar is confirmed
Conceptually:
Price:
lower low
RSI:
higher low
The RSI pane displays:
• a green divergence line between the two RSI pivot values
• a translucent green fill between the real RSI path and the straight divergence reference
• a BULLISH label at the confirmed pivot location
The main chart displays:
• a three-layer green neon line between the corresponding price lows
A tracked bullish trade opens only when:
• the bullish divergence is not opposed by a bearish divergence on the same calculation
• the selected trend filter allows bullish entries
• no tracked trade is currently active
• another trade did not close on the same candle
• ATR is available and greater than zero
The tracked entry price is the close of the confirmation candle.
It is not the historical pivot-low price.
━━━━━━━━━━━━━━━━━━━━━━
🔴 REGULAR BEARISH DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━━
A regular bearish divergence is confirmed when:
• a new RSI pivot high is confirmed
• the previous eligible RSI pivot high exists
• the current RSI pivot high is lower than the previous RSI pivot high
• the current corresponding price high is higher than the previous price high
• the pivot distance is between the fixed internal limits
• the current calculation bar is confirmed
Conceptually:
Price:
higher high
RSI:
lower high
The RSI pane displays:
• a red divergence line between the two RSI pivot values
• a translucent red fill between the real RSI path and the straight divergence reference
• a SELL label at the confirmed pivot location
The main chart displays:
• a three-layer red neon line between the corresponding price highs
A tracked bearish trade opens only when:
• the bearish divergence is not opposed by a bullish divergence on the same calculation
• the selected trend filter allows bearish entries
• no tracked trade is currently active
• another trade did not close on the same candle
• ATR is available and greater than zero
The tracked entry price is the close of the confirmation candle.
It is not the historical pivot-high price.
━━━━━━━━━━━━━━━━━━━━━━
⏳ PIVOT CONFIRMATION AND SIGNAL TIMING
━━━━━━━━━━━━━━━━━━━━━━
This section is important.
The script uses ta.pivotlow() and ta.pivothigh().
Pivot functions require candles to the right of the pivot before confirmation.
For example, when Confirmation Bars is 1:
• the potential pivot occurs
• one additional candle closes
• the pivot becomes confirmed
• the divergence condition can then be calculated
The RSI-panel divergence line and RSI divergence label are drawn at the original pivot-bar location after confirmation.
The main-chart neon divergence line also connects the original price-pivot bars after the divergence is confirmed.
This creates a historical visual relationship between the two pivots.
It does not mean the divergence was available in realtime on the original pivot candle.
The tracked trade entry is not placed back on the pivot.
The tracked entry occurs at the close of the later candle where the divergence confirmation becomes available.
Therefore, users must distinguish between:
Pivot Visualization
Shows where the confirmed historical pivots occurred.
Trade Entry Label
Shows the candle where the script actually accepted and opened the tracked setup.
Changing Confirmation Bars changes the confirmation delay.
Increasing Confirmation Bars can materially change signal timing and historical divergence output.
━━━━━━━━━━━━━━━━━━━━━━
✨ MAIN-CHART NEON DIVERGENCE VISUALS
━━━━━━━━━━━━━━━━━━━━━━
Confirmed RSI divergences are also displayed directly on the main price chart.
Bullish divergence:
• connects the two corresponding price lows
• uses green
• uses a three-layer neon appearance
Bearish divergence:
• connects the two corresponding price highs
• uses red
• uses a three-layer neon appearance
The neon effect is created from:
• a wide transparent outer glow
• a medium inner glow
• a bright two-pixel core line
The neon line is a historical divergence visual.
It is not an entry line.
It is not a Stop Loss.
It is not a support or resistance guarantee.
The line is created only after the RSI pivot and divergence have been confirmed.
Older line objects are removed when the configured internal object limit is exceeded.
Deleting an older visual object does not change the underlying signal calculation.
━━━━━━━━━━━━━━━━━━━━━━
🎨 RSI DIVERGENCE AREA SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Inside the RSI pane, the script creates a filled polygon between:
• the actual RSI path from the first pivot to the second pivot
• the straight divergence line connecting those pivot endpoints
Bullish divergence uses a translucent green fill.
Bearish divergence uses a translucent red fill.
The purpose is to make the momentum disagreement easier to recognize than a thin line alone.
The fill does not measure probability.
A larger visual area does not automatically mean a stronger or more profitable divergence.
The fill depends on:
• RSI movement between the pivots
• distance between the pivots
• selected Pivot Lookback
• selected Confirmation Bars
• chart symbol
• timeframe
• loaded historical data
━━━━━━━━━━━━━━━━━━━━━━
🧭 TREND FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The trend filter determines whether a confirmed divergence is eligible to open a tracked trade.
Available modes are:
• Off
• EMA Trend
• Supertrend
• HTF Trend
The filter does not hide the confirmed divergence visuals.
It only changes whether the trade engine accepts the bullish or bearish entry.
This allows users to study:
• all confirmed divergence structures
• only the subset that passed the selected directional filter
The active trend reference is drawn on the main chart when a filter mode is selected.
The reference is green when the active filter state is bullish.
The reference is red when the active filter state is bearish.
━━━━━━━━━━━━━━━━━━━━━━
📈 EMA TREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
EMA Trend uses a fixed chart-timeframe EMA 200.
Bullish entries are allowed when:
• chart close is above EMA 200
Bearish entries are allowed when:
• chart close is below EMA 200
When price equals the EMA exactly, neither directional condition is satisfied.
The EMA filter is intended to align bullish divergence tracking with price above a long-term average and bearish divergence tracking with price below it.
It does not guarantee that price will continue in the filtered direction.
A divergence rejected by the EMA filter can still remain visible as a divergence visual.
━━━━━━━━━━━━━━━━━━━━━━
📊 SUPERTREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
Supertrend mode uses fixed internal parameters:
• ATR length: 10
• factor: 3.0
Bullish entries are allowed when the Supertrend state is bullish.
Bearish entries are allowed when the Supertrend state is bearish.
The Supertrend reference is displayed on the main chart.
The fixed parameters keep the public settings menu simple and make behavior consistent across users.
The Supertrend filter can react differently across symbols and timeframes because ATR and price structure differ.
A bullish Supertrend state does not guarantee a successful bullish divergence trade.
A bearish Supertrend state does not guarantee a successful bearish divergence trade.
━━━━━━━━━━━━━━━━━━━━━━
⏱️ HIGHER-TIMEFRAME TREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
HTF Trend compares the selected higher-timeframe close with its EMA 200.
Bullish entries are allowed when:
• higher-timeframe close is above higher-timeframe EMA 200
Bearish entries are allowed when:
• higher-timeframe close is below higher-timeframe EMA 200
The default higher timeframe is 240 minutes.
The request uses:
• gaps_off
• lookahead_off
The script does not intentionally request future higher-timeframe data.
However, the currently forming higher-timeframe candle can continue changing until that higher-timeframe candle closes.
This means the realtime HTF filter state can change while the active higher-timeframe candle is still developing.
Users who require fully closed higher-timeframe confirmation should account for this timing characteristic when interpreting realtime signals.
Changing the HTF Trend Timeframe recalculates historical eligibility.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
The indicator uses the close of the divergence-confirmation candle as the tracked entry reference.
A bullish trade is opened when:
• valid bullish divergence is confirmed
• no bearish divergence conflict exists
• bullish trend permission is true
• no trade is active
• no trade closed on the same candle
• ATR is valid
A bearish trade uses the mirrored conditions.
The entry is stored at close.
The script then calculates:
• ATR-based risk distance
• Stop Loss
• TP1
• TP2
• TP3
Only signals that actually open a tracked trade receive the main-chart BULLISH or SELL entry label.
A divergence visual without an entry label can therefore indicate:
• trend-filter rejection
• existing active trade
• same-candle direction conflict
• same-candle previous trade closure
• unavailable ATR
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
Risk distance is calculated as:
ATR × Stop Loss Distance.
Default settings:
• ATR Period: 14
• Stop Loss Distance: 2.0 ATR
Bullish trade:
Stop Loss = entry − risk distance
Bearish trade:
Stop Loss = entry + risk distance
ATR adapts the raw price distance to current market volatility.
The script does not examine:
• market structure below the bullish signal
• market structure above the bearish signal
• spread
• instrument tick value
• account size
• position size
• broker margin
• contract specifications
The ATR Stop Loss is a visual and statistical model.
It is not a broker order.
━━━━━━━━━━━━━━━━━━━━━━
🏆 TP1 / TP2 / TP3 MODEL
━━━━━━━━━━━━━━━━━━━━━━
The user selects the final TP3 target from 1R to 7R.
The default is 2R.
TP1 and TP2 are placed automatically inside the final target distance.
TP1:
one-third of the TP3 distance
TP2:
two-thirds of the TP3 distance
For a 3R TP3 setting:
• TP1 = 1R
• TP2 = 2R
• TP3 = 3R
For a 2R TP3 setting:
• TP1 ≈ 0.67R
• TP2 ≈ 1.33R
• TP3 = 2R
TP1 and TP2 are visual guide levels.
The current statistics engine does not close partial positions at TP1 or TP2.
It does not move Stop Loss to break even after TP1 or TP2.
It does not add partial R profit when TP1 or TP2 is touched.
Only TP3 is counted as a winning trade.
A Stop Loss is counted as -1R.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The trade engine maintains one active tracked position.
While a trade is active:
• new bullish divergence entries are not opened
• new bearish divergence entries are not opened
• divergence visuals can still appear
• historical divergence lines can still be drawn
This prevents overlapping tracked positions from affecting the statistics model.
A new trade is also prevented from opening on the same candle that the previous trade closes.
The next eligible divergence must occur on a later candle.
This design keeps each tracked result independent under the script’s internal accounting rules.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ TP3 / SL SAME-CANDLE HANDLING
━━━━━━━━━━━━━━━━━━━━━━
Historical OHLC candles do not reveal the exact sequence of every intrabar price movement.
A candle can contain both:
• the TP3 price
• the Stop Loss price
When both are touched inside the same candle, the script cannot know from OHLC data which level occurred first.
The engine uses a conservative rule:
Stop Loss receives priority.
The trade is recorded as a loss.
TP3 and Stop Loss checks begin on the candle after entry.
The entry candle cannot immediately close the tracked trade.
This avoids assuming an unknown movement sequence inside the entry candle.
The conservative priority rule can produce different outcomes from lower-timeframe or tick-based execution reconstruction.
━━━━━━━━━━━━━━━━━━━━━━
📦 TRADE BOX VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Each tracked trade creates two main-chart boxes:
Profit Box
Extends from entry to TP3.
Stop Box
Extends from entry to Stop Loss.
Bullish and bearish trades use the same green profit-area and red risk-area color logic.
While the trade remains active, the boxes extend to the current bar.
When the trade closes, the boxes stop at the exit candle and remain visible historically.
The boxes help visualize:
• entry timing
• risk distance
• final target distance
• trade duration
• exit candle
The boxes are chart drawings.
They are not broker orders.
Older boxes are deleted when the internal historical object limit is exceeded.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ ACTIVE AND HISTORICAL PRICE LABELS
━━━━━━━━━━━━━━━━━━━━━━
During an active tracked trade, the right side of the chart displays dynamic labels for:
• ENTRY
• SL
• TP1
• TP2
• TP3
Each label includes the current stored price.
The labels move to the newest bar while the trade remains active.
On the exit candle, the final prices remain visible for that calculation.
When the trade closes, permanent historical labels are created for:
• TP1
• TP2
• TP3
These historical labels remain attached to the completed trade’s right edge.
The purpose is to preserve the target-price structure after the active dynamic labels disappear.
Historical TP labels do not indicate that TP1 or TP2 was actually touched.
They display the planned target prices for the completed tracked trade.
The final result is determined only by TP3 or Stop Loss.
━━━━━━━━━━━━━━━━━━━━━━
✅ RESULT LABELS
━━━━━━━━━━━━━━━━━━━━━━
When TP3 is reached, the script prints:
TARGET HIT
The trade is counted as a win equal to the selected TP3 R value.
When Stop Loss is reached, the script prints:
SL
The trade is counted as a -1R loss.
Result labels are displayed at the corresponding exit price.
All visible chart labels use bold-italic typography.
Dark Mode label text uses pure white.
Light Mode uses dark text where required for contrast.
━━━━━━━━━━━━━━━━━━━━━━
🎨 THEME SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The indicator includes three theme modes:
• Dark Mode
• Light Mode
• Mobile Theme
Dark Mode
Designed for dark TradingView layouts.
It uses:
• black RSI-panel background
• dark dashboard surface
• white dashboard text
• pure-white chart-label text
• red brand accents
• green bullish visuals
• red bearish visuals
Light Mode
Designed for light TradingView layouts.
It uses:
• white RSI-panel background
• white dashboard surface
• dark dashboard text
• dark chart-label text where appropriate
• red brand accents
• adjusted divergence transparency
Mobile Theme
Designed for smaller screens.
It uses:
• compact main-chart labels
• smaller RSI labels
• tiny price labels
• a two-row dashboard
• Win Rate
• NET R
Mobile Theme does not display the full desktop statistics table.
Theme selection changes presentation.
It does not change the underlying divergence, trend-filter, or trade calculations.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
Dark Mode and Light Mode display the full bottom-right dashboard.
The header displays:
• RSI DIVERGENCE
• selected TP3 R value
• active Trend Filter
The full dashboard includes:
Status
Possible values:
• NO ACTIVE TRADE
• ACTIVE BUY
• ACTIVE SELL
Closed Trades
Number of completed tracked trades.
TP3 Wins
Number of trades that reached TP3 before Stop Loss under the script’s bar-touch rules.
Losses
Number of trades recorded at Stop Loss.
Win Rate
TP3 Wins divided by Closed Trades.
NET R
Gross Profit R minus Gross Loss R.
Gross Profit
Sum of winning TP3 R values.
Gross Loss
Number of losing trades expressed as R because every Stop Loss equals -1R.
Average / Trade
NET R divided by Closed Trades.
Profit Factor
Gross Profit R divided by Gross Loss R.
Mobile Theme displays only:
• Win Rate
• NET R
The dashboard is placed on the main chart even though the indicator calculates in a separate RSI pane.
━━━━━━━━━━━━━━━━━━━━━━
📊 STATISTICS METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━
The statistics are produced by the script’s internal bar-based trade tracker.
They are not imported from a broker.
They are not verified account results.
They are not TradingView Strategy Tester results.
Win Rate:
wins / closed trades
Gross Profit R:
wins × selected TP3 R
Gross Loss R:
losses × 1R
NET R:
Gross Profit R − Gross Loss R
Average R:
NET R / closed trades
Profit Factor:
Gross Profit R / Gross Loss R
When there are profitable trades but no recorded losses, the script displays 999 as a finite placeholder instead of mathematical infinity.
The statistics do not include:
• TP1 partial profits
• TP2 partial profits
• break-even exits
• trailing stops
• spread
• commission
• slippage
• swap
• latency
• order rejection
• partial fills
• position sizing
• account equity
• compounding
• taxes
Statistics depend on:
• loaded chart history
• selected symbol
• timeframe
• data provider
• Pivot Lookback
• Confirmation Bars
• Trend Filter
• HTF Trend Timeframe
• ATR Period
• Stop Loss multiplier
• TP3 target
• historical-data revisions
Changing any of these inputs can change historical results.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes static TradingView alert conditions for:
• Regular Bullish Divergence
• Hidden Bullish Divergence
• Regular Bearish Divergence
• Hidden Bearish Divergence
• BUY Entry
• SELL Entry
• TP3 Hit
• Stop Loss Hit
Regular bullish and bearish divergence are enabled in the current public configuration.
Hidden bullish and hidden bearish divergence logic is internally disabled.
The hidden alert choices can therefore appear in TradingView’s alert-condition list, but no hidden divergence event is produced while the internal hidden-divergence switches remain disabled.
The script also includes dynamic alert() calls for:
• BUY entry
• SELL entry
• TP3 hit
• Stop Loss hit
Dynamic BUY and SELL messages can include:
• tradewsamet identifier
• chart ticker
• chart timeframe
• entry price
• TP1 price
• TP2 price
• TP3 price
• Stop Loss price
• final R target
• active Trend Filter
This allows one TradingView alert using:
Any alert() function call
to receive all dynamic entry and result events.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
For a specific static event:
1. Add RSI Divergence Entry Engine to the chart.
2. Open TradingView’s Create Alert window.
3. Select the indicator as the condition.
4. Choose the required event.
5. Select the notification method.
6. Use an appropriate frequency.
7. Test the alert before relying on it.
For one combined dynamic workflow:
1. Add the indicator to the chart.
2. Open Create Alert.
3. Select RSI Divergence Entry Engine .
4. Select Any alert() function call.
5. Configure the delivery method.
6. Test BUY, SELL, TP3, and SL message handling.
When the script, settings, symbol, or timeframe changes materially, recreate existing alerts.
A TradingView alert can continue using the script snapshot stored when the alert was created.
Alerts are monitoring tools.
They do not execute, modify, or close broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add RSI Divergence Entry Engine to a standard candlestick chart.
2. Select Dark Mode, Light Mode, or Mobile Theme.
3. Begin with Pivot Lookback set to 5.
4. Begin with Confirmation Bars set to 1.
5. Observe the RSI-panel divergence structures.
6. Observe the matching neon price-pivot lines on the main chart.
7. Remember that the pivot visual becomes available only after right-side confirmation.
8. Distinguish the neon divergence line from the later tracked entry label.
9. Begin with Trend Filter set to Off when studying raw divergence frequency.
10. Test EMA Trend for chart-timeframe directional alignment.
11. Test Supertrend for volatility-based directional alignment.
12. Test HTF Trend for higher-timeframe EMA context.
13. Verify the selected HTF timeframe.
14. Review the main-chart trend reference.
15. Observe whether a BULLISH or SELL entry label is accepted.
16. Review ENTRY, SL, TP1, TP2, and TP3 prices.
17. Observe the profit and risk boxes.
18. Remember that TP1 and TP2 are visual only.
19. Review the final TARGET HIT or SL result.
20. Review dashboard Win Rate and NET R.
21. Compare Dark/Light full dashboard with Mobile Theme.
22. Use alerts for monitoring rather than blind execution.
23. Review broader market structure independently.
24. Review spread, liquidity, volatility, and news conditions.
25. Define personal account risk and position size.
26. Test the exact symbol, timeframe, and data feed personally used.
The indicator is designed for structured study and monitoring.
It should not be treated as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
🎨 Theme
Theme Mode
Dark Mode
Uses the full dark visual profile.
Light Mode
Uses the full light visual profile.
Mobile Theme
Uses compact labels and a two-row dashboard.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Signal Settings
Pivot Lookback
Controls the left-side pivot search width.
Default:
5
Higher values generally create larger and less frequent pivot structures.
Confirmation Bars
Controls the number of right-side completed candles required to confirm the RSI pivot.
Default:
1
Increasing the value increases confirmation delay.
Chart Signal Label Size
Controls the main-chart BULLISH and SELL entry-label size.
Available values:
• Tiny
• Small
• Normal
• Large
• Huge
Mobile Theme overrides the selected size with a compact layout.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Trend Filter
Trend Filter
Available modes:
• Off
• EMA Trend
• Supertrend
• HTF Trend
Off
Allows tracked bullish and bearish entries without directional trend filtering.
EMA Trend
Uses chart close relative to EMA 200.
Supertrend
Uses ATR 10 and factor 3.0.
HTF Trend
Uses selected higher-timeframe close relative to higher-timeframe EMA 200.
HTF Trend Timeframe
Selects the higher timeframe used by HTF Trend.
Default:
240 minutes
This setting has no effect when HTF Trend is not selected.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ Trade Management
ATR Period
Controls the ATR used for risk-distance calculations.
Default:
14
Stop Loss Distance (ATR)
Multiplies ATR to calculate the Stop Loss distance.
Default:
2.0
TP3 Target (R)
Selects the final target from 1R to 7R.
Default:
2R
TP1 and TP2 are calculated automatically from the TP3 distance.
All public input values are hidden from TradingView’s status line to reduce chart-header clutter.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
RSI, divergence, EMA, Supertrend, ATR, risk/reward targets, and trade statistics are established technical-analysis concepts.
These concepts are not unique by themselves.
The originality of RSI Divergence Entry Engine lies in the coordinated workflow applied to them:
fixed RSI calculation
→ confirmed oscillator pivots
→ price / RSI regular divergence comparison
→ pivot-distance validation
→ RSI-path divergence filling
→ main-chart three-layer neon pivot lines
→ optional chart or higher-timeframe trend filtering
→ one-active-trade state
→ confirmation-candle entry
→ ATR-normalized Stop Loss
→ proportional TP1 / TP2 placement
→ adjustable TP3 R target
→ conservative OHLC exit handling
→ permanent risk/reward history
→ historical target-price labels
→ theme-aware chart output
→ mobile-specific dashboard
→ internal R-based statistics
→ static and dynamic alert workflows
Distinctive implementation features include:
• separating divergence context from accepted tracked entries
• displaying the same confirmed divergence in the RSI pane and on the main chart
• filling the RSI path-to-divergence region
• using a three-layer neon price-divergence line
• preserving trade boxes after closure
• preserving TP1, TP2, and TP3 planned prices historically
• allowing multiple direction-filter models inside one entry workflow
• maintaining one tracked trade at a time
• applying conservative Stop Loss priority when TP3 and SL share a candle
• offering theme-specific dashboard behavior
• reducing the Mobile Theme dashboard to Win Rate and NET R
• supporting static conditions and combined dynamic alert() messages
• keeping public settings compact while documenting fixed internal values
The script is not a collection of unrelated indicators placed on one chart.
Every component supports the same objective: converting a confirmed RSI divergence into a transparent, filterable, volatility-mapped, historically reviewable entry framework.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
Signal frequency depends on:
• symbol
• timeframe
• data provider
• Pivot Lookback
• Confirmation Bars
• fixed 5–60 bar pivot-distance window
• Trend Filter
• HTF Trend Timeframe
• existing active-trade state
• ATR availability
• available historical data
Higher Pivot Lookback values can reduce frequency.
Higher Confirmation Bars values increase delay.
EMA Trend can reject counter-position signals relative to EMA 200.
Supertrend can change direction after price movement.
HTF Trend can remain sensitive to the currently developing higher-timeframe candle.
Only one tracked trade can be active.
A divergence can therefore be visible without becoming a tracked trade.
TP1 and TP2 are not partial exits.
Historical TP1, TP2, and TP3 labels display planned prices, not proof that every level was touched.
Dashboard statistics use loaded chart history only.
Different brokers or exchanges can produce different:
• highs
• lows
• closes
• RSI pivots
• ATR values
• divergence signals
• trend-filter states
• TP3 / SL outcomes
• dashboard statistics
Changing the chart’s available history can change the first eligible pivot pair and all later trade-state sequencing.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not execute orders.
It does not place broker Stop Loss orders.
It does not place broker Take Profit orders.
It does not calculate position size.
It does not calculate account risk.
It does not include spread.
It does not include commission.
It does not include slippage.
It does not include latency.
It does not include swap or financing.
It does not model partial fills.
It does not model order rejection.
It does not model contract specifications.
It does not model tick-by-tick execution.
It uses historical OHLC bars.
It cannot always determine whether TP3 or SL occurred first inside one candle.
It resolves same-candle TP3 / SL ambiguity in favor of Stop Loss.
It does not record TP1 or TP2 as partial profit.
It does not move Stop Loss to break even.
It does not trail Stop Loss.
It maintains one active tracked trade.
It can ignore otherwise valid new entries while a trade is active.
It uses pivot confirmation.
Pivot visuals are not available on the original pivot candle in realtime.
RSI pivot visuals are placed at the historical pivot location after confirmation.
Main-chart neon lines are created after divergence confirmation.
The HTF filter can change while the current higher-timeframe candle remains open.
A confirmed divergence can fail.
A trend-aligned divergence can fail.
A larger divergence area does not guarantee a stronger result.
A neon divergence line is not guaranteed support or resistance.
A TARGET HIT label is not broker-verified execution.
Dashboard statistics are not audited performance.
Profit Factor displays 999 when wins exist without recorded losses.
Changing settings recalculates historical conditions.
Changing symbol, timeframe, provider, or available history can change output.
Alert delivery depends on TradingView and user configuration.
Alerts do not guarantee broker execution.
For these reasons, the indicator should be used as an educational decision-support and chart-review tool, not as a standalone automated strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• understand basic RSI divergence
• want regular bullish and bearish divergence visuals
• prefer pivot-confirmed structures
• want divergence displayed in both RSI and price
• want a clear neon main-chart divergence line
• want optional trend filtering
• use EMA 200
• use Supertrend
• use higher-timeframe direction
• want ATR-based risk mapping
• want adjustable R targets
• want historical risk/reward boxes
• want historical planned TP prices
• want one-active-trade statistics
• want Dark, Light, and Mobile themes
• want static alerts
• want one combined dynamic alert
• understand that chart statistics are not verified trading results
It may be less suitable for users who:
• want signals on the unconfirmed pivot candle
• want no pivot delay
• want hidden divergence enabled publicly
• want every divergence to open a trade
• want multiple overlapping tracked trades
• want partial TP accounting
• want automatic break-even management
• want trailing stops
• want tick-level backtesting
• want verified Strategy Tester results
• want broker execution
• want guaranteed reversal signals
• expect a high Win Rate to continue unchanged
• expect the HTF filter to remain fixed before the higher-timeframe candle closes
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For studying raw divergence behavior:
• use Trend Filter Off
• begin with Pivot Lookback 5
• begin with Confirmation Bars 1
• observe divergence visuals before evaluating trades
• distinguish pivot location from confirmation timing
For trend-aligned divergence:
• test EMA Trend
• test Supertrend
• compare signal frequency
• review whether the filter removes useful countertrend setups
For broader directional context:
• test HTF Trend
• use a higher timeframe meaningfully above the chart timeframe
• remember that the active HTF candle can change before closing
For trade mapping:
• begin with ATR 14
• begin with Stop Loss Distance 2.0 ATR
• begin with TP3 2R
• remember that TP1 and TP2 are visual only
• review same-candle TP3 / SL cases conservatively
For chart clarity:
• use Dark Mode on dark chart layouts
• use Light Mode on light chart layouts
• use Mobile Theme on small screens
• adjust the main-chart entry-label size
• use neon divergence lines as context, not automatic entries
Always:
• wait for divergence confirmation
• review broader price structure
• review liquidity and volatility
• review session conditions
• review news risk
• define personal account risk
• define personal position size
• test the exact symbol and timeframe
• verify alerts before relying on them
• remember that every divergence can fail
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine is published as an educational RSI-divergence, directional-filtering, ATR trade-mapping, historical-visualization, and alert tool.
The purpose of this description is to explain:
• how RSI is calculated
• how RSI pivot lows and highs are confirmed
• how Pivot Lookback affects structure selection
• how Confirmation Bars affect delay
• how the fixed pivot-distance window works
• how regular bullish divergence is identified
• how regular bearish divergence is identified
• how divergence is displayed inside the RSI pane
• how the RSI divergence area is filled
• how corresponding price pivots are displayed with neon lines
• when the pivot visuals become available
• why pivot visuals appear at historical pivot locations
• why tracked entries are placed on confirmation-candle close
• how the trend filter affects entries without hiding divergence context
• how EMA Trend works
• how Supertrend works
• how HTF Trend works
• how currently forming higher-timeframe candles affect realtime context
• how ATR risk distance is calculated
• how Stop Loss is placed
• how TP1, TP2, and TP3 are calculated
• why TP1 and TP2 are visual only
• why only TP3 counts as a win
• how one-active-trade handling works
• how same-candle TP3 / SL ambiguity is resolved
• how historical trade boxes are retained
• what historical TP labels represent
• how Dark Mode, Light Mode, and Mobile Theme differ
• what the dashboard displays
• how Win Rate, NET R, Average R, and Profit Factor are calculated
• why the statistics are not broker-verified
• what static alert conditions are available
• how “Any alert() function call” works
• what the script does not simulate
• why the combined modules form one coordinated workflow
The script is designed to support structured review.
It does not promise profitable results.
It does not remove market risk.
It does not replace independent analysis.
It does not replace personal risk management.
━━━━━━━━━━━━━━━━━━━━━━
🕒 REPAINTING, BACKPLOTTING, AND TIMING DISCLOSURE
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine uses pivot functions.
Pivot confirmation requires future candles relative to the original pivot location.
The number of required right-side candles is controlled by Confirmation Bars.
The script does not know that a pivot exists on the original pivot candle.
After the right-side candles close:
• the pivot becomes confirmed
• the divergence can be calculated
• the RSI divergence line is displayed at the historical pivot locations
• the RSI divergence label is displayed at the confirmed pivot location
• the main-chart neon line connects the corresponding historical price pivots
This historical placement is a visual back-reference to the confirmed pivot structure.
It must not be interpreted as a realtime signal that was available on the original pivot candle.
The tracked trade entry is not backdated.
The tracked trade opens at the close of the later confirmation candle when all entry rules are valid.
The main-chart BULLISH or SELL entry label appears on that confirmation candle.
Trade outcome checks begin on the following candle.
The HTF Trend request uses lookahead_off.
It does not intentionally access future higher-timeframe values.
However, the current higher-timeframe candle can continue developing in realtime until it closes.
Historical results can change when:
• Pivot Lookback changes
• Confirmation Bars changes
• Trend Filter changes
• HTF Trend Timeframe changes
• ATR settings change
• TP3 target changes
• chart symbol changes
• timeframe changes
• exchange or broker feed changes
• historical data is revised
• available chart history changes
Confirmed chart-bar calculations reduce unfinished current-chart-candle changes.
They do not remove pivot confirmation delay, historical pivot placement, HTF live-candle variation, data-feed differences, or market risk.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, accounting, or tax advice.
No indicator can guarantee future results.
Markets are uncertain.
Momentum changes.
Volatility changes.
Trend changes.
Liquidity changes.
Historical chart behavior does not ensure future performance.
Every user is responsible for their own:
• analysis
• validation
• symbol selection
• timeframe selection
• trend-filter selection
• execution planning
• Stop Loss placement
• target planning
• position sizing
• risk management
• alert configuration
• trading decisions
• broker execution
• legal obligations
• tax obligations
The RSI pivots, divergence lines, divergence fills, neon price-pivot lines, trend references, BULLISH labels, SELL labels, ENTRY labels, Stop Loss levels, TP1 levels, TP2 levels, TP3 levels, trade boxes, historical target labels, TARGET HIT labels, SL labels, dashboard statistics, Win Rate, NET R, Average R, Profit Factor, and alerts are visual analysis tools only.
A bullish divergence is not a guaranteed reversal.
A bearish divergence is not a guaranteed reversal.
An EMA-aligned signal is not guaranteed to succeed.
A Supertrend-aligned signal is not guaranteed to succeed.
A higher-timeframe aligned signal is not guaranteed to succeed.
A TARGET HIT label is not proof of an actual broker fill.
An SL label is not proof of an actual broker fill.
The dashboard is not verified account performance.
The statistics are not audited.
The script does not include spread, commission, slippage, latency, financing, partial fills, order rejection, position sizing, account equity, or broker-specific execution behavior.
Use the script as a structured RSI-divergence review, directional-filtering, trade-mapping, and monitoring framework—not as a promise of profitability or a substitute for independent judgment.
Gösterge

Gösterge

Auto-ATR Volatility Spike & Trend Tracker [BigBeluga]Auto-ATR Volatility Spike & Trend Tracker is an institutional-grade algorithmic trend-following terminal engineered for TradingView. It is specifically built to isolate high-momentum breakout anomalies (spikes) from ordinary noise and anchor a dynamic, risk-managed trailing stop-loss directly to the underlying structural expansion.
By merging volumetric price momentum with an adaptive Average True Range (ATR) detection framework, this indicator completely redefines how breakout traders enter and manage trends. Instead of reacting blindly to standard moving average crosses, the system utilizes an execution state machine that locks onto systemic market expansion, tracks trend health via dynamic midpoint lines, and protects capital with a trailing protection line.
🔵 CHANNELS & ARCHITECTURAL CORE ENGINE FEATURES
1. Dual-Mode Spike Detection System
Auto ATR Volatility Engine: Automatically adapts to varying market conditions. By cross-referencing incoming candle structures against an ATR Length multiplier baseline, the indicator filters out flat consolidation periods and flags abnormal, high-liquidity volume expansions that signify true institutional participant footprints.
Fixed Percentage Breakout Mode: For traders operating in highly structured assets with predictable daily limits, this module locks onto absolute price change thresholds ( Fixed Spike Threshold % ), isolating momentum moves that pierce predefined parameters.
Wick-to-Body Range Toggle: Allows you to switch calculations to run from either the raw candle body (Open to Close) or the full extreme range ( Calculate From Wicks (High/Low) ). This isolates clean structural closes while adjusting to high-volatility liquidity sweeps.
2. Predictive Mid-Level Benchmarks & Spacing Visuals
Dynamic Mid Level Dash Lines: When a valid trend spike is verified, the engine immediately draws a horizontal midpoint line extending from the center of the candle ( Display Mid Level Dash Line ). This centerline serves as an immediate structural macro floor or ceiling; as long as price retains this boundary, the primary breakout impulse remains historically intact.
Measurement Arrow Guides & Measurement Labels: Automatically draws measurement arrow guides along with real-time text percentage indicators directly over the breakout candle ( Display Size % Labels & Arrow Lines ). This gives you instant clarity on the volatility profile without needing to use manual drawing tools.
3. Algorithmic State Machine & Trailing Protection
Volatility-Adjusted Trailing Stops: Once a breakout trend is established, the indicator deploys a step-calculated trailing line based on your Trailing ATR Multiplier . This line is engineered to trail tightly beneath bullish expansions or above bearish flushes, keeping you safely in the macro trend while mitigating downside variance.
Trend Interlock Protection: The underlying state machine features built-in trigger restrictions that lock execution while a trend is dominant. This prevents counter-trend false entries or premature reversals, keeping your focus strictly on the dominant structural path.
Theme Overwrite Candlesticks: Completely recolors the active layout chart workspace bars using vivid, customized hex-theme presets ( Bullish/Bearish Theme Colors ) the exact moment an abnormal spike is validated.
4. Persistent Macro Statistics Dashboard Matrix
Top-Right Analytics HUD Table: Instantly maps out a high-performance database grid showing critical data points from the most recent historical market expansions.
Real-Time Metrics Monitoring: Explicitly stores and displays the precise directional Spike Type , Size (%) , and exact entry execution Price for both bullish and bearish cycles, providing a reliable quantitative snapshot of the asset's structural strength.
🔵 SYSTEMATIC EXECUTION STRATEGIES & RISK INTERPRETATION
Midpoint Re-test Accumulation Plays: When a powerful up-spike forces a market breakout, do not chase the initial overextended move. Instead, wait for a constructive pullback toward the extended dynamic dashed midline. If price builds a base and prints a clean rejection candle at this level, it signals a premium, low-risk continuation entry aligned with institutional order flow.
Trailing ATR Invalidation Exits: The trailing stop-loss line acts as your absolute trend line invalidation boundary. In a powerful bullish expansion, the indicator will continuously trail and lock in accrued profit beneath the recent low points. A clean daily close crossing beneath this line confirms an official trend termination, signaling an immediate exit to protect your capital.
Breakout Sizing Divergences: Cross-reference the live metrics dashboard data to spot exhausting trends. If an asset is pressing higher but newly generated bullish spikes show smaller percentage sizes compared to the historical records on your HUD table, it exposes fading momentum—frequently warning of an impending reversal or structural distribution phase.
🔵 INTERFACE CONFIGURATION AND PARAMETERS
Detection Mode Controls: Choose between Auto ATR or Fixed % settings and specify lookback periods to customize the indicator to match any asset class, volatility cycle, or execution chart timeframe.
Visibility Filters Overrides: Independently toggle midlines, trailing stops, background cloud color fills, or measurement labels to maintain a clean, distraction-free charting interface.
Theme Personalization Modifiers: Fully adjust color properties for upward spikes, downward spikes, buy/sell arrows, and trailing lines to blend seamlessly into your dark or light workspace layout themes.
Transform your charting workspace from speculative guessing into an automated, volatility-tracked breakout environment with the Auto-ATR Volatility Spike & Trend Tracker terminal. Gösterge

Uptrick: Flow Expansion TrendIntroduction
Uptrick: Flow Expansion Trend (FET) is an overlay tool built around an efficiency-adaptive midline that speeds up or slows down based on how directional recent price movement has been. The midline is paired with a volatility-based signal boundary and a minimum flow-strength filter to determine confirmed trend flips, and the script includes a market-state read that classifies current conditions as directional, developing, or compressed. Signal labels can be anchored to price highs and lows, a fixed ATR distance from price, or the midline itself.
Originality
This script's core is an efficiency ratio, calculated as the net price movement over a lookback divided by the sum of all bar-to-bar movement over that same lookback, which produces a value between 0 and 1 describing how directional versus choppy the recent path has been. Rather than using this ratio as a standalone oscillator, it is fed into the smoothing constant of the midline itself, so the midline's responsiveness continuously adjusts between a fast and slow smoothing constant based on current market efficiency. This is what separates the midline from a standard moving average, since it does not use a fixed lookback response but instead reshapes itself with the character of the move.
The signal boundary distance around the midline is also adaptive: it widens or narrows based on the same efficiency reading, so the distance price must travel to trigger a trend flip contracts in efficient, directional conditions and expands in choppier ones. A trend flip additionally requires a minimum flow-strength threshold, a normalized measure of the midline's own rate of change relative to ATR, so a boundary breach alone is not sufficient to flip the trend without accompanying follow-through in the midline's slope.
Combining an adaptive midline, an adaptive signal boundary, and a flow-strength confirmation filter into a single confirmed-trend mechanism is the original contribution of this script, since each of the three components is derived from the same efficiency and volatility inputs but serves a distinct role in preventing premature or noise-driven flips. The selectable signal anchor further separates the trend calculation from the signal display, letting traders choose whether labels sit at the bar's high/low, a fixed ATR offset from price, or directly on the midline, without altering the underlying trend logic in any way.
Features
Efficiency-adaptive midline that adjusts its smoothing speed based on how directional recent price action has been
Adaptive signal boundary that widens in choppy conditions and narrows in directional conditions
Minimum flow-strength filter required alongside a boundary breach to confirm a trend flip
Confirmed-bar trend state calculation to avoid intrabar repainting of the trend flip
Selectable signal anchor for up and down labels: high/low, fixed ATR distance from price, or midline
Adjustable ATR distance value when the ATR distance anchor is selected
Up and down trend signal labels
Optional candle coloring based on the most recent confirmed signal
Adjustable midline width
On-chart dashboard showing trend, market efficiency percentage, flow strength, market state classification, bars since the last signal, and current signal anchor mode
Four selectable dashboard positions
Four alert conditions: up signal, down signal, any trend signal, and market becoming directional
Inputs
Trend Engine: source, trend length, signal distance multiplier, minimum signal strength threshold.
Signals: show/hide up and down signals, signal anchor mode, signal ATR distance.
Visuals: candle coloring toggle, midline width, show/hide dashboard, dashboard position.
How It Works / How to Use
The script measures how efficiently price has moved over the trend length by comparing net displacement to total path length traveled. This efficiency value continuously reshapes the midline's smoothing speed, so the midline hugs price more closely in strong directional runs and lags more in choppy conditions. An ATR-based boundary is placed around the midline, with its distance also scaled by the same efficiency reading. A trend flip is confirmed only when price closes beyond this boundary on a confirmed bar and the midline's own rate of change exceeds the minimum flow-strength threshold in that direction.
Once a flip is confirmed, the up or down label is placed according to the chosen signal anchor: at the bar's high or low, at a fixed ATR distance beyond price, or directly on the midline. This is purely a display choice and does not affect when or why a trend flip occurs.
Traders can use the midline's slope and color for ongoing directional bias, the up and down signals for confirmed flips, and the dashboard's market-state classification to gauge whether current conditions are more suited to trend-following or more likely to produce choppy, range-bound behavior.
Conclusion
Uptrick: Flow Expansion Trend combines an efficiency-adaptive midline, a matching adaptive signal boundary, and a flow-strength confirmation filter into a single trend-following overlay, giving traders a trend read that reshapes itself with current market conditions rather than relying on a fixed-speed average, with flexible signal placement to suit different charting preferences.
Disclaimer
This script is provided for informational and educational purposes only and does not constitute financial advice. Past performance, whether shown historically or implied through the script's logic, does not guarantee future results. Always perform your own due diligence and risk management before making trading decisions. Gösterge

Dynamic Market Metrics [MarkitTick]💡 All-in-one market analysis suite designed to unify trend evaluation, momentum measurement, and dynamic risk management into a single, cohesive interface. Rather than relying on a scattered array of disparate indicators, this unified system synthesizes multiple dimensions of market data—including volatility, money flow, and higher-timeframe confluence—to provide a comprehensive structural overview of the current asset. It visually maps trend direction, plots actionable trade risk levels, and features a real-time heads-up display (HUD) dashboard to track critical market internals without cluttering the charting workspace.
● Overview
✨ Originality and Utility
Traditional technical analysis often forces traders to compromise between lagging trend followers and noisy momentum oscillators. This script solves that divergence by integrating an adaptive trend baseline with volume-weighted momentum constraints. It is unique in its ability to automatically map forward-looking risk-to-reward brackets the moment a structural shift is confirmed. Instead of guessing where to place stops and targets, the system calculates these thresholds dynamically based on real-time volatility, offering a strictly objective framework for trade management. This eliminates the need for messy chart mashups, replacing them with a highly organized, singular logic engine.
🔬 Methodology and Concepts
The core engine of this tool operates on an abstracted synthesis of price volatility and money flow dynamics.
The primary trend anchor is established by evaluating average true price ranges against the flow of capital entering or exiting the asset.
Rather than relying on simple price crosses, the baseline only shifts when confirmed by underlying volume and momentum pressures.
A specialized breakout override mechanism constantly monitors for abnormal momentum spikes. If a sudden surge in directional velocity exceeds the baseline volatility threshold, the system immediately recalculates the trend state to adapt to the new market structure.
Trade levels are generated using a dynamic risk parity model. The system measures the precise distance between the confirmed entry trigger and the structural invalidation point, projecting synchronized target tiers that maintain strict mathematical risk-to-reward ratios.
All higher-timeframe data integration is strictly coded using offset historical referencing, ensuring absolute data integrity and preventing any future leakage or repainting artifacts.
🎨 Visual Guide
The script utilizes a clean, professional aesthetic, heavily reliant on dynamic colors and structured dashboard elements.
• The Trend Anchor and Cloud
Trend Line: A distinct, segmented line that tracks the primary market direction. It colors dynamically based on the active state (Bullish, Bearish, or Neutral).
Dynamic Cloud: A semi-transparent filled area bridging the primary trend line and a smoothed reference baseline. The thickness of this cloud visually represents the immediate strength and momentum of the trend.
Candle Coloring: Chart candles are painted to match the active trend state, providing instant visual alignment with the underlying engine.
• Trade Levels and Signals
Signal Markers: Minimalist labels appear above or below the price action to indicate confirmed structural shifts.
Stop Loss (SL) Line: A solid line representing the exact invalidation point of the active trend.
Entry Line: A dashed line marking the exact price where the signal was confirmed.
Take Profit (TP) Lines: A series of three dashed lines representing incremental target zones.
Risk/Reward Fills: Shaded background zones visually map the risk area (Entry to SL) against the reward area (Entry to TP3), allowing for immediate visual risk assessment.
• The HUD Dashboard
Located in the top right corner, this data table provides a real-time read of market internals:
Trend State & HTF Context: Displays the current directional bias on both the local and higher timeframes.
Entry, Target, and SL: Prints the exact numerical values for the active trade parameters.
Momentum & Money Flow: Visual progress bars indicating the current intensity of price movement and capital flow.
Volatility: Indicates whether the market is currently in a state of expansion or contraction.
Trend Age: A counter showing exactly how many bars have elapsed since the current trend began.
📖 How to Use
The system is designed to be highly objective. Monitor the chart for a confirmed signal marker, which indicates a shift in the underlying structural trend. Once a signal fires, the script will automatically render the Entry, Stop Loss, and Take Profit levels.
Validation: Before considering the signal, check the HUD Dashboard. A high Momentum score and an aligned Higher Timeframe (HTF) Context significantly increase the probability of continuation.
Execution: Use the exact printed Entry line for placement. The Stop Loss line dictates the hard invalidation point where the premise of the trend is broken.
Management: As price moves in the anticipated direction, manage the position by scaling out or moving protective stops as the asset crosses the TP1, TP2, and TP3 thresholds.
Breakouts: If a sudden momentum burst triggers an override, the trend state will flip immediately. Treat these as aggressive volatility expansions that require tighter risk management.
⚙️ Inputs and Settings
The settings panel is modularized for precise user control:
• Core & Breakout
ATR Mult & Length: Adjusts the core sensitivity of the volatility engine. Lower values create a tighter, more reactive baseline.
BO Override & Sens: Toggles the momentum breakout detection and dictates how much abnormal velocity is required to override the primary trend.
• Higher Timeframe (HTF)
Show HTF & TF: Enables the integration of a secondary, longer-term timeframe to act as a directional filter.
• Trade Tools & Cloud
Show Trade Levels: Toggles the rendering of the dynamic Entry, SL, and TP lines.
Cloud Settings: Controls the length, transparency, and rendering of the visual trend cloud and candle coloring.
• Alerts & Colors
JSON Action Strings: Allows users to input custom formatted strings for Long, Short, and Close actions, perfectly integrating with automated third-party execution platforms.
Colors: Fully customizable palettes for all lines, fills, dashboards, and signal markers.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The architectural foundation of this system rests on auction market theory and the statistical properties of volatility clustering. Financial markets operate through continuous auctions where price discovery is driven by the aggressive absorption of resting liquidity. This engine abstracts that process by measuring the standard deviation of price excursions—quantifying the asset's true range—and mapping it against the directional flow of capital.
By analyzing the divergence between pure price action and volume-weighted accumulation, the system identifies the true mean of value. When price deviates beyond these statistical bounds accompanied by extreme momentum, it signals a structural paradigm shift rather than a standard mean-reversion event. Furthermore, the embedded risk parity model abandons static numerical thresholds in favor of dynamic proportional scaling. The reward brackets are continuously mathematically linked to the localized volatility of the anchor point, ensuring that the risk-to-reward distribution remains statistically constant regardless of the asset's current expansion or contraction phase.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Gösterge

Dynamic Range Pro [The_lurker]Dynamic Range Pro detects horizontal price-consolidation zones and grades
the quality of the breakout that follows — not a plain buy/sell signal, but
a transparent, live verdict on how much to trust it.
It is also a ground-up evolution of my earlier indicator, Dynamic Range Finder
While that tool relied on volume filters, TP/SL levels, and a stack of optional indicators, Dynamic Range Pro was rebuilt around a single specific question: is this consolidation genuinely real, and how good was the break that followed? Every gate and score below exists to answer one specific part of that question, and each has been tested on real historical data — not just code built on intuition.
🔑 AT A GLANCE
🔹 Four independent formation gates, not just an ATR box
🔹 Two synchronized range definitions — pick which one triggers signals
🔹 A graded breakout verdict instead of a flat buy/sell
🔹 A pre-breakout quality score that updates before any signal fires
🔹 Every claim below is backed by real backtested data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT MAKES IT DIFFERENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most range indicators draw a single box from average price ± ATR and treat any close beyond it as a signal. Dynamic Range Pro adds three things most of them ignore entirely:
1️⃣ Smarter detection
A four-gate filter that rejects ranges a plain ATR test would wrongly accept — including the exact scenario where a sharp move inflates ATR enough to disguise an unstable window as a valid range.
2️⃣ A second, independent box
A close-based range you can promote to be the actual breakout trigger instead of the ATR box — no fixed rule, your choice.
3️⃣ A graded verdict, not a flat signal
Every breakout is scored across five factors into Strong / Inconclusive / Likely Trap, so you see the reasoning, not just an arrow.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚦 FOUR-GATE RANGE DETECTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
A range is only confirmed when all four of these agree on the same bar:
1️⃣ ATR Containment
Recent closes stay within average price ± ATR × multiplier. The standard test nearly every range tool uses.
2️⃣ Horizontality
The correlation between close price and time over the lookback window stays below a threshold, filtering out windows that are quietly trending rather than truly sideways.
3️⃣ Absolute Amplitude Gate
The gate most tools miss. After a sharp move, ATR itself balloons, which can make gate 1 pass even for a range that clearly isn't one — a wider ATR band is simply easier to stay inside. This gate checks the actual high-to-low spread of the window as a plain percentage of price, independent of ATR, so an inflated ATR reading can no longer disguise a genuinely wide, unstable window as a valid range.
4️⃣ Entry-Slope Gate
Checks the price move across the first few candles of the window specifically. A window that starts mid-collapse and simply hasn't finished collapsing yet fails this gate even if the rest of the window looks calm.
🔸 Optional: Prior-Trend Filter
ADX measured at the window's starting edge can further restrict detection to ranges that formed after a genuine trend rather than from a standing start — useful for trend-then-consolidation strategies.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 TWO BOXES, YOUR CHOICE OF TRIGGER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Dynamic Range Pro tracks two boxes at once:
1️⃣ Main Box (ATR-based)
The standard range: average price ± ATR × multiplier. The classic definition every range tool uses, and the default breakout trigger.
2️⃣ Inner Box (Close-based)
A second, independent box built purely from the highest and lowest closing prices reached during formation — ignoring wicks entirely. It gives a tighter, noise-resistant read on where price actually settled.
🔀 Box Mode — choosing the trigger
Display either box, both together, or promote the Inner Box to be the actual breakout trigger instead of the Main Box. Triggering on the Inner Box produces an earlier, narrower breakout definition — useful if you want to react before price clears the full ATR band, at the cost of more frequent signals.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 GRADED BREAK-QUALITY VERDICT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Instead of a plain buy or sell with no context, every confirmed breakout is
scored across five factors:
1️⃣ Trend strength (ADX)
Healthy within a defined range, overheated above it.
2️⃣ Momentum saturation (RSI)
Near-saturation in the breakout direction counts against the move.
3️⃣ Breach depth
How far the close cleared the boundary, in box-height units.
4️⃣ Pre-formation dispersion
How active the range was before the break, frozen at formation.
5️⃣ Directional flow alignment (DI spread)
Whether the directional-movement spread confirms or contradicts the
breakout direction.
Each factor votes toward a Strong / Inconclusive / Likely Trap verdict. You see the full breakdown on the chart — live during formation, frozen the moment the break confirms — so you can judge which factors are driving the call rather than trusting a closed label.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏁 READING THE BOTTOM LINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The last row of the table condenses everything above it into one plain-language line that updates live. It only ever shows one of five states:
1️⃣ No box currently
No active or recently broken range exists — nothing to report yet.
2️⃣ Range active — awaiting break
A valid range currently exists, but price hasn't tested either boundary yet, so there's nothing to score yet.
3️⃣ ✅ Strong break
The five Break-Quality factors net to a score at or above the "strong" threshold — most factors support continuation.
4️⃣ ⚖️ Mixed (score shown)
The score lands between the strong and trap thresholds — factors are pulling in different directions, worth extra caution.
5️⃣ ⚠️ Likely trap
The score falls at or below the "trap" threshold — most factors point to exhaustion or reversal risk.
🔸 The ◷ symbol
When ◷ appears before a verdict, price is still breaching the boundary intrabar and the candle hasn't closed yet — a live, unconfirmed preview that can still change. Once the candle closes and the break is confirmed, ◷ disappears and the verdict locks in.
Both the "strong" and "trap" score thresholds are adjustable in settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧬 RANGE INTEGRITY SCORE — before the break happens
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The layer I find most exciting conceptually: a live 0-100 score describing how "clean" a forming range actually looks, computed continuously before any breakout occurs, from four independent angles:
1️⃣ Path noise
How much the close zigzagged relative to the window's total range.
2️⃣ Candle cohesion
How large individual candles are relative to the window.
3️⃣ Dispersion trend
Whether volatility is tightening or loosening over time.
4️⃣ Edge-touch count
How many times price tested the eventual boundary without breaking it.
This answers a different question than the Break-Quality Verdict does — not "how strong was the break," but "how trustworthy is this range in the first place" — and it updates live as the range develops, well before any signal fires.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 BUILT ON REAL DATA, NOT JUST INTUITION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Every gate and score in this script has been tested against real 4H data across 19-20 Binance pairs, roughly 440-620 historical range/breakout events depending on the test. I publish exactly what that testing found, including where it didn't confirm my expectations:
✅ The prior-trend ADX filter measurably sharpens detection quality on the tested sample.
⚠️ Three of the five Break-Quality factors (RSI level, ADX magnitude, dispersion) did not show a measurable independent relationship with what happened after the break. They remain in the score as a transparent, chart-readable checklist rather than a claimed predictive edge — you see exactly which factors tipped any verdict and weigh them yourself.
📈 The Range Integrity Score showed a small, positive, not-yet-statistically-significant relationship with post-break continuation (r = +0.10, p = 0.20, n = 176) — a promising direction, not a proven signal yet, which is exactly why it's a display-only layer with no influence on alerts or box formation.
This is not a "trust the backtest" pitch — it's the opposite. Everything above is a starting point for your own judgment, not a replacement for it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ PRACTICAL FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌐 Full Arabic/English toggle for the on-chart table and BUY/SELL labels (settings and alert text are bilingual either way)
🔔 BUY/SELL alerts, plus an optional intrabar "live breach" alert — early, purely informational, before the candle closes
📦 Historical range boxes are preserved cleanly across multiple formations, with no overlapping clutter
🎨 Every color, line width, and line style is customizable
🔒 All signals fire strictly on confirmed candle closes — no repainting, no lookahead
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🗣️ INTERFACE LANGUAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Defaults to English. Switch "Table language" to Arabic in settings if you
prefer. Arabic-mode glossary:
Prior trend = الاتجاه السابق
Trend strength (ADX) = قوة الاتجاه
Break direction = اتجاه الكسر
Direction match = مطابقة الاتجاه
Breach depth = عمق الاختراق
Range dispersion = تشتت النطاق
Break verdict = تقييم الكسر
Range/entry % = امتداد/دخول %
Range integrity = تكامل النطاق
Range age = عمر النطاق
BUY/SELL = شراء / بيع
═════════════════════════════════════════════════════════════
⚠️ DISCLAIMER
═════════════════════════════════════════════════════════════
This indicator is for educational and analytical purposes only. It does not constitute financial, investment, or trading advice. Use it alongside your own strategy and risk management. Neither TradingView nor the developer is responsible for any financial decisions or losses.
══════════════════════════════════════════════════════════
══════════════════════════════════════════════════════════
Dynamic Range Pro
أداة تكتشف مناطق التوحيد السعريّ الأفقيّة ، وتُقيِّم جودة الكسر الذي يليها — لا مجرّد إشارة شراء أو بيع ، بل تقييم حيّ وشفّاف لمدى
الثقة به.
وهو أيضًا تطوير جذري كامل لمؤشّري السابق Dynamic Range Finder
بينما اعتمدت تلك الأداة على فلاتر الحجم ومستويات الجني/الخسارة وحزمة من المؤشرات الاختياريّة ، أُعيد بناء Dynamic Range Pro حول سؤال واحد محدّد: هل هذا التوحيد السعريّ حقيقيّ فعلًا ، وما مدى جودة الكسر الذي تلاه ؟
كل بوابة وكل درجة أدناه وُجدت للإجابة على جزء محدّد من هذا السؤال ، واختُبرت فعليًّا على بيانات تاريخيّة حقيقيّة — لا مجرّد كود مبنيّ على الحدس .
🔑 نظرة سريعة
🔹 أربع بوابات تكوين مستقلّة ، لا مجرّد صندوق ATR
🔹 تعريفا نطاق متزامنان — اختر أيّهما يُطلق الإشارات
🔹 تقييم متدرّج للكسر بدل شراء/بيع مسطّح
🔹 درجة جودة قبل الكسر تتحدّث قبل أيّ إشارة
🔹 كل ادّعاء أدناه مدعوم ببيانات باك-تست حقيقيّة
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 ما الذي يميّزه فعليًّا
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
معظم مؤشّرات النطاق ترسم صندوقًا واحدًا من متوسط السعر ± ATR وتعتبر أيّ إغلاق خارجه إشارة . يضيف Dynamic Range Pro ثلاثة أمور يتجاهلها أغلبها كليًّا :
1️⃣ كشف أذكى
فلتر بأربع بوابات يرفض النطاقات التي كان اختبار ATR وحده سيقبلها خطأً ، بما في ذلك السيناريو تحديدًا حين تُضخِّم حركة حادّة قيمة ATR بما يكفي لتمويه نافذة غير مستقرّة كنطاق صالح.
2️⃣ صندوق ثانٍ مستقلّ
نطاق قائم على الإغلاق يمكنك ترقيته ليكون مصدر الكسر الفعليّ بدل صندوق ATR لا بقاعدة ثابتة — باختيارك .
3️⃣ تقييم متدرّج، لا إشارة مسطّحة
كل كسر يُقيَّم عبر خمسة عوامل إلى قوي / غير حاسم / مصيدة محتملة ، فترى السبب لا مجرّد سهم .
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚦 كشف النطاق بأربع بوابات
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
لا يُعتمَد النطاق إلا حين تتّفق البوابات الأربع على نفس الشمعة :
1️⃣ احتواء ATR
الإغلاقات الحديثة تبقى ضمن متوسط السعر ± ATR × مضاعف. الاختبار المعياريّ الذي تستخدمه كل أدوات النطاق تقريبًا.
2️⃣ الأفقيّة
الارتباط بين سعر الإغلاق والزمن عبر نافذة النظر للخلف يبقى تحت عتبة محدّدة ، فيستبعد النوافذ التي تتّجه بهدوء بدل أن تكون أفقيّة فعلًا.
3️⃣ بوابة الاتّساع المطلق
البوابة التي تُفوِّتها أغلب الأدوات. بعد حركة حادّة، يتضخّم ATR نفسه ، ممّا قد يجعل البوابة الأولى تمرّ حتى لو كان النطاق واضحًا أنّه ليس نطاقًا — لأنّ نطاق ATR الأوسع أسهل للبقاء داخله . تفحص هذه البوابة الفارق الفعليّ بين أعلى وأدنى نقطة في النافذة كنسبة مئويّة بسيطة من السعر ، بمعزل عن ATR ، فلا يعود قياس ATR المتضخِّم قادرًا على تمويه نافذة واسعة وغير مستقرّة فعليًّا على أنّها نطاق صالح .
4️⃣ بوابة زاوية الدخول
تفحص حركة السعر عبر أوّل شموع النافذة تحديدًا. النافذة التي تبدأ في منتصف انهيار سعريّ ولم ينتهِ بعد ترسب في هذه البوابة حتى لو بدت بقيّة النافذة هادئة.
🔸 اختياريّ: فلتر الاتجاه السابق
عند الحافة الأولى للنافذة يمكنه تقييد الكشف أكثر على النطاقات ADX التي تكوّنت بعد اتجاه حقيقيّ لا من بداية ساكنة — مفيد لاستراتيجيّات اتجاه - ثم - توحيد .
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 صندوقان، واختيارك لمصدر الكسر
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
يتتبّع Dynamic Range Pro صندوقين في آنٍ واحد:
1️⃣ الصندوق الرئيسيّ (القائم على ATR)
النطاق المعياريّ: متوسط السعر ± ATR × مضاعف. هذا التعريف الكلاسيكيّ الذي تستخدمه كل أدوات النطاق، ومصدر الكسر الافتراضيّ.
2️⃣ الصندوق الداخليّ (القائم على الإغلاق)
صندوق ثانٍ مستقلّ مبنيّ حصرًا من أعلى وأدنى سعر إغلاق خلال التكوّن — متجاهلًا الفتائل كليًّا. يمنح قراءة أضيق ومقاومة للضوضاء لموضع استقرار السعر الفعليّ.
🔀 وضع الصندوق — اختيار مصدر الكسر
اعرض أيّ صندوق، أو كليهما معًا، أو رقِّ الصندوق الداخليّ ليكون مصدر الكسر الفعليّ بدل الرئيسيّ. الكسر عبر الصندوق الداخليّ يُنتج تعريفًا أبكر وأضيق — مفيد إن أردت التفاعل قبل خروج السعر من نطاق ATR كاملًا ، مقابل إشارات أكثر تكرارًا.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 تقييم متدرّج لجودة الكسر
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
بدل شراء أو بيع مجرّد بلا سياق ، يُقيَّم كل كسر مؤكَّد عبر خمسة عوامل :
1️⃣ قوّة الاتجاه (ADX)
صحّي ضمن مدى محدّد، محموم فوقه.
2️⃣ اقتراب الزخم من التشبّع (RSI)
القرب من التشبّع في اتجاه الكسر يُحسب ضدّ الحركة.
3️⃣ عمق الاختراق
كم ابتعد الإغلاق عن الحدّ، بوحدة ارتفاع الصندوق.
4️⃣ تشتّت ما قبل التكوّن
مدى نشاط النطاق قبل الكسر، مُجمَّد عند التكوين.
5️⃣ محاذاة تدفّق الاتجاه (فارق DI)
هل فارق الحركة الاتجاهيّة يؤكّد اتجاه الكسر أم يعاكسه.
كل عامل يصوّت نحو تقييم قوي / غير حاسم / مصيدة محتملة. ترى التفصيل الكامل على الشارت — حيًّا أثناء التكوّن ، ومُجمَّدًا لحظة تأكّد الكسر — فتحكم بنفسك أيّ العوامل قاد القرار بدل الثقة بتصنيف مغلق.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏁 قراءة السطر السفليّ
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
الصفّ الأخير في الجدول يُلخِّص كل ما فوقه في سطر واحد بلغة مبسّطة يتحدّث حيًّا . لا يظهر فيه إلّا واحدة من خمس حالات :
1️⃣ لا صندوق حاليًّا
لا يوجد نطاق نشط أو مكسور مؤخّرًا — لا شيء لعرضه بعد.
2️⃣ النطاق نشط — بانتظار الكسر
يوجد نطاق صالح حاليًّا، لكن السعر لم يختبر أيّ حدّ بعد، فلا شيء لتقييمه بعد.
3️⃣ ✅ كسر قوي
محصّلة العوامل الخمسة لجودة الكسر عند أو فوق عتبة "القويّ" — أغلب العوامل تدعم الاستمرار.
4️⃣ ⚖️ إشارة مختلطة (مع عرض المحصّلة)
المحصّلة بين عتبتَي القويّ والمصيدة — العوامل متضاربة، تستحقّ حذرًا إضافيًّا.
5️⃣ ⚠️ مصيدة محتملة
المحصّلة عند أو تحت عتبة "المصيدة" — أغلب العوامل تشير لإنهاك أو خطر انعكاس.
🔸 رمز ◷
حين يظهر ◷ قبل أيّ تقييم، يعني أنّ السعر لا يزال يخترق الحدّ داخل الشمعة ولم تُغلَق بعد — معاينة حيّة غير مؤكَّدة قد تتغيّر. بمجرّد إغلاق الشمعة وتأكّد الكسر، يختفي ◷ ويثبت التقييم.
عتبتا "القويّ" و"المصيدة" كلتاهما قابلتان للتعديل من الإعدادات.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧬 درجة تكامل النطاق — قبل وقوع الكسر
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
الطبقة التي أراها الأكثر إثارة من الناحية المفاهيميّة: درجة حيّة من 0 إلى 100 تصف مدى "نظافة" النطاق المتكوّن فعليًّا، تُحسب باستمرار قبل وقوع أيّ كسر، من أربع زوايا مستقلّة:
1️⃣ تشوّش المسار
مقدار تعرّج الإغلاق نسبةً لإجمالي امتداد النافذة.
2️⃣ تماسك الشمعة
حجم الشموع الفرديّة نسبةً للنافذة.
3️⃣ اتجاه التشتّت
هل التقلّب يتحسّن أم يتّسع عبر الزمن.
4️⃣ عدد لمسات الحافة
كم مرّة اختبر السعر الحدّ المرتقَب دون كسره.
تجيب عن سؤال مختلف عمّا يجيبه تقييم جودة الكسر — ليس "ما مدى قوّة الكسر" بل "ما مدى مصداقيّة هذا النطاق أصلًا" — وتتحدّث حيًّا مع تطوّر النطاق، قبل أيّ إشارة بوقت طويل.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 مبنيّ على بيانات حقيقيّة، لا الحدس فقط
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
كل بوابة وكل درجة في هذا السكربت اختُبرت فعليًّا على بيانات 4H حقيقيّة عبر 19-20 عملة من Binance، وما يقارب 440-620 حدث نطاق/كسر تاريخيّ حسب الاختبار ، أنشر بالضبط ما وجده ذلك الاختبار، بما في ذلك ما لم يؤكّد توقّعي:
✅ فلتر ADX للاتجاه السابق يُحسِّن جودة الكشف بشكل قابل للقياس على العيّنة المختبَرة.
⚠️ ثلاثة من عوامل جودة الكسر الخمسة (مستوى RSI، مقدار ADX، التشتّت) لم تُظهر علاقة مستقلّة قابلة للقياس بما حدث بعد الكسر. تبقى في التقييم كقائمة تحقّق شفّافة قابلة للقراءة على الشارت لا كميزة تنبّؤيّة مُدَّعاة — ترى بالضبط أيّ العوامل رجّح أيّ تقييم وتزنها بنفسك.
📈 درجة تكامل النطاق أظهرت علاقة موجبة صغيرة، غير دالّة إحصائيًّا بعد، مع استمراريّة ما بعد الكسر (r = +0.10، p = 0.20، n = 176) — اتجاه واعد ، لا إشارة مُثبَتة بعد، وهذا بالضبط سبب كونها طبقة عرض فقط بلا تأثير على التنبيهات أو تكوّن الصندوق.
هذا ليس عرضًا من نوع "ثق بنتائج الباك-تست" — بل عكس ذلك تمامًا. كل ما سبق نقطة انطلاق لحكمك أنت، لا بديل عنه.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ ميزات عمليّة
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌐 تبديل كامل بين العربيّة والإنجليزيّة لواجهة الجدول وعلامتَي الشراء/البيع (لوحة الإعدادات ورسائل التنبيه ثنائيّة اللغة دومًا)
🔔 تنبيهات شراء/بيع، مع تنبيه اختياريّ للاختراق اللحظيّ — مبكّر، إخباريّ بحت، قبل إغلاق الشمعة
📦 صناديق النطاقات التاريخيّة تُحفَظ بنظافة عبر عدّة تكوينات، بلا تراكب فوضويّ
🎨 كل لون وسماكة ونمط خطّ قابل للتخصيص
🔒 كل الإشارات تُطلَق حصرًا عند إغلاق شمعة مؤكَّد — بلا إعادة رسم، بلا استباق
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🗣️ لغة الواجهة
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
تعرض الإنجليزيّة افتراضيًّا. بدّل "لغة الجدول" للعربيّة من الإعدادات إن فضّلت. دليل الوضع العربيّ:
Prior trend = الاتجاه السابق
Trend strength (ADX) = قوة الاتجاه
Break direction = اتجاه الكسر
Direction match = مطابقة الاتجاه
Breach depth = عمق الاختراق
Range dispersion = تشتت النطاق
Break verdict = تقييم الكسر
Range/entry % = امتداد/دخول %
Range integrity = تكامل النطاق
Range age = عمر النطاق
BUY/SELL = شراء / بيع
═════════════════════════════════════════════════════════════
⚠️ إخلاء المسؤولية
═════════════════════════════════════════════════════════════
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر. Gösterge

VWAP Deviation Trend [BackQuant]VWAP Deviation Trend
Overview
VWAP Deviation Trend is a volume-weighted trend-following overlay that transforms VWAP and its surrounding price distribution into a directional trailing structure.
Rather than using VWAP only as a fair-value line, the indicator calculates:
A configurable anchored or rolling VWAP.
The volume-weighted standard deviation of price around that VWAP.
Adaptive upper and lower deviation bands.
One-sided trailing boundaries used to confirm bullish and bearish regimes.
The indicator is designed to identify when price has moved far enough away from accepted volume-weighted value to establish a meaningful directional shift.
Unlike a simple VWAP crossover, price can move through VWAP without immediately changing the active trend. A new regime requires price to break the opposite trailing deviation boundary, optionally with confirmation from the direction of VWAP itself.
The updated visual engine also measures trend strength and uses it to control:
Gradient intensity.
Trail glow width.
Post-flip bloom effects.
The visual separation between price and the active trail.
Core concept
VWAP represents the average price paid over a selected period, weighted by trading volume.
The basic formula is:
VWAP = Sum of Price × Volume / Sum of Volume
Prices associated with greater volume contribute more heavily to the final value. This makes VWAP a useful approximation of:
Volume-weighted fair value.
The center of traded activity.
The average position of market participants.
An institutional execution benchmark.
However, VWAP alone does not explain how widely price has been distributed around that value.
VWAP Deviation Trend treats VWAP as the center of a volume-weighted price distribution and measures the dispersion around it. That dispersion is then used to create trailing trend boundaries.
VWAP calculation modes
The indicator supports five VWAP windows:
4 Hours
Daily
Weekly
Rolling Lookback Bars
Rolling Lookback Days
4 Hours
Resets VWAP at fixed four-hour intervals.
This can be useful for:
Cryptocurrency markets.
Intraday futures.
Continuously traded markets.
Shorter fair-value regimes.
Daily
Resets at the beginning of each calendar day.
This is the traditional intraday VWAP structure and is useful for:
Session bias.
Intraday mean reversion.
Day-trading trend confirmation.
Weekly
Accumulates volume and price across the current week.
This creates a slower structural anchor suited to:
Swing trading.
Weekly positioning.
Broader accepted-value analysis.
Rolling Lookback Bars
Calculates VWAP over a fixed number of candles.
The window moves forward continuously and does not reset at a calendar boundary.
This is useful for:
Systematic trend models.
Consistent multi-timeframe analysis.
Markets where daily sessions are less important.
Rolling Lookback Days
Includes bars that fall within a selected number of calendar days.
This keeps the analytical window tied to elapsed time instead of a fixed candle count.
Anchored versus rolling VWAP
Anchored modes begin at a fixed boundary and accumulate until the next reset.
Rolling modes continually remove old observations as new observations arrive.
Anchored VWAP is useful when a particular session or week has structural meaning. Rolling VWAP is useful when the trader wants a stable and continuously adapting lookback.
Volume-weighted deviation
The indicator calculates more than the VWAP mean.
It also measures volume-weighted price variance using:
Weighted Mean Square = Sum of Price² × Volume / Sum of Volume
Weighted Variance = Weighted Mean Square - VWAP²
Weighted Deviation = Square Root of Weighted Variance
This measures how widely prices associated with meaningful trading volume are distributed around VWAP.
A small deviation suggests:
Trading is concentrated near fair value.
The market is relatively balanced.
Price acceptance is narrow.
A large deviation suggests:
Trading is spread across a wider range.
Price discovery is more active.
The market is less tightly centered around VWAP.
Because the calculation is volume weighted, high-volume prices influence the bands more than low-volume excursions.
Fallback when volume is unavailable
If usable volume is not available, the indicator falls back to an unweighted arithmetic mean and variance.
This allows it to function on synthetic or limited-volume symbols, although the result should then be interpreted as a rolling or anchored mean rather than a true VWAP.
Deviation bands
The raw width is calculated as:
Deviation Width = Weighted Deviation × Deviation Multiplier
The upper and lower raw bands are:
Upper Band = VWAP + Band Width
Lower Band = VWAP - Band Width
Higher deviation multipliers create wider bands and fewer trend changes.
Lower multipliers create tighter bands and faster, more frequent flips.
ATR minimum width
During low-dispersion periods, volume-weighted deviation can become extremely narrow.
This can cause small and insignificant movements to trigger repeated reversals.
The optional ATR floor calculates:
ATR Floor = ATR × ATR Minimum Multiplier
The final width becomes:
Band Width = Maximum of Deviation Width and ATR Floor
This preserves volume-weighted deviation as the primary band engine while preventing the channel from collapsing below a practical volatility threshold.
Trailing-band construction
The raw deviation bands move freely with VWAP and dispersion.
The indicator converts them into one-sided trailing levels.
Lower trail
While the selected trigger remains above the lower trail:
The trail can rise.
It cannot move downward.
This creates a ratcheting support structure.
Upper trail
While the trigger remains below the upper trail:
The trail can fall.
It cannot move upward.
This creates a ratcheting resistance structure.
The active trend trail is:
The lower trail during bullish regimes.
The upper trail during bearish regimes.
Why trailing logic matters
A raw VWAP band can move toward price and create unstable signals.
The one-sided trail preserves trend structure and creates hysteresis.
Hysteresis means the threshold required to enter a bullish regime is different from the threshold required to enter a bearish regime.
This allows price to rotate around VWAP without constantly changing the active trend.
Trend initialization
When the first valid VWAP is available:
The trend initializes bullish if the trigger is at or above VWAP.
The trend initializes bearish if the trigger is below VWAP.
After initialization, a full break of the opposite trail is required to change regimes.
Bullish trend flip
A bullish flip requires:
The selected trigger to move above the upper trailing band.
The current trend not already to be bullish.
VWAP slope confirmation to pass if enabled.
Once confirmed:
The trend becomes bullish.
The active trail moves beneath the market.
A bullish signal marker is displayed.
Bearish trend flip
A bearish flip requires:
The selected trigger to move below the lower trailing band.
The current trend not already to be bearish.
VWAP slope confirmation to pass if enabled.
Once confirmed:
The trend becomes bearish.
The active trail moves above the market.
A bearish signal marker is displayed.
Flip trigger
The trend can be triggered using:
Close
The selected VWAP price source
Close is the more conventional option.
Using the price source, such as HLC3, can produce a slightly smoother trigger because it reflects more of the bar than the close alone.
VWAP slope confirmation
Optional slope confirmation requires VWAP itself to move in the direction of the proposed new trend.
For a bullish flip:
Current VWAP must be above VWAP from the selected lookback.
For a bearish flip:
Current VWAP must be below its prior value.
This can help reject:
Temporary band breaks.
Low-volume price spikes.
Liquidity sweeps against flat fair value.
The tradeoff is additional confirmation delay.
Breaking the trail on flips
The active trail changes from one side of the market to the other during a regime transition.
The Break Trail On Flips option inserts a visual gap on the flip bar so the previous and new trails are not connected by a misleading line segment.
This affects presentation only.
Visual trend-strength engine
The updated script includes a visual-strength model that controls the intensity of the gradient and glow.
It combines two measurements:
Distance between price and the active trail.
Slope of VWAP relative to the current band width.
Distance strength
The script measures:
Absolute Distance = |Close - Trend Trail|
This is normalized by the current band width.
A larger distance indicates stronger separation between price and the structural trail.
Slope strength
VWAP movement across the slope lookback is also normalized by the band width.
This measures whether volume-weighted fair value itself is moving meaningfully relative to the size of the current deviation structure.
Combined trend strength
The final visual strength is weighted:
70% price-to-trail distance.
30% VWAP slope strength.
This produces a value between zero and one.
It does not change trend logic or signals. It controls the visual intensity of the indicator.
Layered gradient fill
Instead of using one flat gradient, the updated indicator divides the space between the trail and price into six visual layers.
The levels are placed progressively between:
The active trend trail.
The current closing price.
The gradient is:
Most concentrated near the structural trail.
Progressively softer toward price.
The opacity adapts to trend strength.
When price is strongly separated from the trail and VWAP is moving with the regime:
The gradient becomes more vivid.
When the trend is weak:
The fill becomes softer and more transparent.
This makes the visual ribbon encode more than direction. It also reflects the current strength of the price-to-structure relationship.
Flip bloom
After a confirmed trend flip, the indicator creates a temporary bloom around the new trail.
The bloom is strongest immediately after the transition and fades over the following bars.
Its intensity follows this general sequence:
First bar after flip: strongest bloom.
Second bar: reduced bloom.
Third bar: light residual bloom.
Afterward: bloom disappears.
This visually emphasizes fresh regime changes without permanently increasing chart brightness.
The bloom is cosmetic and does not affect calculation.
Adaptive trail glow
The glow surrounding the trail also changes with trend strength.
The base width is ATR-scaled, then increases slightly as the visual trend-strength score rises.
This creates:
A broader glow during stronger regimes.
A narrower glow when trend structure is weaker.
The glow contains:
An inner, more visible layer.
A wider, softer outer layer.
Visual interpretation
The updated presentation provides several pieces of information simultaneously:
Color shows the active trend direction.
The trail shows the structural regime boundary.
Gradient intensity reflects trend strength.
Glow width reinforces structural conviction.
The bloom highlights fresh regime transitions.
How to use the indicator
Trend regime filter
Use the active color and trail position as directional context:
Favor longs during bullish regimes.
Favor shorts during bearish regimes.
Pullback structure
In a bullish regime:
VWAP represents volume-weighted fair value.
The lower trail represents deeper structural support.
In a bearish regime:
VWAP represents the mean-reversion anchor.
The upper trail represents deeper structural resistance.
Trend-strength context
A vivid gradient and broader glow suggest:
Price is well separated from the trail.
VWAP is moving in the trend direction.
The regime has stronger structural momentum.
A weak or faded gradient suggests:
Price is closer to the trail.
VWAP slope is weaker.
The trend may be consolidating or losing strength.
Fresh transitions
The bloom helps identify newly established regimes.
A fresh flip with:
Strong bloom.
Growing price separation.
VWAP slope alignment.
generally represents stronger early trend structure than a flip that immediately loses visual intensity.
Dynamic risk management
The active trail may be used as:
A trailing stop reference.
A regime invalidation boundary.
A position-management guide.
Because the trail responds to both volume-weighted dispersion and volatility, it adjusts as market conditions change.
How this differs from a standard VWAP
A standard VWAP:
Plots only volume-weighted mean price.
Usually resets once per session.
Does not maintain trend state.
VWAP Deviation Trend:
Supports anchored and rolling windows.
Calculates volume-weighted dispersion.
Creates adaptive raw bands.
Converts them into directional trailing boundaries.
Maintains persistent bullish and bearish regimes.
Adds a strength-reactive visual system.
How this differs from Supertrend
A traditional Supertrend normally uses a central price such as HL2 and ATR-based bands.
VWAP Deviation Trend uses:
Volume-weighted fair value as the center.
Volume-weighted standard deviation as the primary width.
ATR only as an optional minimum floor.
This means the trail responds not only to range volatility, but also to where trading volume has been concentrated.
How this differs from Bollinger Bands
Bollinger Bands normally use:
A moving average.
Unweighted standard deviation.
Symmetrical non-trailing bands.
This indicator uses:
A volume-weighted mean.
Volume-weighted variance.
One-sided trailing bands.
Persistent trend-state logic.
It is therefore a trend-regime model rather than a standard mean-reversion envelope.
Input guide
VWAP Mode
Selects the anchored or rolling calculation window.
Deviation Multiplier
Controls the width of the statistical bands.
Higher values produce wider, slower regimes. Lower values produce tighter and faster regimes.
ATR Minimum Width
Prevents excessive narrowing during compressed conditions.
VWAP Slope Confirmation
Requires volume-weighted fair value to move with the proposed trend.
Flip Trigger
Selects whether close or the chosen price source must cross the trail.
Visual settings
Allow the trader to display:
The trend trail.
VWAP.
Raw deviation bands.
Layered gradient.
Adaptive glow.
Signals.
Trend candles.
Strengths
Combines fair value, dispersion, and trend structure.
Uses volume-weighted mean and variance.
Supports multiple anchored and rolling VWAP windows.
Uses ATR protection against narrow-band whipsaws.
Creates persistent regimes with hysteresis.
Provides optional VWAP slope confirmation.
Includes a trend-strength-reactive visual system.
Clearly emphasizes fresh trend transitions.
Limitations
Volume quality varies between instruments.
Anchored VWAP modes may be unstable immediately after a reset.
Long windows can react slowly to sudden regime changes.
Tight settings can increase whipsaws.
Wide settings can delay reversals.
Slope confirmation can add additional lag.
Visual strength is contextual and is not a separate trading signal.
Alerts
The indicator includes alerts for:
Confirmed bullish trend flips.
Confirmed bearish trend flips.
These represent complete VWAP deviation regime changes, not ordinary crosses of VWAP.
Summary
VWAP Deviation Trend converts volume-weighted fair value and price dispersion into a directional trend trail.
It calculates VWAP over a configurable anchored or rolling window, measures volume-weighted standard deviation around that VWAP, and builds upper and lower deviation bands. An optional ATR floor prevents the structure from becoming excessively narrow during quiet conditions.
The raw bands are transformed into one-sided trails. The lower trail ratchets upward during bullish regimes, while the upper trail ratchets downward during bearish regimes. Trend changes occur only when price breaks the opposite trail, optionally with confirmation from the slope of VWAP.
The updated visual engine measures price separation and VWAP slope to dynamically control the layered gradient, trail glow, and temporary post-flip bloom. This creates a clearer representation of direction, structural strength, and fresh regime transitions without changing the underlying signal logic. Gösterge

Change of Character (CHoCH) Alert System [algo_aakash]Change of Character (CHoCH) Alert System is a market structure signal tool focused on a single event: a confirmed shift in directional bias. Rather than labeling every Break of Structure and CHoCH the way many public structure scripts do, this indicator deliberately ignores continuation breaks and limits both the chart and the alert feed to the moments where the prevailing character of the market actually flips.
Problem Statement
Most public CHoCH implementations classify a character change purely on the direction of a swing break, with no measure of how convincing that break actually was. This creates two practical issues for anyone building alerts around structure. Every minor swing wobble can trigger a notification, producing alert fatigue, and there is no way to separate a decisive character change from one that barely closed beyond the swing level. This script addresses both issues with a close-confirmed CHoCH-only detection engine and a built-in confidence grading step applied to every signal.
Methodology
The script maintains a single structure register holding the most recent confirmed swing high and swing low, located with standard pivot detection over a user-defined pivot length. When the adaptive swing filter is enabled, a newly confirmed pivot only replaces the stored swing if its distance from the last opposite-type pivot exceeds a configurable ATR-relative threshold, which keeps insignificant micro-swings out of the structure register before they can influence a signal.
A Change of Character is only evaluated on a confirmed candle close, so nothing in the detection logic repaints once a signal has printed. A bullish CHoCH requires a close above the last swing high while the tracked bias is bearish or undefined. A bearish CHoCH requires a close below the last swing low while the tracked bias is bullish or undefined. A break that occurs while the bias already agrees with the break direction is treated as ordinary continuation and is not flagged.
Two optional filters gate confirmation further. A displacement filter requires the breaking close to clear the swing level by a minimum ATR multiple, removing marginal breaks. A momentum filter requires the breakout candle's body to represent a minimum percentage of its total range, removing breaks driven mostly by wick with little real conviction behind the close.
Once a CHoCH is confirmed, the broken swing level is projected forward on the chart as an active structure line. If a later confirmed close moves back through that level, the structure is marked invalidated and the projection line is dimmed, separately from the detection of any new CHoCH.
Signal Workflow
Track the most recent confirmed swing high and swing low using pivot detection.
Apply the adaptive swing filter to reject pivots too close to the last opposite-type pivot.
On each confirmed candle close, test for a close beyond the stored swing level against the current bias.
Apply the displacement filter to confirm the close cleared the level by a minimum ATR multiple.
Apply the momentum filter to confirm the breakout candle's body-to-range ratio meets the minimum threshold.
Score the confirmed breakout candle on displacement in ATR units and body-to-range ratio to produce a Weak, Moderate, or Strong confidence grade.
Flip the tracked bias, plot the CHoCH label with its grade, and project the broken level forward as an active structure line.
Continue monitoring the active structure line and mark it invalidated if a later confirmed close moves back through it.
Why This Indicator Is Different
Many structure tools plot every Break of Structure alongside every CHoCH, leaving the trader to filter out which events represent an actual change in character.
This script omits BOS events entirely and reports only confirmed CHoCH signals, which are the events that correspond to a bias flip.
Each confirmed CHoCH is scored using two independent factors measured on the breakout candle itself, its ATR-normalized displacement past the level and its body-to-range ratio, rather than being treated as a single undifferentiated event.
The confidence grade is written into the alert message text at the moment the event fires, which requires composing the message dynamically rather than relying on a fixed template.
The swing level broken by a CHoCH remains tracked after the signal fires, so a later close back through that level produces a distinct invalidation alert rather than silently vanishing into the next structure calculation.
Detection is restricted to confirmed candle closes throughout, so the bias, the grade, and the invalidation state cannot change intrabar once printed.
Inputs
Structure Engine
Swing Pivot Length
Adaptive Swing Filter
Filter Threshold (ATR multiple)
Break Confirmation
Displacement Filter
Displacement Multiplier
Momentum Filter
Minimum Body % of Range
ATR Length
Visual Settings
Show Swing Points
Show Structure Projection
Projection Extension
Show Trend Background Wash
Color Candles After CHoCH
Show Confidence Grade
Label Size
Bullish, Bearish, and Projection colors
Status Panel
Show Status Panel
Panel Position
Alerts
Alert: Bullish CHoCH
Alert: Bearish CHoCH
Alert: Bullish Structure Invalidated
Alert: Bearish Structure Invalidated
Alerts
Alerts are available for:
Bullish CHoCH confirmed on a closed candle, with the confidence grade included in the alert message
Bearish CHoCH confirmed on a closed candle, with the confidence grade included in the alert message
Bullish structure invalidated after a confirmed close back below an active bullish level
Bearish structure invalidated after a confirmed close back above an active bearish level
Practical Usage
Use a shorter pivot length on intraday charts to react to structure earlier, combined with the displacement and momentum filters to avoid marginal breaks.
Use a longer pivot length on higher timeframes to isolate structurally significant character changes only.
Treat a Strong-grade CHoCH as a higher-conviction event than a Weak-grade CHoCH when weighing entry timing or position sizing.
Watch for a structure invalidated alert shortly after a CHoCH, since it indicates price has returned through the level that produced the signal.
Use the status panel as a quick reference for the current bias and the most recent CHoCH grade without needing to scan the chart for labels.
Limitations
Swing highs and lows depend on confirmed pivots, which require the full pivot length of bars to close on both sides before becoming available, introducing a disclosed confirmation lag.
The displacement and momentum filters reduce signal frequency by design, which means fewer but more selective CHoCH events compared to unfiltered structure break detection.
Structure invalidation reflects a return through a previously broken level and does not attempt to forecast subsequent price direction.
This indicator identifies structural events only and does not constitute financial advice or a complete trading system on its own.
Notes
All structural state, including the tracked bias, the active levels, and the confidence grade, is evaluated only on a confirmed candle close, so nothing in this script repaints once printed.
The only lag in the system is the standard pivot confirmation lag inherent to pivot-based swing detection, which is disclosed above rather than hidden.
Designed for dark theme charts. On light themes, consider darkening the projection line color for improved contrast.
Gösterge

FVG Sniper [JOAT]═══ FVG SNIPER ═══
A complete Fair Value Gap engine that finds price imbalances, grades their quality, tracks how they fill, mitigate and invert, and then paints a full trade blueprint the moment a clean setup fires. One gap is spotlighted as the strongest, and every signal arrives with entry, three targets, a stop, and colored risk/reward zones — no arrows, no clutter.
▎ WHAT IT DOES
FVG Sniper detects three-candle fair value gaps (imbalances), scores each one from 0–10, and monitors its life cycle: how much of the gap has been filled, whether it has been mitigated (wick-tapped through), and whether price has closed fully through it to flip its role into an Inverted FVG (IFVG) . When a graded gap produces a rejection or an IFVG flip that agrees with the higher-timeframe bias, it draws a structured trade plan and reports the whole picture in a dashboard.
▎ HOW IT WORKS
• Gap detection — a bullish gap forms when the current low sits above the high from two bars back; a bearish gap forms when the current high sits below the low from two bars back.
• Quality filters — each candidate must clear a minimum gap size (as a multiple of ATR ) and a minimum displacement body ratio on the impulse candle, so tiny or weak imbalances are ignored.
• Grade (0–10) — blends gap size, the displacement range of the middle candle, and relative volume into a single score. Only gaps at or above your minimum grade may fire a signal.
• Fill & mitigation — the engine tracks the running extreme inside each gap to compute a live fill percentage, and marks a gap mitigated once a wick fully traverses it.
• Inversion (IFVG) — when price closes fully through a gap, its role flips; the box restyles to a dashed amber accent and the flip is logged.
• Signals — two sources you can mix or isolate: Rejection (price retraces into a live gap and reacts back out with a directional close) and IFVG Flip (a mitigated gap is closed through, confirming continuation).
• HTF bias filter — an optional higher-timeframe EMA bias must agree with the signal direction before it is allowed.
• Trade model — on a fresh signal it sets entry at close, a stop either gap-protected (just beyond the triggering gap boundary) or ATR-based, with risk clamped between a floor and a cap. Targets TP1/TP2/TP3 are placed at your chosen R multiples.
• Non-repainting — all detection, scoring and signals evaluate on confirmed (closed) bars only, and the HTF request uses no lookahead.
▎ HOW TO USE IT
• Trade in the direction of the BUY / SELL pill. The stars and score on the pill show the grade of the gap that triggered it.
• The entry line (chrome), dashed stop , and TP1/TP2/TP3 lines map the plan directly on the chart; level labels on the right print exact prices and R values.
• The green zone is the target/reward area from entry to TP3; the red zone is the risk area between entry and stop — a fast visual read of the trade's R:R.
• A single ★ spotlight tags only the strongest active gap, so you always know the best imbalance in view.
• Use live gaps as decision zones: watch the fill % of the nearest gap, and treat an IFVG flip as a shift in short-term control.
• When a trade closes, a result label prints the outcome (TP hit, stop, or exit at R) so completed setups stay readable.
• Combine with your own structure, session and news context — the gap engine locates the where , you confirm the when .
▎ KEY SETTINGS
• Engine — enable bullish/bearish detection, choose the signal source (Rejection, IFVG Flip, or both), and cap how many gaps stay visible plus their lifetime and box extension.
• Filters — ATR length, minimum gap size, minimum displacement body ratio, minimum grade, the HTF bias filter (timeframe + EMA length), and whether a directional rejection close is required.
• Trade Model — stop basis (Gap-Protected vs ATR), stop buffer/distance, risk floor and cap, TP1–TP3 in R, max trade duration, zone projection, and how many completed trades to keep.
• Visuals — toggle gap boxes, midline, hide-mitigated declutter, grade spotlight, IFVG styling, signal pills, zone boxes, lines, level and result labels, zone-reader candle coloring, optional VWAP + σ bands, and all colors/transparency/sizes.
• Dashboard — show/hide, position, text size, and dark or light panel.
▎ DASHBOARD
The on-chart panel reports: HTF bias, count of active bullish and bearish gaps, the nearest gap price and its fill %, the strongest gap's star grade, the last IFVG flip (with bar age), the active signal, any live trade with its entry, and running totals of bullish / bearish / inverted gaps detected.
▎ ALERTS
• BUY signal
• SELL signal
• Bullish IFVG Flip (inversion up)
• Bearish IFVG Flip (inversion down)
▎ NOTES
• Works on all timeframes and all assets — indices, forex, crypto, stocks, futures.
• Signals and drawings are computed on closed bars, so they do not repaint after the bar confirms.
• Object caps and hide-mitigated / declutter toggles keep the chart clean even on long histories.
• Any on-chart result labels reflect historical signals only and are illustrative, not a performance guarantee.
For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results — always manage your own risk.
Made with passion by JackOfAllTrades ⚡
Gösterge

ATR Trend Rail🚦 ATR Trend Rail — a trend rail that knows when to shut up.
Most ATR / SuperTrend clones flip you into every chop-fest, then repaint the "perfect" entry after the candle closes. This one doesn't. It runs on a single idea: a trailing ATR band is only worth trading when the market regime agrees with it. 🎯
WHAT'S UNDER THE HOOD
📐 The rail — a trailing ATR band that latches trend state and rides price until volatility says the move is done. Adaptive, clean, no lag-heavy MA soup.
🧭 Regime filter (the whole point) — every flip is gated against a regime SMA. Leave it on your chart timeframe, or point it at an HTF for a top-down bias. Wrong side of regime? The signal never fires. This is the piece most trend tools skip entirely.
🚫 Non-repainting, for real — flips confirm on closed bars only, the regime pull runs lookahead-off with a realtime offset, and each leg's regime status locks the moment the flip bar closes. What you see in replay is what you'd have traded live. No hindsight magic.
🌫️ Faded legs — trends that fire against regime don't disappear, they dim. You still see the move; you just know it didn't earn a signal. Context, not censorship.
🔔 Alerts that behave — Bull, Bear, and Flip, confirmed-bar only. Set them once and trust them.
READ IT IN ONE GLANCE
🟢 Bright rail under price → confirmed uptrend, regime agrees
🔴 Bright rail over price → confirmed downtrend, regime agrees
⚪ Faded rail → the move exists, regime says wait
🔺 Triangle + Bull / Bear tag → a flip that passed the gate
Still useful after it's been on your chart a while. 🚦
— SlatinaTrades Gösterge

Titan Algo | PropTraderz
Titan Algo | PropTraderz is an all-in-one technical analysis indicator designed to help traders identify market direction, trend strength, potential Buy/Sell signals, and important trading levels.
Main features:
• Supertrend-based Buy and Sell signals
• Optional Smart Signals using the 200 EMA trend filter
• Multi-timeframe dashboard for M1, M5, M15, M30, 1H, 4H, and D1
• Bar Coloring modes: Gradient, Trend, or None
• Trend Cloud, Trend Follower, Cumulus Cloud, and Cirrus Cloud
• Smart Trail and dynamic trend lines
• Support and Resistance zones
• Supply and Demand areas
• ATR-based Entry, Stop Loss, and Take Profit levels
• 1:1, 2:1, and 3:1 risk-reward targets
• Buy and Sell alerts
• Adjustable sensitivity and risk-management settings
This indicator is intended as a technical analysis and confluence tool. Signals should always be confirmed with your own market analysis and proper risk management. This script does not provide financial advice. Gösterge

Dealing and Displacement Range Trade EntriesDealing and Displacement Range Trade Entries
tradingview.com
Dealing and Displacement Range Trade Entries is an advanced Smart Money Concept based TradingView indicator designed to identify high-probability institutional trading opportunities by combining market structure, dealing ranges, premium and discount zones, displacement, Order Blocks, Fair Value Gaps and precise trade execution levels into one complete trading system. Instead of relying on a single confirmation, the indicator builds every setup using multiple layers of price action analysis so traders can understand where institutions are most likely accumulating or distributing positions before entering the market.
The primary purpose of this indicator is to simplify institutional trading concepts into a visual and rule-based framework that can be used on every market and every timeframe. Whether a trader is trading Forex, Gold, Indices, Cryptocurrency, Stocks or Futures, the indicator automatically adapts to current market conditions and continuously updates its analysis as new candles are formed.
The foundation of the indicator begins with automatic detection of a confirmed Three Bar Swing High and Three Bar Swing Low. A Swing High is confirmed when the middle candle creates the highest high while the candles on both sides fail to exceed that high. Likewise, a Swing Low is confirmed when the middle candle forms the lowest low while the surrounding candles fail to break that low. These swing points are confirmed only after the right-side candle closes, ensuring stable structure recognition and minimizing repainting.
Once both swing points have been identified, the indicator automatically creates a complete Dealing Range between the confirmed Swing High and Swing Low. This range represents the active institutional price cycle where buying and selling activity is expected to develop. Instead of forcing traders to manually draw ranges, the indicator continuously recalculates and updates the dealing range whenever a new valid market structure is confirmed.
The dealing range is automatically divided into two equal sections. The upper half becomes the Premium Zone while the lower half becomes the Discount Zone. These zones provide an immediate visual understanding of where price is considered relatively expensive or relatively discounted within the current market cycle. This helps traders avoid entering trades at poor prices and instead focus on areas where institutional participation is more likely.
The Premium Zone is primarily monitored for selling opportunities. When price trades into this region, the indicator searches for additional institutional confirmations such as bearish Order Blocks, bearish Fair Value Gaps and displacement signals before considering a short setup. Conversely, the Discount Zone is monitored for buying opportunities where bullish Order Blocks, bullish Fair Value Gaps and bullish displacement provide additional confirmation before generating a long setup.
The indicator also identifies Fair Value Gaps that represent areas of temporary market imbalance created by aggressive buying or selling pressure. These imbalances often act as magnets for future price movement as the market seeks to rebalance inefficient price delivery. Fair Value Gaps are automatically highlighted and extended while remaining valid, allowing traders to anticipate future reaction zones.
Alongside Fair Value Gap detection, the indicator automatically identifies significant Order Blocks that represent institutional buying and selling activity. These Order Blocks serve as potential reaction levels where professional market participants may defend previous positions. By combining Order Blocks with Premium and Discount Zones, traders receive stronger confirmation before entering the market.
Displacement plays an equally important role within the overall trading model. Strong directional price movement indicates aggressive institutional participation and often signals the beginning of a new market phase. The indicator evaluates these displacement moves alongside market structure to determine whether momentum supports continuation or potential reversal.
Once all required confirmations align, the indicator automatically generates a complete trading setup. Every setup is plotted directly on the chart with clearly defined Entry, Stop Loss and multiple Take Profit objectives. Entry signals are confirmed only after the required candle closes, helping reduce false signals generated by incomplete price action.
For Buy setups, the indicator waits until price enters the Discount Zone and receives confirmation from institutional structure before plotting the entry. Stop Loss is positioned beneath the protected structural low while Take Profit levels are projected toward important liquidity objectives, Fair Value Gaps, Order Blocks and eventually the opposite side of the dealing range.
For Sell setups, price must first enter the Premium Zone before institutional confirmations are satisfied. Once bearish confirmation is complete, the indicator plots the Sell Entry together with a logically positioned Stop Loss above market structure and multiple Take Profit targets extending toward Discount Zone liquidity.
To improve trade management, every signal includes a complete visual Risk Reward projection. Traders can immediately see the relationship between Entry, Stop Loss, Take Profit levels and Final Target without manually drawing trading boxes. This creates a structured workflow that encourages disciplined risk management.
The indicator also displays an intelligent dashboard that continuously summarizes important market information. The dashboard provides the current market bias, price location within the dealing range, active trading status, equilibrium level, range boundaries and live trade information. These values automatically update with every incoming candle, allowing traders to monitor changing market conditions in real time.
One of the strongest advantages of this indicator is its ability to combine several institutional trading concepts into one unified workflow. Rather than requiring traders to use multiple separate indicators for market structure, Fair Value Gaps, Order Blocks, dealing ranges and trade management, everything is integrated into a single organized trading environment.
The indicator is suitable for scalping, intraday trading, swing trading and higher timeframe positional analysis because every calculation automatically adapts to the currently selected timeframe. This flexibility allows traders to maintain the same decision-making process regardless of market or trading style.
The objective behind publishing this indicator is to provide traders with a professional institutional analysis framework that simplifies complex Smart Money Concepts into a clear, visual and practical decision-support system. By automating repetitive chart analysis while preserving transparent trading logic, the indicator helps traders improve consistency, reduce emotional decision making and execute trades using predefined institutional rules instead of subjective judgment.
Verification
This indicator has been independently designed and developed for the TradingView profile Forex_Market_Insights. The overall architecture, analytical methodology, visualization techniques, calculations and trading workflow have been created specifically for this project using original Pine Script Version 6 development practices. Every component has been built to provide a structured institutional trading experience while maintaining a consistent, professional and well-documented implementation.
Clarification
This indicator presents an original implementation of widely recognized technical analysis concepts including market structure, dealing ranges, premium and discount zones, displacement analysis, Fair Value Gaps and Order Blocks. While these concepts are commonly discussed within the trading community, the source code, calculation flow, chart visualization and system design have been independently developed for this indicator. The project is not intended to reproduce, decompile or replicate the protected implementation of any third-party script. Its purpose is to provide traders with a transparent, educational and practical analytical framework that follows original software development principles and supports responsible TradingView publishing practices.
tradingview.com Gösterge

IQ Trend Beams [TradingIQ]🔹 OVERVIEW
IQ Trend Beams is a trend assistant that draws your trendlines the way a disciplined chartist would - and then holds them accountable. It maintains two channels, support and resistance , each always showing one working line. A line is born forming : it moves and re-shapes freely, polished every bar by a perceptual score toward the line a skilled trader would actually draw. When its geometry settles and it has earned enough tangency credit, it locks - and from that moment the ink is frozen forever; it never moves again. Locked ink extends until break evidence fires, then it is broken : restyled but never relocated, holding the screen as history until its successor locks.
Riding each live beam is its own forecast ; a calibration band, a reach profile, and ghost levels, all built from the volume that has actually traded around that line.
This is an honest visualization and modeling tool , not a signal service. It draws structure clearly and states its own confidence out loud; it is not a validated edge or a promise of profit. Read the limitations section - it is not window dressing.
🔹 THE TWO CHANNELS - AN AUDITED PROMISE
Most trendline tools quietly redraw the past so the line always looks right in hindsight. Trend Beams refuses to. A line lives through three visible states:
• Forming (dotted) - the assistant sketching. It is free to move and re-fit while it hunts for the right geometry. This is the only state in which a support/resistance line moves, and it is dotted precisely so you can tell a guess from a commitment.
• Locked (solid) - the geometry has stilled and earned its tangency credit, so the line is frozen . It will never move again. A locked beam is a promise the tool has to keep in public.
• Broken (restyled) - break evidence fired. The ink is re-styled to show it failed, but it is never relocated ; it holds its original slope as an honest record and, if you keep history on, dims into the background once its successor locks.
Because a locked line cannot move, what you saw at lock time is what you keep. This is the core design commitment of the tool.
Two rails, either direction by design. Support is the lower rail, fit to the swing lows on the underside of price; resistance is the upper rail, fit to the swing highs above it. Neither is locked to a single slope: in a falling market the support rail angles down with the lows (the floor of the down-channel), and in a rally the resistance rail angles up with the highs (the ceiling of the up-channel). That is deliberate. A tool that forces support to only ever point up would go blind to the lower boundary of a downtrend - and miss exactly the moves that matter. Trend Beams instead always draws both boundaries of the channel price is actually in , so a strong move is framed on both sides rather than half-missed. If you prefer to read it the classical way, follow the rail that agrees with the trend and treat the other as the opposite wall of the same channel.
🔸 HOW A LINE EARNS ITS LOCK
While forming, each line is scored every bar by a perceptual fit , a running measure of how well its geometry matches what a careful trader would draw against the recent swing structure, blended with a one-pole toward its fitted slope so it settles rather than twitches. A lock is granted only when the geometry has gone still for long enough, the line has accumulated real tangency credit (genuine touches, not a single graze), and it spans a minimum bar count - and it is refused outright if it would invert the channel. The Mode dial sets how much evidence this takes.
🔹 THE AUDIT BADGE
Locked ink can carry a small measurement badge that reports, in plain terms, how the line is actually holding up:
• Wick-through - recent piercing of the line, exponentially weighted, measured against the tool's 10% design target . A well-behaved line lets price kiss it, not knife through it.
• Survival probability - the current modeled odds that the line is still valid.
• Maturity - how far through its estimated total run the move is, so a young trend reads differently from an exhausted one.
The badge is the tool grading its own work on the chart, not a trade instruction.
🔸 THE FORECAST - EACH BEAM READS ITS OWN VOLUME
Every live beam carries its own forecast, built entirely from the volume that has traded around that line. Trend Beams bins the intrabar volume by its distance from the beam, smooths it into a continuous density (a kernel-density estimate), and renders three things that ride the line:
• Calibration band - translucent ribbons hugging the beam, one per density bin, showing where the trend has held its volume. Strength is encoded as colour vibrancy at a constant perceptual lightness (the Oklab principle - a dense core reads vivid, the thin tails fade), so nothing is made brighter or darker than its weight warrants.
• Reach profile - a smooth filled contour fanning into the future margin, where each level's forward extent is its density times the trend's estimated remaining length . It answers, at a glance: if this trend keeps going, how far - and around which prices - does its own volume say it reaches?
• Ghost levels - dashed lines at the distribution's densest peaks, riding parallel to the beam, marking the prices this trend keeps returning to.
The forecast attaches only to a beam's currently-visible live element - its forming sketch, or its locked ink - and keeps no history . It is a read of the present trend, refreshed at the live edge, not a replay of the past.
🔸 THE ENGINE DIALS
• Mode - the tempo. Fast locks, breaks and re-forms sooner (short swings); Slow demands more evidence and holds through more noise (long moves); Medium is the balanced reference.
• Precision - how much data the engine reads: the perceptual fit window and the intrabar sample rate. Higher tiers resolve finer structure at more load. Sampling is timeframe-aware and never drops below one minute.
🔹 LAYERS, COLOUR & LEGIBILITY
Every layer is a toggle - forming lines, broken history, audit badges, and the forecast - so you can run it as a bare two-line channel or a fully dressed read. Colours come from three clean anchors: Support , Resistance , and Chrome (badges and neutral furniture). The whole translucent forecast - band, profile, and ghost levels - is coloured in the Oklab perceptual space, so strength shows up as vibrancy at a constant lightness rather than as glare, and a single Contrast dial scales the entire forecast from a whisper to bold.
🔸 HOW TO READ IT
• Treat a forming (dotted) line as a hypothesis and a locked (solid) line as a committed level - the tool is telling you which is which on purpose.
• Watch the audit badge : rising wick-through and falling survival probability say a locked line is wearing out.
• Read a broken line as a failed level that still marks where the structure gave way.
• Use each beam's band to see where its trend has held its volume, its reach profile for how far the trend's own volume says it can run, and its ghost levels for the prices it keeps returning to.
🔹 INPUTS
• Trend Engine - Mode (tempo) and Precision (data depth).
• Layers - show forming lines, broken history, audit badges, and the forecast.
• Colors - Support, Resistance, and Chrome anchors, plus a Contrast control for the translucent forecast.
• Channels - enable the support and/or resistance side independently.
🔸 LIMITATIONS AND HONEST NOTES
• This is a drawing and modeling assistant , not a validated strategy. It makes no performance claim and no edge claim . Nothing here is financial, investment or trading advice.
• Locked and broken lines do not repaint - once a line locks, its geometry is frozen. Forming lines move by design (they are the live sketch, and are dotted to say so), and each beam's forecast (band, profile, ghost levels) refreshes at the live edge as new volume arrives and attaches only to the current live element. These are live reads, on purpose; none of them rewrites confirmed history.
• Survival probability, maturity, remaining length and the reach profile are model estimates from the trend's own statistics - projections, not guarantees, and not forecasts of price.
• Intrabar sampling is subject to your plan's intrabar data limits ; higher Precision tiers read more intrabar data.
• Drawing budgets are finite. The tool caps its lines, labels and polylines internally, but very long histories with everything enabled push against TradingView's per-script drawing limits - trim the layers you don't need.
Gösterge

ARDI Williams Vix FixThis indicator is a reconstructed, faster, and visually distinct version of the popular Williams Vix Fix indicator (originally created by Chris Moody and later expanded by theehoganator ).
What does this indicator do?
By measuring market volatility, this indicator identifies periods of extreme fear (panic selling) and extreme greed (euphoric buying) to help locate potential market reversal points.
🚀 Key Features & Upgrades in the ARDI Version
1. Faster Execution & Code Optimization
Fully rewritten based on Pine Script v6. All legacy, commented-out, and experimental code has been cleaned up to ensure smoother and more efficient script performance on your chart.
2. New Interface & Full Support for "Fear & Greed" Phases
The indicator's visuals have been completely redesigned to simultaneously display both tops (greed) and bottoms (fear) with clear visual signals.
Candle overlays on the main chart have been removed to keep your price chart clean for price action analysis.
3. New ARDI Filter
Market noise, weak candles, and erratic signals are filtered out, significantly reducing false entries during sideways (ranging) markets.
4. Clean & Organized Settings Menu
Parameters are logically grouped and organized to make adjusting settings straightforward.
5. Rewritten Alert System
Alert logic has been completely rewritten and optimized for fast signal triggering, making it ideal for webhooks, trading bots, or mobile notifications.
💡 Important Note on Settings
The default settings have been specifically optimized for this version. However, if you adjust the input values to match the reference indicator settings, you will receive the exact classic signals.
Disclaimer: Past performance is not indicative of future results. Always practice proper risk management. Gösterge

Auto Target Pro◆➤OVERVIEW
Auto Target Pro v6 is a professional TradingView indicator designed to help traders manage entries, stop loss, and profit targets with a structured approach.
The indicator combines trend analysis, volatility measurement, and risk-based target calculation to provide a complete trade management system directly on the chart.
Auto Target Pro helps traders visualize potential entry points, risk levels, and multiple profit targets without manually calculating every level.
◆➤FEATURES
• Automatic BUY and SELL signals
• Dynamic Entry price calculation
• ATR-based Stop Loss system
• Automatic TP1, TP2, and TP3 levels
• Risk-to-Reward based target projection
• Real-time trade management
• Visual Entry, Stop Loss, and Target lines
• Target hit detection system
• Professional dashboard display
• Alert support for signals and targets
• Works on Forex, Crypto, Stocks, Indices, and Commodities
• Designed for scalping, intraday, and swing trading
◆➤HOW IT WORKS
Auto Target Pro uses a combination of trend structure and volatility analysis.
The system identifies market direction using trend calculations and detects potential trading opportunities.
After a signal appears:
◆➤BUY Setup:
Entry price is calculated automatically
Stop Loss is placed using market volatility
TP1, TP2, and TP3 are calculated based on risk distance
◆➤SELL Setup:
Entry price is calculated automatically
Stop Loss is adjusted according to bearish conditions
Multiple profit targets are displayed automatically
The target levels are dynamic and adapt according to current market conditions.
◆➤HOW TO USE
Add Auto Target Pro v6 to your TradingView chart.
Select your preferred timeframe according to your trading style:
Scalping: 1m, 5m, 15m
Intraday: 30m, 1H
Swing Trading: 4H, Daily
Wait for BUY or SELL confirmation.
Use the displayed levels:
Entry = Trade activation area
SL = Risk protection level
TP1 = First profit target
TP2 = Second profit target
TP3 = Final target area
Always combine signals with proper risk management and your own market analysis.
◆➤IMPORTANT NOTE
Auto Target Pro is a technical analysis tool created to assist traders in decision-making. No indicator can guarantee future market results. Always use proper risk management before entering any trade. Gösterge

AlgoPro V1 | PropTraderz A comprehensive all-in-one trading system combining trend detection, multi-timeframe analysis, risk management, and a real-time dashboard —
built for serious futures and equity traders.
Dashboard (11 timeframes, live)
The built-in dashboard shows at a glance:
- Current strategy & sensitivity settings
- Current Position (Buy/Sell)
- Trend direction & strength
- Volume, Volatility, Momentum readings
- Multi-timeframe trend alignment: 1min → Daily (11 timeframes)
Signal Engine
🔹 3 modes: Normal (crossover), Confirmed (trend + MACD + EMA alignment), Trend Scalper (HA-based)
🔹 Smart Signals — filters signals below/above 200 EMA
🔹 Consolidation filter — avoids signals in choppy, low-ADX markets
🔹 High Volume filter — signals only on volume expansion
Risk Management
🔹 Trailing Stop-Loss (ATR-based or % based)
🔹 3 Take Profit levels with visual areas
🔹 Swing High/Low markers
🔹 Support & Resistance auto-levels (pivot-based)
Visual Tools
🔹 Trend Cloud (Short/Long term or New — EMA150/250 based)
🔹 Auto Trendlines (linear regression channel)
🔹 Consolidation Zones (colored boxes)
🔹 Order Blocks with demand zone tracking
🔹 Elite Volume Profile overlay
Alerts: 15 configurable alert conditions — any signal, buy, sell, smart buy/sell, TP levels, S&R breaks, trend cloud.
Works on all markets and timeframes. Optimized for NQ, ES, MNQ, MES futures. Gösterge

Friendly Trend Friendly Trend is an adaptive trend-state indicator designed to answer two practical questions:
Is the current market structure in a confirmed bullish or bearish state?
Do the selected timeframes support the same directional bias?
The indicator simplifies trend reading without reducing the analysis to a basic moving-average crossover.
It combines directional efficiency, normalized price impulse, adaptive smoothing, volatility-sensitive boundaries, confirmation rules, and multi-timeframe context into one coordinated trend model.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧩 WHAT MAKES FRIENDLY TREND DIFFERENT
Friendly Trend is not a collection of unrelated indicators placed on the same chart.
Every component is part of one connected trend-state engine and has a specific role:
• Directional efficiency determines whether price is moving cleanly in one direction or following a noisy path.
• Normalized impulse measures the direction and strength of recent price movement.
• Adaptive smoothing changes the response speed of the trend basis according to current market conditions.
• The volatility model determines how far price must move before a change can qualify as meaningful.
• Slope, momentum, reversal-buffer, and consecutive-bar conditions confirm a new trend state.
• The multi-timeframe dashboard applies the same complete trend engine independently to each selected timeframe.
• The Overall result converts the individual timeframe states into a weighted directional score.
The script uses established mathematical building blocks such as exponential smoothing, True Range, and absolute price change.
Its original contribution is the way these measurements are connected into one adaptive trend-state architecture rather than used as separate signals or combined into a simple indicator mashup.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 DIRECTIONAL EFFICIENCY
The model compares:
• the net distance price has moved over the selected Length;
• the total path travelled by price during the same period.
A relatively direct move produces a higher efficiency value.
A market that repeatedly moves up and down while making little net progress produces a lower efficiency value.
This measurement helps the trend basis behave differently during:
• clean directional movement;
• noisy consolidation;
• uncertain or transitional conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ NORMALIZED IMPULSE
The script separately calculates directional impulse by comparing:
• smoothed signed price changes;
• smoothed absolute price changes.
The result is normalized around zero:
• positive values indicate upward directional pressure;
• negative values indicate downward directional pressure;
• values close to zero indicate weak or balanced movement.
Impulse performs two functions inside the model:
It helps determine how quickly the adaptive basis should react.
It filters trend changes that are not supported by sufficient directional strength.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 ADAPTIVE TREND BASIS
Friendly Trend calculates a faster and a slower smoothed price estimate.
It then blends them according to the current combination of:
• directional efficiency;
• absolute normalized impulse.
During clean directional movement, the faster estimate receives more influence, allowing the basis to follow price more closely.
During noisy or indecisive conditions, the slower estimate receives more influence, reducing unnecessary reactions to minor price fluctuations.
The result is a basis that adapts its response speed instead of using one fixed smoothing behavior in every market condition.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌊 ADAPTIVE TREND ZONE
The trend zone is not based on a fixed percentage or a single ATR value.
Its width combines:
• smoothed True Range;
• the mean absolute distance between price and the adaptive basis;
• the relationship between short-term and long-term volatility;
• the user-defined Band Multiplier.
The short-term versus long-term volatility ratio allows the zone to:
• expand when current market activity increases;
• contract when conditions become calmer;
• adjust to changing volatility regimes.
The volatility ratio is limited to prevent a single extreme movement from distorting the zone for an unnecessarily long period.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ TREND CONFIRMATION
A new bullish state requires all of the following conditions:
• price closes above the upper adaptive boundary;
• the adaptive basis has a positive slope;
• normalized impulse is above the Momentum Filter;
• price clears the additional Reversal Buffer;
• the complete condition remains valid for the selected number of Confirmation Bars.
A bearish state uses the opposite conditions:
• price closes below the lower adaptive boundary;
• the adaptive basis has a negative slope;
• normalized impulse is below the negative Momentum Filter;
• price clears the Reversal Buffer;
• the condition remains valid for the required number of closed bars.
Once a trend is confirmed, the state remains active until the opposite trend passes the same confirmation process.
This persistence is intentional. The trend does not change merely because price returns inside the adaptive zone.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 HOW TO READ THE CHART
🟢 Green basis and green zone
A bullish trend state has been confirmed.
🔴 Red basis and red zone
A bearish trend state has been confirmed.
⚪ Gray basis
The script does not yet have enough confirmed information to assign a bullish or bearish state.
🏷️ Bullish and Bearish labels
A label marks the bar where a new trend state was confirmed.
Labels are not printed on every bar.
The colored zone visualizes the active trend structure. It is not a profit target, stop-loss level, support level, or resistance level.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕒 MULTI-TIMEFRAME DASHBOARD
The dashboard calculates the complete Friendly Trend engine independently on four configurable timeframes.
The default timeframes are:
• 15 minutes;
• 1 hour;
• 4 hours;
• 1 day.
Each row can display one of three states:
• Bullish
• Bearish
• Neutral
The dashboard does not copy the state of the chart timeframe into the other rows.
Each selected timeframe performs its own calculation using the same adaptive trend model.
Higher-timeframe rows use the state of the most recently completed higher-timeframe bar.
When a selected timeframe is lower than the chart timeframe, the script uses a previously completed lower-timeframe state. This conservative approach introduces a small delay but avoids presenting an unfinished lower-timeframe candle as a confirmed trend.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚖️ OVERALL TREND
The Overall result is not calculated through a simple majority vote.
Each timeframe state is converted into a numerical value:
• Bullish = +1
• Bearish = −1
• Neutral = 0
The values are then weighted according to timeframe duration.
Larger timeframes receive more influence through logarithmic weighting, while smaller timeframes continue to contribute to the result.
The normalized score is classified as:
• Bullish when it is above the Overall Threshold;
• Bearish when it is below the negative Overall Threshold;
• Mixed when it remains between the two thresholds.
This means that two short-term bullish readings do not automatically override bearish conditions on both the 4-hour and daily timeframes.
A Mixed result indicates disagreement or insufficient directional alignment. It is not a separate market direction.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ HOW TO USE FRIENDLY TREND
Friendly Trend is designed primarily as a directional filter, not as a complete entry system.
One possible workflow is:
1. Identify the broader bias
Use Overall to understand the weighted multi-timeframe direction.
2. Review timeframe alignment
Check the individual dashboard rows to see where agreement or disagreement occurs.
3. Confirm the local trend
Use the trend state on the chart timeframe as the immediate directional context.
4. Apply an independent entry method
Combine the indicator with your own:
• market-structure setup;
• entry conditions;
• stop placement;
• position-sizing rules;
• exit plan.
5. Treat Mixed conditions cautiously
A Mixed result suggests that directional alignment is weak or divided.
Instead of forcing a bullish or bearish interpretation, traders may choose to reduce directional conviction until the timeframes become more aligned.
For example, a trader may prioritize long setups when both the chart state and Overall are Bullish, while avoiding countertrend setups when the higher timeframes remain strongly Bearish.
This is an example of interpretation, not a trading recommendation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ MAIN SETTINGS
Length
Controls the main observation window used by:
• the directional-efficiency calculation;
• the slower trend basis;
• the long-term volatility model.
Higher values generally produce:
• smoother behavior;
• fewer reactions to short-term changes;
• greater signal delay.
Lower values generally produce:
• faster reactions;
• greater sensitivity to local movement;
• more potential noise.
Band Multiplier
Controls the visible width of the adaptive trend zone.
Higher values:
• require a larger move before the trend can change;
• reduce sensitivity;
• may produce fewer signals.
Lower values:
• make the model more responsive;
• reduce the distance required for a trend change;
• may increase switching during sideways markets.
Confirmation Bars
Defines how many consecutive closed bars must satisfy all trend-change conditions.
A higher value provides stricter confirmation but also delays the signal.
Reversal Buffer
Adds extra distance beyond the displayed adaptive zone before a new trend can be confirmed.
Its purpose is to reduce rapid Bullish and Bearish changes when price repeatedly tests the zone during consolidation.
Momentum Filter
Defines the minimum normalized impulse required for a new trend.
Increasing this value rejects weaker directional moves.
Setting it too high may cause the indicator to miss gradual trends that develop without strong short-term momentum.
Overall Threshold
Controls how much weighted multi-timeframe agreement is required before Overall becomes Bullish or Bearish.
Higher values:
• require stronger agreement;
• produce more Mixed readings.
Lower values:
• classify directional alignment more easily;
• produce Bullish or Bearish results more frequently.
Time Frame 1–4
Define the four periods calculated in the dashboard.
The timeframes can be adjusted to match the user’s trading horizon.
A logical progression from lower to higher periods generally provides the clearest context.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS
The script includes alert conditions for:
• confirmed bullish trend changes on the chart timeframe;
• confirmed bearish trend changes on the chart timeframe;
• any confirmed chart-timeframe trend change;
• bullish and bearish changes for each dashboard timeframe;
• changes of Overall to Bullish;
• changes of Overall to Bearish.
Chart-timeframe trend alerts are based on confirmed bar-close changes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱️ REAL-TIME AND CONFIRMED-BAR BEHAVIOR
The adaptive basis and visible zone can move while the current price bar is still open because they reflect live market data.
However:
• the chart trend state changes only after the bar is confirmed;
• Bullish and Bearish labels are generated only on confirmed chart bars;
• chart-timeframe trend alerts are based on confirmed state changes;
• higher-timeframe dashboard states use completed higher-timeframe bars;
• lower-timeframe dashboard states are intentionally delayed to avoid using an unfinished lower-timeframe candle as a confirmed signal.
Users should distinguish between:
• the live movement of the adaptive basis and zone;
• a confirmed change of trend state.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS
Friendly Trend does not predict future prices.
Like any trend-following model, it may react with delay after a sudden reversal.
Confirmation Bars, the Reversal Buffer, and the Momentum Filter intentionally exchange some response speed for greater trend stability.
Sideways markets can still produce alternating trend states, especially when using:
• a short Length;
• a narrow trend zone;
• low confirmation requirements.
The indicator does not guarantee exact entries, exits, profits, or a specific win rate.
It should be used together with independent analysis and appropriate risk-management rules. Gösterge

PV56 XAUUSD 15M Institutional Liquidity ZonesI can create this TradingView Pine Script v6 indicator with only:
Green Buy Zones
Red Sell Zones
Zone name inside each box
Automatic mitigation/removal after invalidation
It will combine FVG, Order Block, Volume Imbalance, BPR, Mitigation Block, IDM, ITH/ITL, Breaker Block, Advanced/Reclaimed OB, Consolidation, and Institutional Zones.
No entry arrows, signals, TP, SL, dashboard, or trade setup. Gösterge

Opening Range Breakout Session Strategy [JOAT]Opening Range Breakout Session Strategy
Locks the opening range of your session, then trades disciplined, capped breakouts beyond it with fully framed risk.
What it is
The first minutes of a session set the day's battle lines. The opening range — the high and low forged during that early window — is where overnight orders, gap fills and early positioning collide, and price leaving that range tends to keep going. This indicator builds the opening range objectively, trades confirmed breakouts from it, and enforces the discipline that makes the approach workable: a session filter and a hard daily trade cap. It is an original implementation of the widely-used opening-range-breakout concept.
How it works
• Opening range — during a user-defined opening window (09:30–10:00 by default, in your chosen timezone) the tool records the high and low, then locks them as the reference range and draws a clean box with labelled ORH and ORL levels.
• Session and daily reset — signals are only allowed inside a separate trade-session window, and the range clears cleanly on each new day using a real day-change test, so nothing carries over stale.
• Breakout logic — a Buy fires on a confirmed close above the range high plus a small ATR buffer; a Sell on a confirmed close below the range low minus the buffer. The buffer filters marginal pokes through the edge.
• Discipline — a hard cap of N trades per day plus a minimum-bar spacing control prevent the range edges from generating repeated signals as price oscillates around them.
Trade framing
Each signal projects a red risk box and a green reward box. The stop is either the opposite opening-range edge (structure-based, the default) or an ATR distance, and the three targets ladder out in R multiples with labelled entry, stop and take-profit prices. Extension levels at 1R and 2R from the range edges are also projected as context for where a breakout may travel.
The dashboard
An adjustable session ticket shows the current phase (pre-open, opening, session or locked), the range size, the bias relative to the range, a breakout-extension meter, the trades used against the daily cap, the active signal, and a live first-target-before-stop tally from closed bars only.
How to use it
• Set the opening window, trade session and timezone to match your market (index or futures cash open, an FX session, or a crypto day boundary).
• Wait for the range to lock, then take confirmed breakouts; use the opposite edge as your invalidation and the extension levels as context.
• Respect the daily cap — the discipline is part of the method, not an afterthought.
Settings
Opening-range and trade-session windows, timezone, ATR length, stop mode and multiplier, breakout buffer, target R multiples, maximum trades per day, plus full visual and dashboard controls.
Originality and usefulness
Opening-range breakout is a public concept; the contribution here is the complete, disciplined implementation — objective range locking, a strict session and daily-reset model, buffered confirmed-close breakouts, structure-based stops at the opposite edge, and integrated non-repainting trade framing — explained so each control's purpose is clear.
Notes and limitations
• Range-bound sessions produce whipsaws around the edges; the buffer and daily cap reduce but do not remove this.
• Breakouts fail regularly — the opposite-edge stop and R-based targets exist precisely for that reason.
• Session settings must match the instrument, or the range will be measured at the wrong time.
• The win tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Gösterge

Gösterge

Regime Ribbon + CompassTraditional ADX asks you to read three tangled lines at once — +DI, −DI, and the ADX line — and combine them in your head in real time. This tool collapses all three into a single, intuitive read: direction by color, trend strength by height. No sub-pane needed — the entire regime picture lives right on your price chart.
◈ WHAT IT DOES
The Regime Ribbon recolors a smoothed baseline directly on your candles: green when the directional index confirms an uptrend with strength, red for a downtrend with strength, and muted gray during low-ADX chop. An optional faint background tint reinforces the current regime at a glance.
The Regime Compass — a floating right-edge gauge — turns the same read into a live instrument you can check at a glance:
Fill direction shows who's in control: the meter fills upward from its midline when bulls lead (+DI over −DI) and downward when bears lead (−DI over +DI).
Fill color matches the regime: green for an up-regime, red for a down-regime, dim gray during chop.
Fill height encodes conviction: the stronger the trend (higher ADX), the further the meter fills toward its pole. A weak or ranging market barely lifts off the midline; a powerful trend pushes the fill close to the edge.
Bull / Bear poles mark the top and bottom of the gauge so you always know which way is which.
A live readout on the meter prints the current state and ADX value — for example "▲ TREND 34", "▼ TREND 28", or "◈ CHOP 12" — and a light-blue dashed midline marks the neutral point.
One glance answers both questions traders normally have to compute from three separate lines: which way, and how much to trust it. The gauge floats to the right of the last candle so it never sits on top of your price action, and it can be slid further out to taste.
An on-chart dashboard ties everything together in one row along the bottom of the chart — no separate pane. Each cell is a live readout:
REGIME — the current state in plain terms: BULL ▲, BEAR ▼, or CHOP ◈, colored to match.
ADX — the raw ADX value plus a word for context: WEAK (below the trend threshold), TREND (trend confirmed), or STRONG (a powerful move).
STRENGTH — a compact bar that fills with ADX, so you can gauge trend power without reading the number.
+DI — the positive directional value (up-pressure).
−DI — the negative directional value (down-pressure).
BALANCE — the two directional values distilled into a single signed percentage. Positive means bulls lead, negative means bears lead, and the size shows how lopsided it is. This is the "collapsed" read at the heart of the tool.
TP/SL — the take-profit and stop-loss distances currently configured, with their unit (percent or ATR).
COOLDOWN — how many bars remain before a new signal is allowed, or "clear" when it's ready.
STATUS — the current position state: FLAT, LONG ●, or SHORT ●.
Together the ribbon, compass, and dashboard give you the full regime picture — direction, strength, the underlying directional balance, your trade parameters, and current state — all on the price chart, readable in a single glance.
◈ HOW TO USE
Read it in two steps — direction, then conviction:
Ribbon and compass green with the meter filling high → an uptrend with conviction. Continuation-style approaches tend to suit these conditions, and the taller the compass fill, the more decisive the move.
Red with the meter filling low → a downtrend with conviction.
Ribbon dim gray and the compass short (hugging the midline) → ADX is low; a chop/range regime where trend-following is prone to whipsaw and range tactics tend to fit better. Many traders simply stand aside here.
Watch the BALANCE cell and the compass together: when balance swings from negative to positive (or vice-versa) and the compass starts filling with height, that's the regime waking up — the shift from chop into a directional move.
Optional markers and funnel labels highlight the exact moment the regime flips into a confirmed strong trend, drawing example take-profit and stop-loss reference levels on the chart so you can see the setup framed end to end.
A practical workflow: use the ribbon for your at-a-glance bias, the compass for how much weight to give it, the BALANCE cell to spot early shifts, and the STATUS/COOLDOWN cells to keep your own entries disciplined.
◈ SETTINGS
Regime Engine — DI Length, ADX Smoothing, Trend Threshold (the ADX level separating trend from chop), Strong-Trend level.
Regime Ribbon — baseline length, background tint toggle.
Regime Compass — right-edge offset, width, height (in ATR).
Trade Levels — TP/SL in Percent or ATR, ATR length, TP/SL box toggle.
Risk Management — cooldown between signals, max bars in trade, optional EOD flatten window.
Webhook — optional alert payload with a configurable strategy ID.
Dashboard — on/off.
◈ NON-REPAINTING
All signals evaluate only on confirmed (closed) bars, and every directional value is read from closed bars — so a signal that prints will not disappear or shift intrabar. Entry logic arms on the signal bar's close and references the next bar's open, matching realistic order timing. No future data is used anywhere in the logic.
◈ DISCLAIMER
This script is a technical-analysis tool provided for educational and informational purposes only. It is not financial advice, does not predict future price movement, and does not guarantee any outcome. Trading carries a substantial risk of loss. Always do your own research and manage your own risk. The past behavior of any indicator or market condition does not indicate future results. Gösterge

Adaptive Trend Cloud [JOAT]═══ ADAPTIVE TREND CLOUD ═══
A volatility-adaptive ATR SuperTrend that breathes with the market. Instead of a fixed multiplier, the band width auto-scales to the live volatility regime, then paints a filled cloud to a signal EMA, colors your candles by trend strength, and drops ATR-anchored SL/TP zones on every confirmed flip. One clean, self-contained trend engine with a cyberpunk chrome readout.
▎ WHAT IT DOES
It tracks the prevailing trend with a SuperTrend line whose ATR multiplier adapts to how volatile price currently is — wider in turbulence to avoid whipsaw, tighter in calm to catch turns earlier. The space between that line and a signal EMA is filled as a Trend Cloud , candles are shaded by how far price sits from the line, and momentum-confirmed BUY / SELL labels fire only when trend, regime, and momentum agree.
▎ HOW IT WORKS
• Adaptive multiplier — current ATR is percentile-ranked against its recent window to place volatility on a 0–1 scale. The base multiplier is then scaled up or down within an adjustable range, so high volatility widens the bands and low volatility narrows them.
• SuperTrend core — upper and lower bands are built from your chosen price basis (hl2, close, or ohlc4) ± adaptive-multiplier × ATR, and direction flips when price closes through the opposite band.
• Trend Cloud — a fill is drawn between the SuperTrend line and an EMA (which doubles as the regime filter), tinted green in uptrends and red in downtrends.
• Trend strength — measured as the distance from close to the SuperTrend line in ATR units, clamped and normalized so roughly 3 ATR reads as fully saturated. This drives the candle and cloud gradient from weak to strong.
• Momentum confluence — an optional filter requiring RSI above/below its midline, or MACD histogram sign, to agree with the flip direction.
• Signal logic — a BUY needs a bullish flip plus price above the EMA plus momentum agreement; a SELL needs the mirror. All three conditions must line up.
• SL/TP zones — on each signal, stop distance is ATR × your SL multiple, TP1 sits at 1R, and TP2 at your risk:reward ratio; boxes, lines, and labels live-extend forward while the trade runs, then freeze on the next flip.
▎ HOW TO USE IT
• Trade with the cloud: green cloud and green-shaded candles favor longs, red favors shorts.
• Treat BUY / SELL labels as your trigger — they only appear on a confirmed flip that also passes the EMA and momentum filters.
• Use the RISK ZONE (red) and TARGET ZONE (green) boxes to frame a trade at a glance: entry line, dashed SL, dotted TP1 at 1R, and TP2 at your chosen R multiple.
• Read candle brightness as conviction — deeply saturated candles mean price is stretched from the line and the trend is strong; pale candles signal a weakening or fresh move.
• Optionally enable the VWAP + σ bands for an intraday mean-reference and to gauge stretch from the session average.
• Combine with your own structure, higher-timeframe bias, and levels — this is context, not a standalone system.
▎ KEY SETTINGS
• Engine — ATR length, base multiplier, adaptive range (0 = fixed multiplier), volatility rank window, and band source.
• Filters — signal/trend EMA length, momentum toggle, RSI vs MACD, RSI length and midline.
• Risk — show zones on/off, SL in ATR units, risk:reward ratio, zone projection length, and how many past zones to keep.
• Visuals — cloud toggle and transparency, gradient candles, line/EMA/label toggles, VWAP bands and σ, label size, and the four bull/bear gradient colors.
• Dashboard — show/hide, panel position, and text size.
▎ DASHBOARD
A compact chrome panel reports live: current Direction , the Adaptive Multiplier in effect, the Volatility Regime (Low / Normal / High with a percentile), Trend Strength %, Bars In Trend , Distance To Flip in ATR, the Active Signal state, the current ATR value, and whether Momentum is aligned or divergent.
▎ ALERTS
• Bull Flip — SuperTrend turns up with price above EMA and momentum aligned.
• Bear Flip — SuperTrend turns down with price below EMA and momentum aligned.
• Any Flip — either signal fires.
Each includes ticker and interval placeholders.
▎ NOTES
• Works on any market and any timeframe — the adaptive engine re-ranks volatility to whatever chart you load.
• Signals confirm on the close of the flip bar and do not repaint after that bar closes.
• Fully self-contained with no external libraries; every visual layer (cloud, candles, zones, VWAP, dashboard) has its own toggle so you can keep the chart as clean as you like.
For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results. Always do your own analysis and manage your own risk.
Made with passion by JackOfAllTrades ⚡ Gösterge

PSAR Trend Filter PSAR Trend Filter is an event-based trend filtering indicator built around Parabolic SAR reversals.
It helps separate ordinary PSAR direction changes from events that also meet the selected trend direction, movement strength, and confirmation requirements.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 CORE CONCEPT
PSAR Trend Filter is not designed as a simple combination of several independent indicators.
The script uses a structured validation sequence for one specific event:
Parabolic SAR identifies a possible direction change.
EMA checks whether the event agrees with the broader price direction.
ADX evaluates the strength of the current directional movement.
Optional candle confirmation checks the direction of the signal candle.
Cooldown limits signals that occur too close to one another.
Bar-close confirmation controls signal stability in real time.
Parabolic SAR is the only source of the initial event.
EMA, ADX, and the additional filters do not generate independent signals. Their role is to approve or reject a new crossover between price and PSAR.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THESE COMPONENTS ARE COMBINED
Each component has a separate function within one unified validation process.
🔹 PARABOLIC SAR — EVENT TIMING
An UP candidate appears when the closing price crosses above the PSAR value.
A DOWN candidate appears when the closing price crosses below the PSAR value.
An UP or DOWN label cannot appear without a new crossover between price and PSAR.
PSAR determines the timing of the event, but on its own it may change direction frequently during sideways or irregular market conditions.
🔹 EMA — DIRECTIONAL CONTEXT
EMA is used as a broader directional filter.
An UP event is allowed only when the closing price is above the EMA.
A DOWN event is allowed only when the closing price is below the EMA.
EMA does not generate a signal independently. It checks whether the new PSAR reversal agrees with the current directional context.
🔹 ADX — MOVEMENT STRENGTH
ADX evaluates the strength of directional movement without identifying whether that movement is bullish or bearish.
A PSAR event is accepted only when the ADX value is equal to or greater than the minimum level selected by the user.
The same length is used for the Directional Index calculation and ADX smoothing.
The purpose of this filter is to reject PSAR events that occur when measured directional strength is below the selected threshold.
🔹 CANDLE CONFIRMATION
When candle confirmation is enabled:
• UP requires a bullish candle, where the closing price is above the opening price.
• DOWN requires a bearish candle, where the closing price is below the opening price.
This is an additional check performed directly on the bar where the event occurs.
Candle confirmation is disabled by default.
🔹 COOLDOWN — SIGNAL FREQUENCY CONTROL
Cooldown prevents new accepted signals from appearing for a selected number of complete bars after the previous accepted signal.
A signal rejected by the cooldown condition is not postponed or restored later.
The next signal opportunity requires a new crossover between price and PSAR.
🔹 BAR-CLOSE CONFIRMATION
By default, UP and DOWN signals are confirmed only after the current bar closes.
This reduces the possibility of a label appearing while the bar is forming and disappearing before the bar closes.
When bar-close confirmation is disabled, UP or DOWN conditions may change during the formation of the current bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 UP SIGNAL LOGIC
An UP label appears only when all enabled conditions are satisfied on the same bar:
• The closing price crosses above Parabolic SAR.
• The closing price is above the EMA when the EMA filter is enabled.
• ADX is equal to or greater than the selected minimum when the ADX filter is enabled.
• The candle is bullish when candle confirmation is enabled.
• The cooldown requirement is satisfied.
• The bar is closed when bar-close confirmation is enabled.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 DOWN SIGNAL LOGIC
A DOWN label appears only when all enabled conditions are satisfied on the same bar:
• The closing price crosses below Parabolic SAR.
• The closing price is below the EMA when the EMA filter is enabled.
• ADX is equal to or greater than the selected minimum when the ADX filter is enabled.
• The candle is bearish when candle confirmation is enabled.
• The cooldown requirement is satisfied.
• The bar is closed when bar-close confirmation is enabled.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ EVENT-BASED ARCHITECTURE
All enabled filters must approve the event directly on the bar where price crosses PSAR.
For example, when an UP crossover occurs while ADX is below the selected minimum, the signal is rejected.
If ADX rises above the threshold on a later bar, the script does not generate a delayed UP signal. A new crossover between price and PSAR is required before another signal can be evaluated.
The indicator does not maintain a pending signal after a rejected reversal.
Each PSAR event is evaluated only at the moment it occurs.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 ORIGINALITY AND PRACTICAL PURPOSE
Parabolic SAR, EMA, and ADX are established technical analysis concepts.
The originality of PSAR Trend Filter is not based on claiming that the standard formulas behind these indicators are new.
The distinction lies in how the components are organized and how they work together within one event-based validation architecture.
The components are not treated as several equal or independent signals:
• PSAR is the only event trigger.
• EMA checks directional alignment.
• ADX checks movement strength.
• Candle confirmation checks agreement on the signal bar.
• Cooldown controls the spacing between accepted events.
• Bar-close confirmation determines whether the signal must wait for the bar to finish.
This structure creates a clear distinction between:
• the underlying Parabolic SAR state;
• a new PSAR reversal;
• a filtered UP or DOWN event.
The chart continuously displays the current PSAR state, while UP and DOWN labels and their corresponding alerts appear only after the complete enabled validation sequence is satisfied.
The signal architecture and implementation were developed specifically for this script.
No code from other published TradingView Community scripts was reused.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👁 HOW TO READ THE CHART
🟢 Green PSAR dots
The closing price is above the current Parabolic SAR value.
🔴 Red PSAR dots
The closing price is below the current Parabolic SAR value.
🟢 Green fill
Represents the current underlying upward PSAR state.
🔴 Red fill
Represents the current underlying downward PSAR state.
〰 Gray line
The EMA used by the directional filter.
⬆ UP label
An upward PSAR crossover approved by all enabled filters.
⬇ DOWN label
A downward PSAR crossover approved by all enabled filters.
Important:
The PSAR dots and colored fill represent the underlying PSAR state.
They do not mean that the EMA, ADX, candle confirmation, cooldown, and bar-close conditions have all been satisfied.
Only the UP and DOWN labels represent filtered events.
UP and DOWN describe the direction of an approved event. They are not automatic instructions to open or close a position.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠 DEFAULT SETTINGS
Parabolic SAR
• PSAR Start: 0.02
• PSAR Increment: 0.02
• PSAR Maximum: 0.20
Signal filters
• Confirm Signals On Bar Close: enabled
• EMA Trend Filter: enabled
• EMA Length: 50
• ADX Strength Filter: enabled
• ADX Length: 14
• Minimum ADX: 15
• Candle Confirmation: disabled
• Cooldown Between Signals: enabled
• Cooldown Bars: 1
Visual settings
• UP/DOWN labels: enabled
• PSAR trend fill: enabled
• EMA display: enabled
If the selected PSAR Maximum value is lower than PSAR Start, the script uses PSAR Start as the effective maximum value.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 HOW TO USE THE INDICATOR
Start with the default settings and compare the UP and DOWN labels with ordinary changes in the color and position of the PSAR dots.
This makes it possible to observe which PSAR reversals were rejected by the additional filters.
EMA Length
• A higher EMA length creates a slower directional filter.
• A lower EMA length makes the filter more responsive to recent price changes.
Minimum ADX
• A higher threshold requires stronger measured directional movement.
• A lower threshold allows more PSAR reversal events to pass the strength filter.
Candle Confirmation
Enable this setting when the direction of the signal candle should agree with the direction of the event.
Cooldown Bars
Increase this value to create more distance between accepted signals.
Disabling individual filters
Each filter can be disabled separately to evaluate its influence on the number and location of signals.
Settings should be evaluated for the selected symbol, timeframe, and market conditions.
A single parameter combination should not be considered universal for every market.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS
The script provides two separate alert conditions:
• PSAR Filtered UP
• PSAR Filtered DOWN
To keep alert behavior consistent with confirmed labels on the chart:
• keep Confirm Signals On Bar Close enabled;
• select Once Per Bar Close when creating the alert.
The alert message includes:
• event direction;
• exchange;
• symbol;
• timeframe;
• closing price.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏳ REALTIME BEHAVIOR
When bar-close confirmation is enabled, UP and DOWN labels are accepted only after the current bar has closed.
While the realtime bar is still forming, the following values may continue to update:
• the current PSAR value;
• the EMA value;
• the color of the PSAR dots;
• the colored PSAR fill.
These elements use current-bar market data.
When Confirm Signals On Bar Close is disabled, an UP or DOWN condition may appear and disappear before the current bar closes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 FUTURE DATA AND REPAINTING CONSIDERATIONS
The script does not use:
• future data;
• higher-timeframe lookahead;
• negative plot offsets;
• backward placement of signals on earlier bars;
• retrospective relocation of UP or DOWN labels.
When bar-close confirmation is enabled, filtered UP and DOWN events are accepted only on confirmed bars.
For more stable realtime behavior, keep Confirm Signals On Bar Close enabled and use Once Per Bar Close alerts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS
• Parabolic SAR is sensitive to changes in direction and may reverse frequently during sideways or irregular price movement.
• EMA and ADX are calculated from historical and current price data and therefore introduce lag.
• ADX measures strength but does not determine bullish or bearish direction.
• A signal rejected by one of the filters is not postponed to a later bar.
• Every new signal requires a new crossover between price and PSAR.
• The indicator does not calculate position size.
• The indicator does not determine acceptable risk.
• The indicator does not set stop-loss or take-profit levels.
• The indicator does not estimate expected returns.
• This script is an indicator, not an automated backtesting strategy.
• Results may vary depending on the symbol, timeframe, volatility, and market regime.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚖️ IMPORTANT
PSAR Trend Filter is an analytical tool.
It does not guarantee:
• the accuracy of every signal;
• profitability;
• the absence of losing trades;
• any specific future market result.
The user remains responsible for signal interpretation, risk management, and all trading decisions. Gösterge
