Dip-Tepe indikatörüAn indicator that aims to find bottoms and tops. Signals are given at bottoms and tops. It is not recommended for use alone; use it in conjunction with other technical analysis tools.
Buscar en scripts para "technical"
EMA 9/20 Crossover AlertThis EMA 9/20 Crossover Alert indicator is a technical tool used on price charts to detect and notify traders when the short-term 9-period Exponential Moving Average (EMA) crosses above or below the longer-term 20-period EMA. This crossover often signals potential shifts in market momentum, signaling possible buy or sell opportunities. The indicator visually plots both EMAs on the chart and creates alert conditions so traders can be promptly informed of these crossover events, aiding in timely decision-making without needing to constantly watch the chart. It is widely used in momentum and trend-following trading strategies to identify trend reversals or continuations
RMBS Smart Detector - Multi-Factor Momentum System
# RMBS Smart Detector - Multi-Factor Momentum System
## Overview
RMBS (Smart Detector - Multi-Factor Momentum System) is a proprietary scoring method developed by Ario, combining normalized RSI and Bollinger band positioning into a single composite metric.
---
## Core Methodology
### Buy/Sell Logic
Marker (green or red )appear when **all four filters** pass:
**1. RMBS Score (Momentum Strength)**
From the formula Bellow
Combined Range: -10 (extreme bearish) to +10 (extreme bullish)
Signal Thresholds:
• BUY: Score > +3.0
• SELL: Score < -3.0
2. EMA Trend Filter
BUY: EMA(21) > EMA(55) → Uptrend confirmed
SELL: EMA(21) < EMA(55) → Downtrend confirmed
3. ADX Strength Filter
Minimum ADX: 25 (adjustable 20-30)
ADX > 25: Trending market → Signal allowed
ADX < 25: Range-bound → Signal blocked
4. Alternating Logic
Prevents signal spam by requiring alternation:
✓ BUY → SELL → BUY (allowed)
✗ BUY → BUY → BUY (blocked)
________________________________________
Mathematical Foundation
RMBS Formula: scoring method developed by Ario
RMBS = (RSI – 50) / 10 + ((BB_pos – 50) / 10)
where:
• RSI = Relative Strength Index (close, L)
• BB_pos = (Close – (SMA – 2 σ)) / ((SMA + 2 σ) – (SMA – 2 σ)) × 100
• σ = standard deviation of close over lookback L
• SMA = simple moving average of close over lookback L
• L = rmbs_length (period setting)
This produces a normalized composite score around zero:
• Positive → bullish momentum and upper band dominance
• Negative → bearish momentum and lower band pressure
• Near 0 → neutral or transitional zone
Input Parameters
ADX Threshold (default: 25)
• Lower (20-23): More signals, less filtering
• Higher (28-30): Fewer signals, stronger trends
• Recommended: 25 for balanced filtering
Signal Thresholds
• BUY: +3.0 (adjustable)
• SELL: -3.0 (adjustable)
Visual Options
• Marker colors
• Background highlights
• Alert settings
________________________________________
Usage Guidelines
How to Interpret
• 🟢 Green Marker: All conditions met for Bull condition
• 🔴 Red Marker: All conditions met for Bear condition
• No Marker: Waiting for confirmation
________________________________________
Important Disclaimers
⚠️ Educational Purpose Only
• This tool demonstrates multi-factor technical analysis concepts
• Not financial advice or trade recommendations
• No guarantee of profitability
⚠️ Known Limitations
• Less effective in ranging/choppy markets
• Requires proper risk management (stop-loss, position sizing)
• Should be combined with fundamental analysis
⚠️ Risk Warning
Trading involves substantial risk of loss. Past performance does not indicate future results. Always conduct your own research and consult professionals before trading.
________________________________________
Open Source
Full Pine Script code available for educational study and modification. Feedback and improvement suggestions welcome.
“All logic is presented for research and educational visualization.”
---
**Attribution & Fair Use Notice**
The RMBS scoring framework (Multi-Factor Momentum System) was originally designed and formulated by *Ahmadrezarahmati( Ario or Ario_ Pine Lab)*.
If you build upon, modify, or republish this logic—please include proper attribution to the original author. This request is made under a spirit of open collaboration and educational fairness.
Holistiq Indicator – Trade Protocol Holistiq Indicator – Trade Protocol is an educational overlay that identifies areas where multiple technical elements converge (candlestick patterns, VWAP, S/R, Fibonacci levels and gaps). It’s designed to help traders visualise confluence and build disciplined trade plans. This public script shows the full source code for transparency and learning. Use responsibly; not financial advice.
FVG Zones with Signals█ OVERVIEW
"FVG Zones with Signals" is a technical analysis tool that identifies Fair Value Gaps (FVG) on the chart and draws customizable zones in the form of boxes. It is ideal for traders using price action and market structure strategies, helping to identify potential imbalance zones and trading opportunities based on breakout and exit signals. With flexible size filter settings, box styles, and signal options, the indicator ensures clarity and precision on the chart.
█ CONCEPTS
The indicator is designed to identify potential entry points for trades based on FVG breakouts or retests. For chart clarity, a size filter for FVGs is included, based on a multiplier of the average candle size over a specified period.
Why are FVGs important? FVG zones represent areas of market imbalance, often attracting price back to "fill" the gap. Larger gaps (with a higher size multiplier) have a greater chance of being retested, as they indicate deeper imbalances—leaving more unexecuted orders in those zones, which attracts liquidity. Market makers and institutions often return to these levels to "refresh" liquidity before further moves. However, not every large FVG is retested quickly—in strong trends, smaller imbalances may be ignored, and the location (e.g., near swing highs/lows) is critical for retest probability.
█ FEATURES
- FVG Detection: Identifies bullish and bearish FVGs based on size filters (Candle Size Period and FVG Size Multiplier), with automatic initialization of historical gaps up to 500 candles back.
- Customizable Boxes: Draws FVG boxes with adjustable border colors, background gradients, border styles (solid, dashed, dotted), border widths, and transparency for both the background and the 50% FVG midline.
- Breakout and Exit Signals: Generates "Break" signals (green upward triangle for breakouts above bearish FVG, red downward triangle for breakouts below bullish FVG) and "Exit" signals (circles for exiting the zone), with options to select signal types (Break, Exit, or Both). A break signal causes the box to disappear, leaving a triangle as a trace of the breakout, which may serve as a signal to open a position. Exit signals (circles) may also indicate entry opportunities but require additional confirmation, such as alignment with the main trend.
- Midline: Automatically draws a dashed line at the 50% FVG level with adjustable transparency, aiding in assessing price reactions within the zone.
- Box Limitation: Automatically removes old or inactive FVGs after 500 candles to avoid chart clutter.
- Alerts: Built-in alerts for all signal types, including price and FVG type descriptions.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- FVG Settings: Adjust Candle Size Period (default 20) and FVG Size Multiplier (default 1) to filter out small gaps—higher values generate fewer but more significant FVGs.
- Box Settings: Configure colors and styles for bullish (green) and bearish (red) boxes, including background transparency (default 80) and midline transparency.
- Signal Settings: Select signal types (Break, Exit, or Both) in Signal Type. Breakout signals appear after a candle closes outside the zone, while exit signals appear when exiting an FVG without a full breakout.
- Styling: Customize signal colors (green for buy/up, red for sell/down) and shape sizes.
Interpreting Signals:
- Break Up Signal: A green triangle below the bar indicates a breakout above a bearish FVG, suggesting potential continuation of an uptrend.
- Break Down Signal: A red triangle above the bar indicates a breakout below a bullish FVG, suggesting potential continuation of a downtrend.
- Exit Up/Down Signal: A green/red circle indicates an exit from an FVG without a full breakout, which may signal the end of a correction or preparation for a reversal.
- FVG Zones: If the price returns to an FVG and fills the gap, it may indicate equilibrium; an unfilled gap often leads to a retest.
- Use signals in conjunction with other technical analysis tools for confirmation, such as RSI (to identify overbought/oversold conditions) or MACD (to confirm momentum). Analyze FVGs from higher timeframes—these zones act as stronger imbalance levels and carry greater structural significance.
Exit signals (retests without breakouts) tend to be most effective when traded in line with the current trend.
█ APPLICATIONS
- Price Action Trading: Use FVG zones as dynamic support and resistance levels. In an uptrend, look for buying opportunities in bullish FVGs, where price often tests the gap before continuing. Combining with RSI, MACD, or Fibonacci levels enhances the significance of zones.
- Breakout Strategies: Trade based on breakout signals from FVGs. A buy signal after breaking a bearish FVG may indicate a strong upward impulse, especially when supported by a rising MACD or RSI exiting oversold conditions.
Larger FVG gaps (higher multiplier) have a greater chance of retest, as they indicate deeper imbalances.
█ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize size filters for your trading style.
- The indicator initializes historical FVGs up to 500 candles back, which may slow loading on longer charts.
- For best results, use on high-liquidity markets where FVGs are more frequently retested.
- In consolidation zones, the indicator may generate more false signals, so additional confirmation is recommended.
Cumulative Volume Delta Profile and Heatmap [BackQuant]Cumulative Volume Delta Profile and Heatmap
A multi-view CVD workstation that measures buying vs selling pressure, renders a price-aligned CVD profile with Point of Control, paints an optional heatmap of delta intensity, and detects classical CVD divergences using pivot logic. Built for reading who is in control, where participation clustered, and when effort is failing to produce result.
What is CVD
Cumulative Volume Delta accumulates the difference between aggressive buys and aggressive sells over time. When CVD rises, buyers are lifting the offer more than sellers are hitting the bid. When CVD falls, the opposite is true. Plotting CVD alongside price helps you judge whether price moves are supported by real participation or are running on fumes.
Core Features
Visual Analysis Components
CVD Columns - Plot of cumulative delta, colored by side, for quick read of participation bias.
CVD Profile - Price-aligned histogram of CVD accumulation using user-set bins. Shows where net initiative clustered.
Split Buy and Sell CVD - Optional two-sided profile that separates positive and negative CVD into distinct wings.
POC - Point of Control - The price level with the highest absolute CVD accumulation, labeled and line-marked.
Heatmap - Semi-transparent blocks behind price that encode CVD intensity across the last N bars.
Divergence Engine - Pivot-based detection of Bearish and Bullish CVD divergences with optional lines and labels.
Stats Panel - Top level metrics: Total CVD, Buy and Sell totals with percentages, Delta Ratio, and current POC price.
How it works
Delta source and sampling
You select an Anchor Timeframe that defines the higher time aggregation for reading the trend of CVD.
The script pulls lower timeframe volume delta and aggregates it to the anchor window. You can let it auto-select the lower timeframe or force a custom one.
CVD is then accumulated bar by bar to form a running total. This plot shows the direction and persistence of initiative.
Profile construction
The recent price range is split into Profile Granularity bins.
As price traverses a bin, the current delta contribution is added to that bin.
If Split Buy and Sell CVD is enabled, positive CVD goes to the right wing and negative CVD to the left wing.
Widths are scaled by each side’s maximum so you can compare distribution shape at a glance.
The Point of Control is the bin with the highest absolute CVD. This marks where initiative concentrated the most.
Heatmap
For each bin, the script computes intensity as absolute CVD relative to the maximum bin value.
Color is derived from the side in control in that bin and shaded by intensity.
Heatmap Length sets how far back the panels extend, highlighting recurring participation zones.
Divergence model
You define pivot sensitivity with Pivot Left and Right .
Bearish divergence triggers when price confirms a higher high while CVD fails to make a higher high within a configurable Delta Tolerance .
Bullish divergence triggers when price confirms a lower low while CVD fails to make a lower low.
On trigger, optional link lines and labels are drawn at the pivots for immediate context.
Key Settings
Delta Source
Anchor Timeframe - Higher TF for the CVD narrative.
Custom Lower TF and Lower Timeframe - Force the sampling TF if desired.
Pivot Logic
Pivot Left and Right - Bars to each side for swing confirmation.
Delta Tolerance - Small allowance to avoid near-miss false positives.
CVD Profile
Show CVD Profile - Toggle profile rendering.
Split Buy and Sell CVD - Two-sided profile for clearer side attribution.
Show Heatmap - Project intensity panels behind price.
Show POC and POC Color - Mark the dominant CVD node.
Profile Granularity - Number of bins across the visible price range.
Profile Offset and Profile Width - Position and scale the profile.
Profile Position - Right, Left, or Current bar alignment.
Visuals
Bullish Div Color and Bearish Div Color - Colors for divergence artifacts.
Show Divergence Lines and Labels - Visualize pivots and annotations.
Plot CVD - Column plot of total CVD.
Show Statistics and Position - Toggle and place the summary table.
Reading the display
CVD columns
Rising CVD confirms buyers are in control. Falling CVD confirms sellers.
Flat or choppy CVD during wide price moves hints at passive or exhausted participation.
CVD profile wings
Thick right wing near a price zone implies heavy buy initiative accumulated there.
Thick left wing implies heavy sell initiative.
POC marks the strongest initiative node. Expect reactions on first touch and rotations around this level when the tape is balanced.
Heatmap
Brighter blocks indicate stronger historical net initiative at that price.
Stacked bright bands form CVD high volume nodes. These often behave like magnets or shelves for future trade.
Divergences
Bearish - Price prints a higher high while CVD fails to do so. Effort is not producing result. Potential fade or pause.
Bullish - Price prints a lower low while CVD fails to do so. Capitulation lacks initiative. Potential bounce or reversal.
Stats panel
Total CVD - Net initiative over the window.
Buy and Sell volume with percentages - Side composition.
Delta Ratio - Buy over Sell. Values above 1 favor buyers, below 1 favor sellers.
POC Price - Current control node for plan and risk.
Workflows
Trend following
Choose an Anchor Timeframe that matches your holding period.
Trade in the direction of CVD slope while price holds above a bullish POC or below a bearish POC.
Use pullbacks to CVD nodes on your profile as entry locations.
Trend weakens when price makes new highs but CVD stalls, or new lows while CVD recovers.
Mean reversion
Look for divergences at or near prior CVD nodes, especially the POC.
Fade tests into thick wings when the side that dominated there now fails to push CVD further.
Target rotations back toward the POC or the opposite wing edge.
Liquidity and execution map
Treat strong wings and heatmap bands as probable passive interest zones.
Expect pauses, partial fills, or flips at these shelves.
Stops make sense beyond the far edge of the active wing supporting your idea.
Alerts included
CVD Bearish Divergence and CVD Bullish Divergence.
Price Cross Above POC and Price Cross Below POC.
Extreme Buy Imbalance and Extreme Sell Imbalance from Delta Ratio.
CVD Turn Bullish and CVD Turn Bearish when net CVD crosses zero.
Price Near POC proximity alert.
Best practices
Use a higher Anchor Timeframe to stabilize the CVD story and a sensible Profile Granularity so wings are readable without clutter.
Keep Split mode on when you want to separate initiative attribution. Turn it off when you prefer a single net profile.
Tune Pivot Left and Right by instrument to avoid overfitting. Larger values find swing divergences. Smaller values find micro fades.
If volume is thin or synthetic for the symbol, CVD will be less reliable. The script will warn if volume is zero.
Trading applications
Context - Confirm or question breakouts with CVD slope.
Location - Build entries at CVD nodes and POC.
Timing - Use divergence and POC crosses for triggers.
Risk - Place stops beyond the opposite wing or outside the POC shelf.
Important notes and limits
This is a price and volume based study. It does not access off-book or venue-level order flow.
CVD profiles are built from the data available on your chart and the chosen lower timeframe sampling.
Like all volume tools, readings can distort during roll periods, holidays, or feed anomalies. Validate on your instrument.
Technical notes
Delta is aggregated from a lower timeframe into an Anchor Timeframe narrative.
Profile bins update in real time. Splitting by side scales each wing independently so both are readable in the same panel.
Divergences are confirmed using standard pivot definitions with user-set tolerances.
All profile drawing uses fixed X offsets so panels and POC do not swim when you scroll.
Quick start
Anchor Timeframe = Daily for intraday context.
Split Buy and Sell CVD = On.
Profile Granularity = 100 to 200, Profile Position = Right, Width to taste.
Pivot Left and Right around 8 to 12 to start, then adapt.
Turn on Heatmap for a fast map of interest bands.
Bottom line
CVD tells you who is doing the lifting. The profile shows where they did it. Divergences tell you when effort stops paying. Put them together and you get a clear read on control, location, and timing for both trend and mean reversion.
Cumulative Volume DeltaCumulative Volume Delta (CVD) Indicator
This indicator is a modification of the Trading View CVD indicator. Cumulative Volume Delta (CVD), which represents the net difference between up volume (volume traded as the price increases) and down volume (volume traded as the price decreases) over a chosen Anchor Period.
The data for the CVD calculation is requested using the built-in ta.requestVolumeDelta function from a lower timeframe to approximate the directional volume with greater precision. This lower timeframe is either automatically selected based on the chart's timeframe or can be customized by the user.
Key Features and Inputs
Anchor Period: Defines the period over which the volume delta is accumulated and plotted. The default is "1D" (Daily), but it can be changed to any higher timeframe (e.g., "1W" for Weekly) to analyze CVD across different cycles.
CVD Candle Plot: The calculated volume delta values are plotted as a custom candle, where:
The open and close of the CVD candle represent the volume delta at the start and end of the anchor period, respectively.
The high and low represent the maximum and minimum volume delta reached during that period.
Up/Down Coloring Logic: The color of the CVD candle is determined by the directional movement of the price during the anchor period, allowing traders to quickly correlate volume delta with price action. Users can select between two methods via the "Strong Up/Down Coloring" input:
Strong Up/Down (Default): The candle is colored bullish (Teal) if the current price closes above the previous bar's high or bearish (Red) if it closes below the previous bar's low. This logic highlights significant momentum.
Regular Up/Down: The candle is colored bullish (Teal) if the close is greater than the open (price moved up) or bearish (Red) if the close is less than the open (price moved down).
Lower Timeframe Selection: This determines the resolution of the up and down volume components.
By default, the script automatically selects an appropriate lower timeframe (e.g., "1" minute for intraday charts, "5" minutes for daily charts) to balance historical data availability with calculation precision.
An option is provided to customize this "Lower Timeframe" for advanced users seeking higher or lower resolution.
The CVD indicator is a powerful tool for analyzing order flow dynamics and assessing the genuine strength of price movements by comparing the aggregate buying pressure (up volume) against the selling pressure (down volume).
Technical Notes (Code Details)
Language: Pine Script® //@version=6.
Function: Utilizes the ta.requestVolumeDelta() function with a user-defined anchorInput (default "1D") and a determined lowerTimeframe to retrieve the relevant delta data: .
Error Handling: Includes a check to confirm the symbol provides volume data, preventing runtime errors.
Multi Brownian Forecast📊 Multi Brownian Forecast (Time-Adaptive, Probabilistic)
This indicator uses a sophisticated Geometric Brownian Motion (GBM) Monte Carlo simulation to project future price paths. It adapts to any chart timeframe and provides quantitative, multi-period probability signals.
---
🧠 Core Mathematical Methodology
The model relies on GBM, which is a continuous-time stochastic process that models asset prices.
1. Historical Analysis (Drift & Volatility):
* The script first calculates Logarithmic Returns over a user-defined Historical Lookback (Hours) .
* Drift ($\mu$): Computed as the average of the log returns.
* Volatility ($\sigma$): Computed as the standard deviation of the log returns.
* These values are then time-adapted to an hourly step, compensating for the chart's current timeframe (e.g., 5-minute, 1-hour).
2. Monte Carlo Simulation:
* It runs a specified Number of Simulations (e.g., 1000).
* For each simulation, the price is stepped forward hourly using the GBM formula, which incorporates the calculated drift and a random shock drawn from a normal distribution (generated via the Box-Muller transform ).
---
✨ Key Features
Probabilistic Quartile Forecast: Plots a dynamic "cone" of probability on the chart. It shows key price percentiles (Q1, Q2/Median, Q3, and Q4/Outer Bound) at the forecast's expiration, visualizing the expected range of price outcomes based on the simulations.
Multi-Period Probability Signals: This is the core signal feature. Users can define multiple, independent forecast periods (e.g., 4h, 16h, 48h) in a comma-separated list.
* For each period, a Probability Up and Probability Down is calculated based on hitting a custom Target Price Change (%) (e.g., 2%) at a certain confidence level given a simulation over the historical backlook.
* The probabilities are displayed in a chart table. The cell text turns white if the calculated probability exceeds the user-defined Signal Confidence (%) .
Conditional Fibonacci Retracement: Optionally displays a Fibonacci Retracement on the chart. This feature is only activated when one of the multi-period signals reaches its minimum confidence threshold, providing a contextual technical level when a probabilistic edge is found.
Yon Hybrid Momentum + Breakout Scanner with BB SqueezeThis Pine Script indicator is a comprehensive momentum and breakout scanner that combines multiple technical analysis tools to identify high-probability trading setups. Here's what it does:
Core Features:
1. Trend Identification (EMA System)
Uses two EMAs (9-period fast, 20-period slow) to determine trend direction
Colors the chart background: teal = uptrend, red = downtrend
An uptrend is confirmed when the fast EMA crosses above the slow EMA
2. Volume Analysis
Monitors volume spikes (when current volume exceeds 2x the 20-period average)
Volume spikes often indicate strong institutional interest or breakout momentum
Critical for confirming the validity of price movements
3. Momentum Indicators
MACD (12, 26, 9): Shows bullish/bearish crossovers with triangle markers
RSI (7-period): Identifies overbought (>70) and oversold (<30) conditions
VWAP: Shows the volume-weighted average price (purple line) - helps identify whether price is trading at fair value
4. Bollinger Bands & Squeeze Detection
Displays Bollinger Bands (20-period, 2 standard deviations)
BB Squeeze: Detects when volatility contracts to its lowest level in 20 bars
Squeezes often precede explosive breakout moves (like a coiled spring)
Orange squares appear at the bottom when a squeeze is detected
5. Breakout Detection
The script identifies breakouts using TWO methods:
Price breakout: Close above the recent 20-bar high
BB breakout: Close above the upper Bollinger Band
Confirmed breakout: Must have uptrend + volume spike + one of the above conditions
Shows a green "BREAKOUT" label when all conditions align
6. Live Status Label
A label in the top-right displays real-time market conditions:
Current trend (UPTREND/DOWNTREND)
Volume status (VOL SPIKE/Normal Vol)
RSI condition (HOT/COOL/Neutral)
Squeeze status (if active)
7. Alerts
Two automated alerts:
Breakout Alert: Triggers when a confirmed breakout occurs
Squeeze Alert: Triggers when Bollinger Bands enter a squeeze
Trading Use Cases:
This indicator is ideal for:
Swing traders looking for momentum setups with strong volume confirmation
Breakout traders who want to catch explosive moves after consolidation
Day traders monitoring multiple timeframes for high-probability entries
Watchlist scanning to quickly identify which stocks/cryptos are showing momentum
How to Use It:
Setup Phase: Look for BB squeeze markers (orange squares) - these signal compression
Confirmation: Wait for volume spike + uptrend + MACD bullish crossover
Entry: When "BREAKOUT" label appears with all confirmations
Validation: Price should be above VWAP and RSI not extremely overbought
The script essentially automates the process of finding stocks that are "coiling up" and ready to make a big move, then confirms when that move actually happens with volume.
Pro Technical Suite - Clean✅ EMA labels (right side)Shows "EMA 8", "EMA 20", etc.✅ VWAP labelShows "VWAP"✅ Fib labelsShows "Fib 0.236", "Fib 0.382", etc.✅ ATR Trail labelShows "ATR Trail"✅ Info panel (top-right)RSI, MACD, ATR, VWAP, Trend✅ RSI background tintGreen when >55, red when <45
Trader AssistantDescription of the "Trader Assistant" indicator
Overview
- Trader Assistant is a comprehensive TradingView indicator (Pine Script v5) that combines volatility analysis (ATR), trading volume monitoring, and signal generation to support decision-making.
Core components
1) ATR (Average True Range) calculation
- Uses a custom daily ATR function (Trader-Assistant.pine:86)
- Daily timeframe enforcement via (Trader-Assistant.pine:107), independent of the current chart timeframe
- Configurable ATR length (default 5 bars)
2) ATR exhaustion analysis
- From daily open: how much of the daily ATR the price has moved from the open, as a percentage: (Trader-Assistant.pine:156)
- From daily extremes: percentage of the daily high–low range covered: (Trader-Assistant.pine:159)
3) Trading signals
- Long signal (💪) when ATR exhaustion is below the long threshold (default 30%)
- Short signal (✋) when ATR exhaustion is above the short threshold (default 70%)
- Color coding: green for long, red for short
4) Risk management levels
- From daily Open:
- Maximum: (Trader-Assistant.pine:166)
- Minimum: (Trader-Assistant.pine:167)
- Stop-loss: percentage of daily ATR (default 10%)
- Take-profit: multiple of stop-loss (default 4x)
- Slippage: percentage of stop-loss (default 10%)
- From daily High/Low:
- Maximum: (Trader-Assistant.pine:162)
- Minimum: (Trader-Assistant.pine:163)
- Intra-day granularity via 5-minute ATR: (Trader-Assistant.pine:170) over 30 bars, with corresponding SL/TP/slippage derived from it
5) Volume analysis
- Daily notional volume is built by summing 24 hourly bars: (Trader-Assistant.pine:142)
- Human-friendly K/M/B formatting of numbers
- Liquidity filter: line turns red when volume is below the configurable threshold (default 30M)
- Optional display toggle
Visualization
Table content (bottom-left of the chart), three columns:
- Columns: label, “From Open”, “From High/Low”
- Rows:
- Today’s maximum with ATR: “From Open” vs “From Low”
- Stop-loss: daily ATR vs 5-minute ATR
- Take-profit: daily ATR vs 5-minute ATR
- Slippage: daily ATR vs 5-minute ATR
- Today’s minimum with ATR: “From Open” vs “From High”
- Day volume (optional): value and color-coded sufficiency
- ATR value
- ATR exhaustion: percentage with emoji signal in both columns
Display settings and color cues
- Adjustable font size (0–3)
- Blue for max/min rows
- Green/red for signal rows
- Red for insufficient volume
Configurable inputs
ATR:
- Number of bars for ATR
- Upper/lower deviation limits for outlier handling (as inputs)
- Stop-loss size (% of daily ATR)
- Take-profit multiplier
- Slippage as % of stop-loss
Signals:
- Long threshold (% ATR exhaustion)
- Short threshold (% ATR exhaustion)
Volume:
- Toggle display
- Average period and averaging type (inputs exist; not used in current calculations)
- Minimum day volume threshold (in millions)
Technical notes
- Multi-timeframe aggregation via (Trader-Assistant.pine:107) for daily and 5-minute data
- Tick-accurate formatting with (Trader-Assistant.pine:34) and (Trader-Assistant.pine:37)
- Direct hourly summation for daily volume for simplicity and clarity: (Trader-Assistant.pine:142)
- Table adapts the number of rows based on whether volume is shown
Intended use
- Intraday trading: identify entry timing based on daily ATR exhaustion
- Risk management: automatic SL/TP/slippage calculations
- Trade filtering: ensure sufficient liquidity before acting
- Volatility assessment: track current movement relative to average daily range
Adaptive Volume Delta Map---
📊 Adaptive Volume Delta Map (AVDM)
What is Adaptive Volume Delta Map (AVDM)?
The Adaptive Volume Delta Map (AVDM) is a smart, multi-timeframe indicator that visualizes buy and sell volume imbalances directly on the chart.
It adapts automatically to the best available data resolution (tick, second, minute, or daily), allowing traders to analyze market activity with micro-level precision .
In addition to calculating volume delta (the difference between buying and selling pressure), AVDM can display a Volume Distribution Map — a per-price-level visualization showing how volume is split between buyers and sellers.
Key Features
✅ Adaptive Resolution Selection — Automatically chooses the highest possible data granularity — from tick to daily timeframe.
✅ Volume Delta Visualization — Displays delta candles reflecting the dominance of buyers (green), sellers (red), and delta (orange).
✅ Per-Level Volume Map (optional) — Shows detailed buy/sell volume distribution per price level, grouped by `Ticks Per Row`.
✅ Bid/Ask Classification — When enabled, AVDM uses bid/ask logic to classify trade direction with greater accuracy.
✅ Smart Auto-Disable Protection — Automatically disables volume map if too many price levels (>50) are detected — preventing performance degradation.
Inputs Overview
Use Seconds Resolution — Enables use of second-level data (if your TradingView subscription allows it).
Use Tick Resolution — Enables tick-based analysis for the most detailed view. If available, enable both tick and seconds resolution.
Use Bid/Ask Calculated — Uses bid/ask midpoint logic to classify trades.
Show Volume Distribution — Toggles per-price-level buy/sell volume visualization.
Ticks Per Row — Controls how many ticks are grouped per volume level. Reduce this value for finer detail, or increase it to reduce visual load.
Calculated Bars — Sets how many historical bars the indicator should process. Higher value increases accuracy but may impact performance.
How to Use
1. Add the indicator to your chart.
2. Ensure that your symbol provides volume data (and preferably tick or second-level data).
3. The indicator will automatically select the optimal timeframe for detailed calculation.
4. If your TradingView subscription allows second-level data , enable “Use Seconds Resolution.”
5. If your subscription allows tick-level data , enable both “Use Tick Resolution” and “Use Seconds Resolution.”
6. Adjust the “Calculated Bars” input to set how many historical bars the indicator should process.
7. Observe the Volume Delta Candles :
* Green = Buy pressure dominates
* Red = Sell pressure dominates
8. To see buy/sell clustering by price, enable “Show Volume Distribution.”
9. If the indicator disables the map and shows:
" Volume Distribution disabled: Too many price levels detected (>50). Try decreasing 'Ticks Per Row' or using a lower chart resolution. If you don’t care about the map, just turn off 'Show Volume Distribution'. "
— follow the instructions to reduce chart load.
Notes
* Automatically adapts to your chart’s resolution and data availability.
* If your symbol doesn’t provide volume data, a runtime warning will appear.
* Works best on futures , FX , and crypto instruments with high-frequency volume streams.
Why Traders Love It
AVDM combines adaptive resolution , volume delta analysis , and visual distribution mapping into one clean, efficient tool.
Perfect for traders studying:
* Market microstructure
* Aggressive vs. passive participation
* Volume absorption
* Order flow imbalance zones
* Delta-based divergence signals
Technical Highlights
* Built with Pine Script v6
* Adaptive resolution logic (`security_lower_tf`)
* Smart memory-safe map rendering
* Dynamic bid/ask classification
* Automatic overload protection
---
LA - MACD EMA BandsOverview of the "LA - MACD EMA Bands" Indicator
For Better view, use this indicator along with "LA - EMA Bands with MTF Dashboard"
The "LA - MACD EMA Bands" is a custom technical indicator written in Pine Script v6 for TradingView. It builds on the traditional Moving Average Convergence Divergence (MACD) oscillator by incorporating additional smoothing via Exponential Moving Averages (EMAs) and Bollinger Bands (BB) applied directly to the MACD line. This creates a multi-layered momentum and volatility tool displayed in a separate pane below the price chart (not overlaid on the price itself).
The indicator allows for customization, such as selecting a different timeframe (for multi-timeframe analysis) and adjusting period lengths. It fetches data from the specified timeframe using request.security with lookahead enabled to avoid repainting issues. The core idea is to provide insights into momentum trends, crossovers, and volatility expansions/contractions in the MACD's behavior, making it suitable for identifying potential trend reversals, continuations, or ranging markets.
Unlike a standard MACD, which focuses primarily on momentum via a single line, signal line, and histogram, this version emphasizes longer-term smoothing and volatility boundaries. It uses visual fills between lines to highlight bullish/bearish conditions, aiding quick interpretation. Below, I'll break down each component, its calculation, visual representation, and practical uses.
Detailed Breakdown of Each Component and Its Uses
MACD Line (Blue Line, Labeled 'MACD Line')
Calculation: This is the core MACD value, computed as the difference between a fast EMA (default length 12) and a slow EMA (default length 144) of the input source (default: close price). The EMAs are calculated on data from the selected timeframe.
Visuals: Plotted as a solid blue line.
Uses:
Measures momentum: When above zero, it indicates bullish momentum (prices rising faster in the short term); below zero, bearish momentum.
Trend identification: Rising MACD suggests strengthening uptrends; falling suggests downtrends.
Divergence spotting: Compare with price action—e.g., if price makes higher highs but MACD makes lower highs, it signals potential bearish reversal (and vice versa for bullish divergence).
In trading: Often used for entry/exit signals when crossing the zero line or other lines in the indicator.
MACD EMA (Red Line, Labeled 'MACD EMA')
Calculation: A 12-period EMA applied to the MACD Line itself.
Visuals: Plotted as a solid red line.
Uses:
Acts as a signal line for the MACD, smoothing out short-term noise.
Crossover signals: When the MACD Line crosses above the MACD EMA, it can signal a bullish buy opportunity; crossing below suggests a bearish sell.
Trend confirmation: Helps filter false signals in choppy markets by requiring confirmation from this slower-moving average.
In trading: Useful for momentum-based strategies, like entering trades on crossovers in alignment with the overall trend.
Fill Between MACD Line and MACD EMA (Green/Red Shaded Area, Titled 'MACD Fill')
Calculation: The area between the MACD Line and MACD EMA is filled with color based on their relative positions.
Color Logic: Green (with 57% transparency) if MACD Line > MACD EMA (bullish); red if MACD Line < MACD EMA (bearish).
Visuals: Semi-transparent fill for easy visibility without overwhelming the lines.
Uses:
Quick visual cue for momentum shifts: Green areas highlight bullish phases; red for bearish.
Enhances readability: Makes crossovers more apparent at a glance, especially in fast-moving markets.
In trading: Can be used to time entries/exits or as a filter (e.g., only take long trades in green zones).
Bollinger Bands on MACD (BB Upper: Black Dotted, BB Basis: Maroon Dotted, BB Lower: Black Dotted)
Calculation: Bollinger Bands applied to the MACD Line.
BB Basis: 144-period EMA of the MACD Line.
BB Standard Deviation: 144-period stdev of the MACD Line.
BB Upper: BB Basis + (2.0 * BB Stdev)
BB Lower: BB Basis - (2.0 * BB Stdev)
Visuals: Upper and lower bands as black dotted lines; basis as maroon dotted
Uses:
Volatility measurement: Bands expand during high momentum volatility (strong trends) and contract during low volatility (ranging or consolidation).
Mean reversion: When MACD Line touches or exceeds the upper band, it may signal overbought conditions (potential sell); lower band for oversold (potential buy).
Squeeze detection: Narrow bands (squeeze) often precede big moves—watch for breakouts.
In trading: Combines momentum with volatility; e.g., a MACD Line breakout above the upper band could confirm a strong uptrend.
BB Basis EMA (Green Line, Labeled 'BB Basis EMA')
Calculation: A 72-period EMA applied to the BB Basis (which is already a 144-period EMA of the MACD Line).
Visuals: Solid green line.
Uses:
Further smoothing: Provides a longer-term view of the MACD's average behavior, reducing noise from the BB Basis.
Trend direction: Acts as a baseline for the BB system—above it suggests bullish bias in momentum volatility; below, bearish.
Crossover with BB Basis: Can signal shifts in volatility trends (e.g., BB Basis crossing above BB Basis EMA indicates increasing bullish volatility).
In trading: Useful for confirming longer-term trends or as a filter for BB-based signals.
Fill Between BB Basis and BB Basis EMA (Gray Shaded Area, Titled 'BB Basis Fill')
Calculation: The area between BB Basis and BB Basis EMA is filled.
Color Logic: Currently set to a constant semi-transparent gray regardless of position.
Visuals: Semi-transparent gray fill.
Uses:
Highlights divergence: Shows when the shorter-term BB Basis deviates from its longer-term EMA, indicating potential volatility shifts.
Visual aid for crossovers: Makes it easier to spot when BB Basis crosses its EMA.
In trading: Could be used to identify overextensions in volatility (e.g., wide gray areas might signal impending mean reversion).
Zero Line (Black Horizontal Line)
Calculation: A simple horizontal line at y=0.
Visuals: Solid black line.
Uses:
Reference point: Divides bullish (above) from bearish (below) territory for all MACD-related lines.
In trading: Crossovers of the zero line by the MACD Line or BB Basis can signal major trend changes.
How It Differs from a Normal MACD
A standard MACD (e.g., the built-in TradingView MACD with defaults 12/26/9) consists of:
MACD Line: EMA(12) - EMA(26).
Signal Line: EMA(MACD Line, 9).
Histogram: MACD Line - Signal Line (bars showing convergence/divergence).
Key differences in "LA - MACD EMA Bands":
Periods: Uses a much longer slow EMA (144 vs. 26), making it more sensitive to long-term trends but less reactive to short-term price action. The MACD EMA is 12 periods (vs. 9), further emphasizing smoothing.
No Histogram: Replaces the histogram with fills and bands for visual emphasis on crossovers and volatility.
Added Bollinger Bands: Applies BB directly to the MACD Line (with a long 144-period basis), introducing volatility analysis absent in standard MACD. This helps detect "squeezes" or expansions in momentum.
Additional EMA Layer: The BB Basis EMA (72-period) adds a secondary smoothing level to the BB system, providing a hierarchical view of momentum (short-term MACD → mid-term BB → long-term EMA).
Multi-Timeframe Support: Built-in option for higher timeframes, unlike basic MACD.
Focus: Standard MACD is purely momentum-focused; this version integrates volatility (via BB) and multi-layer smoothing, making it better for trend-following in volatile markets but potentially overwhelming for beginners.
Overall, this indicator transforms the MACD from a simple oscillator into a comprehensive momentum-volatility hybrid, reducing false signals in trending markets but introducing lag.
Overall Pros and Cons
Pros:
Enhanced Visualization: Fills and bands make trends, crossovers, and volatility easier to spot without needing multiple indicators.
Reduced Noise: Longer periods (144, 72) smooth out whipsaws, ideal for swing or position trading in trending assets like stocks or forex.
Volatility Integration: BB adds a dimension not in standard MACD, helping identify breakouts or consolidations.
Customizable: Inputs for timeframes and lengths allow adaptation to different assets/timeframes.
Multi-Layered Insights: Combines short-term signals (MACD crossovers) with long-term confirmation (BB EMA), improving signal reliability.
Cons:
Lagging Nature: Long periods (e.g., 144) delay signals, missing early entries in fast markets or leading to late exits.
Complexity: Multiple lines and fills can clutter the pane, requiring experience to interpret; beginners might misread it.
Potential Overfitting: Custom periods (12/144/12/144/72) may work well on historical data but underperform in live trading without backtesting.
No Built-in Alerts/Signals: Relies on visual interpretation; users must manually set alerts for crossovers.
Resource Intensive: On lower timeframes or with lookahead, it might slow chart loading on Trading View.
This indicator shines in strategies combining momentum and volatility, like trend-following with BB squeezes, but test it on your assets (e.g., via backtesting) to ensure it fits your style.
For Better view, use this indicator along with "LA - EMA Bands with MTF Dashboard"
Dynamic Support & Resistance (DSR)tndicator description: Dynamic Support & Resistance (DSR)
What it does
Plots dynamic support and resistance that adapt to any timeframe. In bullish phases it highlights resistances; in bearish phases it highlights supports. Works for scalping, binary options, and day trading.
How it works
Detects recent swing highs/lows with noise filtering.
Merges nearby levels into “zones” with configurable tolerance.
Promotes a zone after a valid break-and-close.
Classifies context as trend, channel, or range via slope and move strength.
Shows only context-relevant zones to reduce clutter.
Inputs
Swing length (pivot high/low).
Merge tolerance (%, ticks, or ATR fraction).
Lookback depth.
Trend filter (EMA or optional ADX).
Minimum touches to validate a zone.
Display mode: lines, bands, or blocks.
Break sensitivity (close condition, wick allowance, body %).
Visual outputs
Resistance zones during bullish phases.
Support zones during bearish phases.
Dual zones in ranges/channels.
Labels: touch count, zone strength, last test timestamp.
Signals and rules (suggested)
Reversal: rejection candle at a valid zone + momentum/volume confirmation.
Continuation: strong close through the zone + successful retest.
Invalidation: two full closes back inside the zone in the opposite direction.
Alerts (templates)
“Price touched DSR Resistance .”
“Break of DSR Support with close > sensitivity.”
“Successful retest at DSR Zone. Possible continuation.”
Timeframe guidance
1–5m: higher sensitivity, tighter tolerance. For scalping and binaries.
15–60m: balance between frequency and reliability.
4H–D: anchor levels for intraday planning.
Risk management
Technical stop: beyond the opposite zone + tolerance buffer.
Scaled TP: first at mid-range, second at next DSR zone.
Avoid trading into high-impact news.
Advantages
Auto-adapts to trend, channel, and range without constant tuning.
Reduces noise by merging redundant levels.
Focus on zones with verified touches and strength.
Limitations
Not predictive. Use with price/volume confirmation.
In high volatility, zones can update quickly. Tune tolerance accordingly.
Disclaimer
Educational only. Not financial advice. Test on demo before live use.
LA - EMA Bands with MTF DashboardDetailed Explanation of the LA - EMA Bands with MTF Dashboard Indicator
This custom Pine Script v6 indicator, designed for Trading View, overlays EMA-based price channels on the chart while incorporating a multi-timeframe (MTF) dashboard for broader market context. It focuses on visualizing trend direction and momentum through three sets of EMA bands, each representing different time horizons, and extends this with a tabular dashboard that summarizes signals across user-selected timeframes. The bands help identify support, resistance, and trend shifts, while the dashboard provides at-a-glance alignment across multiple periods, aiding in confirming trades or spotting divergences. Unlike volatility-based channels (e.g., Bollinger or Keltner), it relies solely on EMAs for simplicity and lag-reduced responsiveness.
Inputs Section
The script begins with user-configurable options grouped for ease. A timeframe input allows specifying a resolution for the EMA bands' data fetching, defaulting to the chart's timeframe if left empty—this enables higher-timeframe overlays on lower charts for context.
Next, a shared source input defines the price data for all midlines, defaulting to the midpoint of high and low (hl2) but customizable to close, open, or others.
The EMA bands have dedicated toggles and length inputs for each of the three sets: the first (long-term) defaults to 144 periods, the second (medium-term) to 72, and the third (short-term) to 12. These are inlined for compact settings panels, with minimum lengths of 1 to prevent errors.
A boolean toggle controls the visibility of the MTF dashboard. Following this are nine pairs of inputs for dashboard timeframes: each pair includes a show/hide toggle and an editable timeframe string (e.g., '1' for 1-minute, 'D' for daily). Defaults progress from short (1, 3, 5 minutes) to longer (15, 30, 60 minutes, daily, weekly, monthly), grouped in inlines for organization. Only enabled and non-empty timeframes appear in the dashboard.
Helpers Section
Two utility functions are defined here. The first computes an EMA on any source series over a specified length using Trading View's built-in function, reused throughout for midlines and bands.
The second function generates a signal string ("B" for buy/bullish, "S" for sell/bearish, or "-" for neutral) based on the direction of an EMA applied to high prices. It compares the current EMA value to the previous one, mirroring the band fill logic for consistency in the dashboard.
Core Components per Band Set:
Midline: An EMA calculated on a user-selectable source price (default: hl2, which is the midpoint between high and low prices). This acts as the central trend line.
Upper Band: An EMA applied directly to the high prices of each bar.
Lower Band: An EMA applied to the low prices of each bar.
These form a channel that captures the smoothed range of price action, highlighting potential support (lower band), resistance (upper band), and overall trend direction (midline).
Multiple Band Sets: The indicator includes three independent EMA band sets, each with its own length parameter for customization:
EMA1 (default length: 144) – Focuses on long-term trends.
EMA2 (default length: 72) – Targets medium-term trends.
EMA3 (default length: 12) – Emphasizes short-term momentum.
Each set can be toggled on or off via input checkboxes, allowing users to reduce chart clutter if needed.
Visual Elements:
Midline Plot: Displayed as a line colored based on its direction compared to the previous bar: green for rising (bullish), red for falling (bearish), and black for neutral (flat).
Band Fill: The area between the upper and lower bands is filled with a semi-transparent color indicating the trend of the upper band: light green for rising (suggesting expanding highs/upward momentum) and light pink for falling (contracting highs/downward pressure). The bands themselves are plotted in blue with a thin linewidth.
Multi-Timeframe Support: Users can input a custom timeframe (e.g., 'D' for daily), and the indicator fetches data from that resolution. This enables higher-timeframe context on lower-timeframe charts, such as viewing daily EMA bands on a 1-hour chart.
Calculation Mechanics:
All EMAs are computed using Trading View's built-in ta.ema() function.
Data is retrieved in a single request.security() call for efficiency, with lookahead enabled to avoid repainting.
No multipliers or volatility adjustments are included, making it a simple EMA-based envelope rather than a true volatility channel.
In practice, this indicator helps traders identify trend strength, potential breakouts (price crossing bands), or mean-reversion opportunities (price bouncing within bands). It's particularly useful for swing or position trading where multi-period alignment (e.g., all midlines green) signals conviction.
Pros
Multi-Period Insight: By combining short (12), medium (72), and long (144) periods, it offers a layered view of trends across time horizons, helping confirm alignments or divergences without needing multiple separate indicators.
Visual Clarity: Color-coded trends and fills make it easy to spot bullish/bearish shifts at a glance, reducing analysis time.
Flexibility: Custom timeframe input allows for multi-timeframe analysis, while shared source and toggles provide user control.
Simplicity and Efficiency: Purely EMA-based, it's computationally light and avoids overcomplication, making it accessible for beginners while still useful for spotting channel-based setups like squeezes or expansions.
No Repainting: With lookahead, plots are stable once bars close.
Cons
Lagging Nature: EMAs inherently lag price action, especially longer ones like 144-period, which may cause delayed signals in fast-moving or ranging markets.
Lack of Volatility Adjustment: Unlike Keltner Channels or Bollinger Bands, it doesn't incorporate ATR or standard deviation, so bands may not accurately reflect true volatility—potentially leading to false breakouts in high-volatility environments.
Chart Clutter: Displaying all three band sets simultaneously can overcrowd the chart, particularly on lower timeframes or volatile assets.
Subjective Interpretation: Color changes and band interactions require trader discretion; there's no built-in alerting or quantitative signals, which might lead to inconsistent results.
Market Dependency: Defaults may not suit all assets (e.g., stocks vs. crypto); shorter periods like 12 could whipsaw in noisy markets, while 144 might be too slow for intraday trading.
Justification for Default Values (12, 72, and 144)
The default lengths of 12, 72, and 144 are not arbitrary but draw from established trading principles, particularly W.D. Gann's geometric and numerical theories, as well as Fibonacci sequences, to create a harmonic progression for short-, medium-, and long-term analysis. Here's the rationale:
12 (Short-Term): This is a common period for capturing recent momentum in technical indicators, often seen in setups like the MACD (which uses 12- and 26-day EMAs). It aligns with natural cycles, such as the 12 months in a year, and in Gann theory, 12 serves as a base unit for squaring price and time (e.g., in the "Square of 12" where multiples like 12, 24, etc., measure cycles in days, weeks, or months). At 12 periods, the EMA reacts quickly to price changes without excessive noise, making it ideal for short-term trend detection.
72 (Medium-Term): This acts as an intermediate bridge, derived from Gann's divisions of the 360-degree circle (a key Gann concept representing a full cycle). Specifically, 72 is 360/5 (relating to pentagonal geometry and natural harmonics) and appears in Gann's time cycle measurements (e.g., as a multiple in the Square of 12: 12×6=72). It's roughly half of 144, providing a balanced midpoint for medium-term trends without overlapping too closely with the others. In practice, 72 periods smooth out short-term fluctuations while still responding to developing trends.
144 (Long-Term): This is a powerhouse number in trading lore, being both 12 squared (12×12=144, central to Gann's "Square of 144" for monthly charts and major cycle turns, as there are 12 months in a year) and a Fibonacci sequence value (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144...). Fibonacci periods are popular in moving averages for their alignment with natural growth patterns in markets, and 144 is often used for long-term regime definition (e.g., confirming trends over 144 bars). It helps identify major support/resistance in extended cycles.
Overall, these values form a geometric/harmonic series (12, 72=12×6, 144=12×12), promoting alignment with market cycles as per Gann and Fibonacci principles, rather than generic lengths like 50 or 200. They can be adjusted based on the asset or timeframe, but the defaults provide a starting point rooted in time-tested trading numerology for balanced multi-period analysis.
Please use this along with other indicators (eg. Pivot, MACD, etc) for better results.
Ajay R5.41🔻 Ajay Gold 3H Power Indicator 🔻
Precision-Based Smart Sell System for Gold (XAU/USD)
💡 Overview
This indicator is specifically designed for Gold (XAU/USD) and delivers best results on the 3-Hour Timeframe (3H TF).
It is a Smart Money Logic-based Sell Confirmation System, combining institutional structure and candle behavior to generate highly accurate bearish signals.
⚙️ Technical Foundation
The indicator uses multiple advanced confirmations:
📉 EMA Trend Filter → Confirms downtrend
💪 RSI Overbought Rejection → Momentum reversal signal
📊 MACD Bearish Cross → Confirms trend strength
🕯️ Bearish Candle Structure → Price action validation
When all conditions align, a clear 🔻 Sell Signal is plotted on the chart.
💎 Hidden Feature
This indicator includes a hidden feature that activates only when the correct market structure forms.
It helps reduce false signals and increases accuracy without being visible on the chart — fully automated internal logic.
📆 Recommended Settings
Symbol: XAU/USD (Gold)
Timeframe: 3-Hour (3H)
Market: Forex / Commodity
Mode: Sell-Only Confirmation Indicator
Performance: Best precision and consistency on 3H TF
📈 How to Use
Select XAU/USD on chart and set 3H timeframe.
Add the indicator to the chart.
Wait for the 🔻 Sell Signal and confirm the market structure after candle close.
Take entry according to your risk management.
⚠️ Disclaimer
This indicator is for educational and analytical purposes only.
No system is 100% accurate — always backtest and demo trade before using in real trading.
💬 Credits
Developed by Ajay Sahu (India)
Based on Institutional & Smart Money Logic
Best results on 3H TF
Hidden Algorithm for XAU/USD traders
ULTIMATE Smart Trading Pro 🔥
## 🇬🇧 ENGLISH
### 📊 The Most Complete All-in-One Trading Indicator
**ULTIMATE Smart Trading Pro** combines the best technical analysis tools and Smart Money Concepts into a single powerful and intelligent indicator. Designed for serious traders who want a real edge in the markets.
---
### ✨ KEY FEATURES
#### 💰 **SMART MONEY CONCEPTS**
- **Order Blocks**: Automatically detects institutional zones where "smart money" enters positions
- **Break of Structure (BOS)**: Identifies structure breaks to confirm trend changes
- **Liquidity Zones**: Spots equal highs/lows areas where institutions hunt stops
- **Market Structure**: Visually displays bullish (green background) or bearish (red background) structure
#### 📈 **ADVANCED TECHNICAL INDICATORS**
- **RSI with Auto Divergences**: Classic RSI + automatic detection of bullish and bearish divergences
- **MACD with Signals**: Identifies bullish and bearish crossovers in real-time
- **Dynamic Support & Resistance**: Adaptive zones with intelligent scoring based on volume, multiple touches, and ATR
- **Fair Value Gaps (FVG)**: Detects unfilled price gaps (imbalance zones)
#### 📐 **AUTOMATIC TOOLS**
- **Auto Fibonacci**: Automatically calculates Fibonacci retracement levels on the last major trend
- **Pivot Points**: Daily, Weekly, or Monthly pivot points (PP, R1, R2, S1, S2)
- **Pattern Finder**: Automatically detects candlestick patterns (Hammer, Shooting Star, Engulfing, Morning/Evening Star) and chart patterns (Double Top/Bottom)
---
### 🎯 HOW TO USE IT
#### Quick Setup:
1. **Add the indicator** to your chart
2. **Open Settings** and enable/disable modules as needed
3. **Adjust parameters** for your trading style (scalping, swing, day trading)
#### Optimal Trading Setup:
🔥 **ULTRA STRONG Signal** when you have:
- An institutional **Order Block**
- Aligned with a **Support/Resistance** tested 3+ times
- An unfilled **FVG** nearby
- An **RSI divergence** confirming the reversal
- On a key **Fibonacci** level (50%, 61.8%, or 78.6%)
- Favorable market structure (green background for buys, red for sells)
---
### 💡 UNIQUE ADVANTAGES
✅ **Adaptive Intelligence**: Automatically adjusts to market volatility (ATR)
✅ **Volume Filters**: Validates important levels with volume confirmation
✅ **Multi-Timeframe Ready**: Works on all timeframes (1m to 1M)
✅ **Complete Alerts**: Notifications for all important signals
✅ **Clear Interface**: Emojis and colored labels for quick identification
✅ **Intelligent Scoring**: Levels ranked by importance (🔴🔴🔴 = very strong)
✅ **100% Customizable**: Enable only what you need
---
### 🎨 SYMBOL LEGEND
**Smart Money:**
- 🟢 OB = Bullish Order Block
- 🔴 OB = Bearish Order Block
- BOS ↑/↓ = Break of Structure
- 💧 LIQ = Liquidity Zone
**Candlestick Patterns:**
- 🔨 = Hammer (bullish signal)
- ⭐ = Shooting Star (bearish signal)
- 📈 = Bullish Engulfing
- 📉 = Bearish Engulfing
- 🌅 = Morning Star (bullish reversal)
- 🌆 = Evening Star (bearish reversal)
**Indicators:**
- 🚀 MACD ↑ = Bullish crossover
- 📉 MACD ↓ = Bearish crossover
- ⚠️ DIV = Bearish RSI divergence
- ✅ DIV = Bullish RSI divergence
**Support & Resistance:**
- 🟢/🔴 S1, R1 = Support/Resistance
- 🟢🟢🟢/🔴🔴🔴 = VERY strong level (3+ touches)
- (×N) = Number of times touched
---
### ⚙️ RECOMMENDED SETTINGS
**For Scalping (1m - 5m):**
- SR Lookback: 15
- Structure Strength: 3
- RSI: 14
- Volume Filter: ON
**For Day Trading (15m - 1H):**
- SR Lookback: 20
- Structure Strength: 5
- RSI: 14
- All filters: ON
**For Swing Trading (4H - Daily):**
- SR Lookback: 30
- Structure Strength: 7
- Pattern Lookback: 100
- Fibonacci: ON
---
### 🚨 DISCLAIMER
This indicator is a decision support tool. It does not guarantee profits and does not constitute financial advice. Always test on a demo account before real use. Trading involves significant risks.
---
## 📞 SUPPORT & UPDATES
For questions, suggestions, or bug reports, please comment below or contact the author.
**Version:** 1.0
**Last Updated:** October 2025
**Compatible:** TradingView Pine Script v6
---
### 🌟 If you find this indicator useful, please give it a 👍 and share it with other traders!
**Happy Trading! 🚀📈**
Key-Levels - D/W/M High-Low + Fib + MA🧭 Key-Levels – D/W/M High-Low + Fibonacci + Moving Averages
A complete multi-timeframe analysis toolkit that combines Daily, Weekly, and Monthly high/low levels, Fibonacci retracements, and customizable moving averages — all in one clean, efficient display.
Ideal for traders who want to identify key reaction zones, retracement levels, and trend alignment across multiple timeframes.
🔹 Features
1. Prior High/Low Levels
Plots Daily (PDH/PDL), Weekly (PWH/PWL), and Monthly (PMH/PML) key levels
Adjustable colors, styles (Solid / Dashed / Dotted), and line widths
Optional midline display for each timeframe
Displays live labels with price values and % difference from current close
Extend lines rightward to project future price interactions
2. Fibonacci Retracement
Auto-detects swing highs/lows using configurable pivot lengths
Smart pivot logic prioritizes major swings based on % span
Auto-orients retracements depending on trend direction
Customizable visibility and color for each Fibonacci level
Supports 0.236 → 1.618 levels, with optional auto-extension in uptrend scenarios
Displays ratio + price for each level label
3. Pivot Labels
Optionally show pivot high/low labels with customizable text and background colors
Independent control of left/right length and label style
4. Moving Averages
Up to three customizable MAs (default: 8 EMA, 21 EMA, 50 SMA)
Choose between EMA or SMA for each
Toggle individual or all moving averages
Adjustable lengths, colors, and line widths
5. Alerts
Built-in alert condition for price crossing a user-defined level
Clean alert message format with ticker symbol and live price
⚙️ Customization
Flexible style controls for lines, labels, and colors
Adjustable right-extension length for projecting levels
Font size and visibility toggles for all elements
Smart grouping for intuitive settings management
📈 Ideal For
Identifying key reversal or breakout zones
Spotting Fibonacci confluence between retracements and prior highs/lows
Tracking trend structure via multi-timeframe MAs
Swing traders, intraday traders, and technical analysts
💡 Summary
Key-Levels – D/W/M High-Low + Fib + MA is a professional-grade indicator designed to simplify complex multi-timeframe analysis.
It helps you see the bigger picture, find actionable zones, and trade with confidence.
🧩 Compatible with any market and timeframe.
Multi-Symbol and Multi-Timeframe Supertrend Screener [Pineify]Multi-Symbol and Multi-Timeframe Supertrend Screener
Advanced Supertrend screener for TradingView that monitors 6 symbols across 4 timeframes simultaneously. Features customizable ATR periods, visual alerts, and color-coded trend direction displays for efficient market scanning.
Key Features
The Supertrend Screener is a comprehensive multi-symbol market monitoring tool that displays Supertrend indicator signals across multiple assets and timeframes in a single, organized table view. This screener eliminates the need to manually check individual charts by providing real-time trend analysis for up to 6 symbols across 4 different timeframes simultaneously.
How It Works
The screener utilizes the proven Supertrend indicator methodology, which combines Average True Range (ATR) and price action to determine trend direction. The core calculation involves:
Computing the ATR using a customizable period (default: 10)
Applying a multiplication factor (default: 3.0) to create dynamic support/resistance levels
Determining trend direction based on price position relative to these levels
Displaying results through color-coded cells with customizable text labels
The indicator employs the request.security() function to fetch data from multiple symbols and timeframes, ensuring accurate cross-market analysis without chart switching.
Trading Ideas and Insights
This screener excels in several trading scenarios:
Market Overview: Quickly assess overall market sentiment across major cryptocurrencies or forex pairs
Trend Confirmation: Verify trend alignment across multiple timeframes before entering positions
Divergence Spotting: Identify when shorter timeframes diverge from longer-term trends
Opportunity Scanning: Locate assets showing consistent trend direction across all monitored timeframes
Risk Management: Monitor multiple positions simultaneously to spot potential trend reversals
The screener is particularly effective for swing traders and position traders who need to monitor multiple assets without constantly switching between charts.
How Multiple Indicators Work Together
While this screener focuses specifically on the Supertrend indicator, it incorporates several complementary technical analysis components:
ATR Foundation: Uses Average True Range to adapt to market volatility, making the indicator responsive to current market conditions
Multi-Timeframe Analysis: Combines signals from 1-minute, 5-minute, 10-minute, and 30-minute timeframes to provide comprehensive trend perspective
Price Action Integration: The Supertrend calculation inherently incorporates price action by using high, low, and close values
Volatility Adjustment: The ATR-based calculation ensures the indicator adapts to different volatility regimes across various assets
The synergy between these elements creates a robust screening system that accounts for both momentum and volatility , providing more reliable trend identification than single-timeframe analysis.
Unique Aspects
Several features distinguish this screener from standard Supertrend implementations:
Table-Based Display: Presents data in an organized, space-efficient format rather than overlay plots
Customizable Visual Elements: Full control over text labels, colors, and background styling
Multi-Asset Capability: Monitors 6 different symbols simultaneously without performance degradation
Efficient Resource Usage: Optimized code structure minimizes calculation overhead
Professional Presentation: Clean, institutional-grade visual design suitable for trading desks
How to Use
Symbol Configuration: Input your desired symbols in the Symbol section (default includes major crypto pairs)
Timeframe Setup: Configure four timeframes for analysis (default: 1m, 5m, 10m, 30m)
Supertrend Parameters: Adjust the Factor (sensitivity) and ATR Period according to your trading style
Visual Customization: Set custom text labels and colors for up/down trends
Market Analysis: Monitor the table for consistent signals across timeframes and symbols
Interpretation Guide:
- Green cells indicate uptrend (price above Supertrend line)
- Red cells indicate downtrend (price below Supertrend line)
- Look for alignment across multiple timeframes for stronger signal confidence
Customization
The screener offers extensive customization options:
Factor Setting: Adjust sensitivity (higher values = less sensitive, fewer signals)
ATR Period: Modify lookback period for volatility calculation
Text Labels: Customize up/down trend display text
Color Scheme: Full RGB color control for text and background elements
Symbol Selection: Monitor any TradingView-supported symbols
Timeframe Array: Choose any four timeframes for comprehensive analysis
Conclusion
The Supertrend Screener transforms traditional single-chart analysis into an efficient, multi-dimensional market monitoring system. By combining the reliability of the Supertrend indicator with multi-timeframe and multi-symbol capabilities, this tool empowers traders to make more informed decisions with greater market context.
Whether you're managing multiple positions, scanning for new opportunities, or confirming trend direction before entries, this screener provides the comprehensive overview needed for professional trading operations. The clean interface and customizable features make it suitable for traders of all experience levels while maintaining the analytical depth required for serious market analysis.
Perfect for day traders, swing traders, and anyone requiring efficient multi-market trend monitoring in a single view.
Bitcoin Cycle History Visualization [SwissAlgo]BTC 4-Year Cycle Tops & Bottoms
Historical visualization of Bitcoin's market cycles from 2010 to present, with projections based on weighted averages of past performance.
-----------------------------------------------------------------
CALCULATION METHODOLOGY
Why Bottom-to-Bottom Cycle Measurement?
This indicator defines cycles as bottom-to-bottom periods. This is one of several valid approaches to Bitcoin cycle analysis:
- Focuses on market behavior (price bottoms) rather than supply schedule events (halving-to-halving)
- Bottoms may offer good reference points for some analytical purposes
- Tops tend to be extended periods that are harder to define precisely
- Aligns with how some traditional asset cycles are measured and the timing observed in the broader "risk-on" assets category
- Halving events are shown separately (yellow backgrounds) for reference
- Neither halving-based nor bottom-based measurement is inherently superior
Different analysts prefer different cycle definitions based on their analytical goals. This approach prioritizes observable market turning points.
Cycle Date Definitions
- Approximate monthly ranges used for each event (e.g., Nov 2022 bottom = Nov 1-30, 2022)
- Cycle 1: Jul 2010 bottom → Jun 2011 top → Nov 2011 bottom
- Cycle 2: Nov 2011 bottom → Dec 2013 top → Jan 2015 bottom
- Cycle 3: Jan 2015 bottom → Dec 2017 top → Dec 2018 bottom
- Cycle 4: Dec 2018 bottom → Nov 2021 top → Nov 2022 bottom
- Future cycles will be added as new top/bottom dates become firm
Duration Calculations
- Days = timestamp difference converted to days (milliseconds ÷ 86,400,000)
- Bottom → Top: days from cycle bottom to peak
- Top → Bottom: days from peak to next cycle bottom
- Bottom → Bottom: full cycle duration (sum of above)
Price Change Calculations
- % Change = ((New Price - Old Price) / Old Price) × 100
- Example: $200 → $19,700 = ((19,700 - 200) / 200) × 100 = 9,750% gain
- Approximate historical prices used (rounded to significant figures)
Weighted Average Formula
Recent cycles weighted more heavily to reflect the evolved market structure:
- Cycle 1 (2010-2011): EXCLUDED (too early-stage, tiny market cap)
- Cycle 2 (2011-2015): Weight = 1x
- Cycle 3 (2015-2018): Weight = 3x
- Cycle 4 (2018-2022): Weight = 5x
Formula: Weighted Avg = (C2×1 + C3×3 + C4×5) / (1+3+5)
Example for Bottom→Top days: (761×1 + 1065×3 + 1066×5) / 9 = 1,032 days
Projection Method
- Projected Top Date = Nov 2022 bottom + weighted avg Bottom→Top days
- Projected Bottom Date = Nov 2022 bottom + weighted avg Bottom→Bottom days
- Current days elapsed compared to weighted averages
- Warning symbol (⚠) shown when the current cycle exceeds the historical average
Technical Implementation
- Historical cycle dates are hardcoded (not algorithmically detected)
- Dates represent approximate monthly ranges for each event
- The indicator will be updated as the Cycle 5 top and bottom dates become confirmed
- Updates require manual code maintenance - not automatic
- Users should verify they're using the latest version for current cycle data
-----------------------------------------------------------------
FEATURES
- Background highlights for historical tops (red), bottoms (green), and halving events (yellow)
- Data table showing cycle durations and price changes
- Visual cycle boundary boxes with subtle coloring
- Projected timeframes displayed as dashed vertical lines
- Toggle on/off for each visual element
- Customizable background colors
-----------------------------------------------------------------
DISPLAY SETTINGS
- Show/hide cycle tops, bottoms, halvings, data table, and cycle boxes
- Customizable background colors for each event type
- Clean, institutional-grade visual design suitable for analysis
UPDATES & MAINTENANCE
This indicator is maintained as new cycle events occur. When Cycle 5's top and bottom are confirmed with sufficient time elapsed, the code and projections will be updated accordingly. Check for the latest version periodically.
OPEN SOURCE
Code available for review, modification, and improvement. Educational transparency is prioritized.
-----------------------------------------------------------------
IMPORTANT LIMITATIONS
⚠ EXTREMELY SMALL SAMPLE SIZE
Based on only 4 complete cycles (2011-2022). In statistical analysis, this is insufficient for reliable predictions.
⚠ CHANGED MARKET STRUCTURE
Bitcoin's market has fundamentally evolved since early cycles:
- 2010-2015: Tiny market cap, retail-only, unregulated
- 2024-2025: Institutional adoption, spot ETFs, regulatory frameworks, macro correlation
The environment that created past patterns no longer exists in the same form.
⚠ NO PREDICTIVE GUARANTEE
Historical patterns can and do break. Market cycles are not laws of physics. Past performance does not guarantee future results. The next cycle may not follow historical averages.
⚠ LENGTHENING CYCLE THEORY
Some analysts believe cycles are extending over time (diminishing returns, maturing market). If true, simple averaging underestimates future cycle lengths.
⚠ SELF-FULFILLING PROPHECY RISK
The halving narrative may be partially circular - it works because people believe it works. Sufficient changes in market structure or participant behavior can invalidate the pattern.
⚠ APPROXIMATE DATA
Historical prices rounded to significant figures. Exact bottom/top dates vary by exchange. Month-long ranges are used for simplicity.
EDUCATIONAL USE ONLY
This indicator is designed for historical analysis and understanding Bitcoin's past behavior. It is NOT:
- Trading advice or financial recommendations
- A guarantee or prediction of future price movements
- Suitable as a sole basis for investment decisions
- A replacement for fundamental or technical analysis
The projections show "what if the pattern continues exactly" - not "what will happen."
Always conduct independent research, understand the risks, and consult qualified financial advisors before making investment decisions. Only invest what you can afford to lose.
Triple Gaussian Smoothed Ribbon [BOSWaves]Triple Gaussian Smoothed Ribbon – Adaptive Gaussian Framework
Overview
The Triple Gaussian Smoothed Ribbon is a next-generation market visualization framework built on the principles of Gaussian filtering - a mathematical model from digital signal processing designed to remove noise while preserving the integrity of the underlying trend.
Unlike conventional moving averages that suffer from phase lag and overreaction to volatility spikes, Gaussian smoothing produces a symmetrical, low-lag curve that isolates meaningful directional shifts with exceptional clarity.
Developed under the Adaptive Gaussian Framework, this indicator extends the classical Gaussian model into a multi-stage smoothing and visualization system. By layering three progressive Gaussian filters and rendering their interactions as a gradient-based ribbon field, it translates market energy into a coherent, visually structured trend environment. Each ribbon layer represents a progressively smoothed component of price motion, producing a high-fidelity gradient field that evolves in sync with real-time trend strength and momentum.
The result is a uniquely fluid trend and reversal detection system - one that feels organic, adapts seamlessly across timeframes, and reveals hidden transitions in market structure long before traditional indicators confirm them.
Theoretical Foundation
The Gaussian filter, derived from the Gaussian function developed by Carl Friedrich Gauss in 1809, operates on the principle of weighted symmetry, assigning higher importance to central price data while tapering influence toward historical extremes following a bell-curve distribution. This symmetrical design minimizes phase distortion and smooths without introducing lag spikes — a stark contrast to exponential or linear filters that sacrifice temporal accuracy for responsiveness.
By cascading three Gaussian stages in sequence, the indicator creates a multi-frequency decomposition of price action:
The first stage captures immediate trend transitions.
The second absorbs mid-term volatility ripples.
The third stabilizes structural directionality.
The final composite ribbon reflects the market’s dominant frequency - a smoothed yet reactive trend spine - while an independent, heavier Gaussian smoothing serves as a reference layer to gauge whether the primary motion leads or lags relative to broader market structure.
This multi-layered Gaussian framework effectively replicates the behavior of a signal-processing filter bank: isolating meaningful cyclical movements, suppressing random noise, and revealing phase shifts with minimal delay.
How It Works
Triple Gaussian Core
Price data is passed through three successive Gaussian smoothing stages, each refining the trend further and removing higher-frequency distortions.
The result is a fluid, continuously adaptive baseline that responds naturally to directional changes without overshooting or flattening key inflection points.
Adaptive Ribbon Architecture
The indicator visualizes its internal dynamics through a five-layer gradient ribbon. Each layer represents a progressively delayed Gaussian curve, creating a color field that dynamically shifts between bullish and bearish tones.
Expanding ribbons indicate accelerating momentum and trend conviction.
Compressing ribbons reflect consolidation and volatility contraction.
The smooth color gradient provides a real-time depiction of energy buildup or dissipation within the trend, making it visually clear when the market is entering a state of expansion, transition, or exhaustion.
Momentum-Weighted Opacity
Ribbon transparency adjusts according to normalized momentum strength.
As trend force builds, colors intensify and layers become more opaque, signifying conviction.
When momentum wanes, ribbons fade - an early visual cue for potential reversals or pauses in trend continuation.
Candle Gradient Integration
Optional candle coloring ties the chart’s candles to the prevailing Gaussian gradient, allowing traders to view raw price action and smoothed wave dynamics as a unified system.
This integration produces a visually coherent chart environment that communicates directional intent instantly.
Signal Detection Logic
Directional cues emerge when the smoother, broader Gaussian curve crosses the faster-reacting Gaussian line, marking structural inflection points in the filtered trend.
Bullish shifts : short-term momentum transitions upward through the long-term baseline after a localized trough.
Bearish shifts : momentum declines through the baseline following a local peak.
To maintain integrity in choppy markets, the framework applies a trend-strength and separation filter, which blocks weak or overlapping conditions where movement lacks conviction.
Interpretation
The Triple Gaussian Smoothed Ribbon provides a layered, intuitive read on market structure:
Trend Continuation : Expanding ribbons with deep color intensity confirm directional strength.
Reversal Phases : Color gradients flip direction, indicating a phase shift or exhaustion point.
Compression Zones : Tight, pale ribbons reveal equilibrium phases often preceding breakouts.
Momentum Divergence : Fading color intensity despite continued price movement signals weakening conviction.
These transitions mirror the natural ebb and flow of market energy - captured through the Gaussian filter’s ability to represent smooth curvature without distortion.
Strategy Integration
Trend Following
Engage during strong directional expansions. When ribbons widen and color gradients intensify, the trend is accelerating with high confidence.
Reversal Identification
Monitor for full gradient inversion and fading momentum opacity. These conditions often precede transitional phases and early reversals.
Breakout Anticipation
Flat, compressed ribbons signal low volatility and energy buildup. A sudden gradient expansion with renewed opacity confirms breakout initiation.
Multi-Timeframe Alignment
Use higher timeframes to establish directional bias and lower timeframes for entry during compression-to-expansion transitions.
Technical Implementation Details
Triple Gaussian Stack : Sequential smoothing stages produce low-lag, high-purity signals.
Adaptive Ribbon Rendering : Five-layer Gaussian visualization for gradient-based trend depth.
Momentum Normalization : Opacity dynamically tied to trend strength and volatility context.
Consolidation Filter : Suppresses false signals in low-energy or range-bound conditions.
Integrated Candle Mode : Optional color synchronization with underlying gradient flow.
Alert System : Built-in notifications for bullish and bearish transitions.
This structure blends the precision of digital signal processing with the readability of visual market analysis, creating a clean but information-rich framework.
Optimal Application Parameters
Asset Recommendations
Cryptocurrency : Higher smoothing and sigma for stability under volatility.
Forex : Balanced parameters for cycle identification and reduced noise.
Equities : Moderate Gaussian length for responsive yet stable trend reads.
Indices & Futures : Longer smoothing periods for structural confirmation.
Timeframe Recommendations
Scalping (1 - 5m) : Use shorter smoothing for fast reactivity.
Intraday (15m - 1h) : Mid-length Gaussian chain for balance.
Swing (4h - 1D) : Prioritize clarity and opacity-driven trend phases.
Position (Daily - Weekly) : Longer smoothing to capture macro rhythm.
Performance Characteristics
Most Effective In :
Trending markets with recurring volatility cycles.
Transitional phases where early directional confirmation is crucial.
Less Effective In:
Ultra-low volume markets with erratic tick data.
Random, micro-chop conditions with no structural flow.
Integration Guidelines
Pair with volatility or volume expansion tools for enhanced breakout confirmation.
Use ribbon compression to anticipate volatility shifts.
Align entries with gradient expansion in the dominant color direction.
Scale position size relative to opacity strength and ribbon width.
Disclaimer
The Triple Gaussian Smoothed Ribbon – Adaptive Gaussian Framework is designed as a signal visualization and trend interpretation tool, not a standalone trading system. Its accuracy depends on appropriate parameter tuning, contextual confirmation, and disciplined risk management. It should be applied as part of a comprehensive technical or algorithmic trading strategy.
Dominant DATR [CHE] Dominant DATR — Directional ATR stream with dominant-side EMA, bands, labels, and alerts
Summary
Dominant DATR builds two directional volatility streams from the true range, assigns each bar’s range to the up or down side based on the sign of the close-to-close move, and then tracks the dominant side through an exponential average. A rolling band around the dominant stream defines recent extremes, while optional gradient coloring reflects relative magnitude. Swing-based labels mark new higher highs or lower lows on the dominant stream, and alerts can be enabled for swings, zero-line crossings, and band breakouts. The result is a compact pane that highlights regime bias and intensity without relying on price overlays.
Motivation: Why this design?
Conventional ATR treats all range as symmetric, which can mask directional pressure, cause late regime shifts, and produce frequent false flips during noisy phases. This design separates the range into up and down contributions, then emphasizes whichever side is stronger. A single smoothed dominant stream clarifies bias, while the band and swing markers help distinguish continuation from exhaustion. Optional normalization by close makes the metric comparable across instruments with different price scales.
What’s different vs. standard approaches?
Reference baseline: Classic ATR or a basic EMA of price.
Architecture differences:
Directional weighting of range using positive and negative close-to-close moves.
Separate moving averages for up and down contributions combined into one dominant stream.
Rolling highest and lowest of the dominant stream to form a band.
Optional normalization by close, window-based scaling for color intensity, and gamma adjustment for visual contrast.
Event logic for swing highs and lows on the dominant stream, with label buffering and pruning.
Configurable alerts for swings, zero-line crossings, and band breakouts.
Practical effect: You see when volatility is concentrated on one side, how strong that bias currently is, and when the dominant stream pushes through or fails at its recent envelope.
How it works (technical)
Each bar’s move is split into an up component and a down component based on whether the close increased or decreased relative to the prior close. The bar’s true range is proportionally assigned to up or down using those components as weights.
Each side is smoothed with a Wilder-style moving average. The dominant stream is the side with the larger value, recorded as positive for up dominance and negative for down dominance.
The dominant stream is then smoothed with an exponential moving average to reduce noise and provide a responsive yet stable signal line.
A rolling window tracks the highest and lowest values of the dominant EMA to form an envelope. Crossings of these bounds indicate unusual strength or weakness relative to recent history.
For visualization, the absolute value of the dominant EMA is scaled over a lookback window and passed through a gamma curve to modulate gradient intensity. Colors are chosen separately for up and down regimes.
Swing events are detected by comparing the dominant EMA to its recent extremes over a short lookback. Labels are placed when a prior bar set an extreme and the current bar confirms it. A managed array prunes older labels when the user-defined maximum is exceeded.
Alerts mirror these events and also include zero-line crossings and band breakouts. The script does not force closed-bar confirmation; users should configure alert execution timing to suit their workflow.
There are no higher-timeframe requests and no security calls. State is limited to simple arrays for labels and persistent color parameters.
Parameter Guide
Parameter — Effect — Default — Trade-offs/Tips
ATR Length — Smoothing of directional true range streams — fourteen — Longer reduces noise and may delay regime shifts; shorter increases responsiveness.
EMA Length — Smoothing of the dominant stream — twenty-five — Lower values react faster; higher values reduce whipsaw.
Band Length — Window for recent highs and lows of the dominant stream — ten — Short windows flag frequent breakouts; long windows emphasize only exceptional moves.
Normalize by Close — Divide by close price to produce a percent-like scale — false — Useful across assets with very different price levels.
Enable gradient color — Turn on magnitude-based coloring — true — Visual aid only; can be disabled for simplicity.
Gradient window — Lookback used to scale color intensity — one hundred — Larger windows stabilize the color scale.
Gamma (lines) — Adjust gradient intensity curve — zero point eight — Lower values compress variation; higher values expand it.
Gradient transparency — Transparency for gradient plots — zero, between zero and ninety — Higher values mute colors.
Up dark / Up neon — Base and peak colors for up dominance — green tones — Styling only.
Down dark / Down neon — Base and peak colors for down dominance — red tones — Styling only.
Show zero line / Background tint — Visual references for regime — true and false — Background tint can help quick scanning.
Swing length — Bars used to detect swing highs or lows — two — Larger values demand more structure.
Show labels / Max labels / Label offset — Label visibility, cap, and vertical offset — true, two hundred, zero — Increase cap with care to avoid clutter.
Alerts: HH/LL, Zero Cross, Band Break — Toggle alert rules — true, false, false — Enable only what you need.
Reading & Interpretation
The dominant EMA above zero indicates up-side dominance; below zero indicates down-side dominance.
Band lines show recent extremes of the dominant EMA; pushes through the band suggest unusual momentum on the dominant side.
Gradient intensity reflects local magnitude of dominance relative to the chosen window.
HH/LL labels appear when the dominant stream prints a new local extreme in the current regime and that extreme is confirmed on the next bar.
Zero-line crosses suggest regime flips; combine with structure or filters to reduce noise.
Practical Workflows & Combinations
Trend following: Consider entries when the dominant EMA is on the regime side and expands away from zero. Band breakouts add confirmation; structure such as higher highs or lower lows in price can filter signals.
Exits and stops: Tighten exits when the dominant stream stalls near the band or fades toward zero. Opposite swing labels can serve as early caution.
Multi-asset and multi-timeframe: Works across liquid assets and common timeframes. For lower noise instruments, reduce smoothing slightly; for high noise, increase lengths and swing length.
Behavior, Constraints & Performance
Repaint and confirmation: No security calls and no future-looking references. Swing labels confirm one bar later by design. Real-time crosses can change intra-bar; use bar-close alerts if needed.
Resources: `max_bars_back` is two thousand. The script uses an array for labels with pruning, gradient color computations, and a simple while loop that runs only when the label cap is exceeded.
Known limits: The EMA can lag at sharp turns. Normalization by close changes scale and may affect thresholds. Extremely gappy data can produce abrupt shifts in the dominant side.
Sensible Defaults & Quick Tuning
Starting point: ATR Length fourteen, EMA Length twenty-five, Band Length ten, Swing Length two, gradient enabled.
Too many flips: Increase EMA Length and swing length, or enable only swing alerts.
Too sluggish: Decrease EMA Length and Band Length.
Inconsistent scales across symbols: Enable Normalize by Close.
Visual clutter: Disable gradient or reduce label cap.
What this indicator is—and isn’t
This is a volatility-bias visualization and signal layer that highlights directional pressure and intensity. It is not a complete trading system and does not produce position sizing or risk management. Use it with market structure, context, and independent risk controls.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
First Passage Time - Distribution AnalysisThe First Passage Time (FPT) Distribution Analysis indicator is a sophisticated probabilistic tool that answers one of the most critical questions in trading: "How long will it take for price to reach my target, and what are the odds of getting there first?"
Unlike traditional technical indicators that focus on what might happen, this indicator tells you when it's likely to happen.
Mathematical Foundation: First Passage Time Theory
What is First Passage Time?
First Passage Time (FPT) is a concept in stochastic processes that measures the time it takes for a random process to reach a specific threshold for the first time. Originally developed in physics and mathematics, FPT has applications in:
Quantitative Finance: Option pricing, risk management, and algorithmic trading
Neuroscience: Modeling neural firing patterns
Biology: Population dynamics and disease spread
Engineering: Reliability analysis and failure prediction
The Mathematics Behind It
This indicator uses Geometric Brownian Motion (GBM), the same stochastic model used in the Black-Scholes option pricing formula:
dS = μS dt + σS dW
Where:
S = Asset price
μ = Drift (trend component)
σ = Volatility (uncertainty component)
dW = Wiener process (random walk)
Through Monte Carlo simulation, the indicator runs 1,000+ price path simulations to statistically determine:
When each threshold (+X% or -X%) is likely to be hit
Which threshold is hit first (directional bias)
How often each scenario occurs (probability distribution)
🎯 How This Indicator Works
Core Algorithm Workflow:
Calculate Historical Statistics
Measures recent price volatility (standard deviation of log returns)
Calculates drift (average directional movement)
Annualizes these metrics for meaningful comparison
Run Monte Carlo Simulations
Generates 1,000+ random price paths based on historical behavior
Tracks when each path hits the upside (+X%) or downside (-X%) threshold
Records which threshold was hit first in each simulation
Aggregate Statistical Results
Calculates percentile distributions (10th, 25th, 50th, 75th, 90th)
Computes "first hit" probabilities (upside vs downside)
Determines average and median time-to-target
Visual Representation
Displays thresholds as horizontal lines
Shows gradient risk zones (purple-to-blue)
Provides comprehensive statistics table
📈 Use Cases
1. Options Trading
Selling Options: Determine if your strike price is likely to be hit before expiration
Buying Options: Estimate probability of reaching profit targets within your time window
Time Decay Management: Compare expected time-to-target vs theta decay
Example: You're considering selling a 30-day call option 5% out of the money. The indicator shows there's a 72% chance price hits +5% within 12 days. This tells you the trade has high assignment risk.
2. Swing Trading
Entry Timing: Wait for higher probability setups when directional bias is strong
Target Setting: Use median time-to-target to set realistic profit expectations
Stop Loss Placement: Understand probability of hitting your stop before target
Example: The indicator shows 85% upside probability with median time of 3.2 days. You can confidently enter long positions with appropriate position sizing.
3. Risk Management
Position Sizing: Larger positions when probability heavily favors one direction
Portfolio Allocation: Reduce exposure when probabilities are near 50/50 (high uncertainty)
Hedge Timing: Know when to add protective positions based on downside probability
Example: Indicator shows 55% upside vs 45% downside—nearly neutral. This signals high uncertainty, suggesting reduced position size or wait for better setup.
4. Market Regime Detection
Trending Markets: High directional bias (70%+ one direction)
Range-bound Markets: Balanced probabilities (45-55% both directions)
Volatility Regimes: Compare actual vs theoretical minimum time
Example: Consistent 90%+ bullish bias across multiple timeframes confirms strong uptrend—stay long and avoid counter-trend trades.
First Hit Rate (Most Important!)
Shows which threshold is likely to be hit FIRST:
Upside %: Probability of hitting upside target before downside
Downside %: Probability of hitting downside target before upside
These always sum to 100%
⚠️ Warning: If you see "Low Hit Rate" warning, increase this parameter!
Advanced Parameters
Drift Mode
Allows you to explore different scenarios:
Historical: Uses actual recent trend (default—most realistic)
Zero (Neutral): Assumes no trend, only volatility (symmetric probabilities)
50% Reduced: Dampens trend effect (conservative scenario)
Use Case: Switch to "Zero (Neutral)" to see what happens in a pure volatility environment, useful for range-bound markets.
Distribution Type
Percentile: Shows 10%, 25%, 50%, 75%, 90% levels (recommended for most users)
Sigma: Shows standard deviation levels (1σ, 2σ)—useful for statistical analysis
⚠️ Important Limitations & Best Practices
Limitations
Assumes GBM: Real markets have fat tails, jumps, and regime changes not captured by GBM
Historical Parameters: Uses recent volatility/drift—may not predict regime shifts
No Fundamental Events: Cannot predict earnings, news, or macro shocks
Computational: Runs only on last bar—doesn't give historical signals
Remember: Probabilities are not certainties. Use this indicator as part of a comprehensive trading plan with proper risk management.
Created by: Henrique Centieiro. feedback is more than welcome!