Swing Structure [HH HL LH LL + 😎 + 👻]Tracks real-time swing structure (HH, HL, LH, LL) using confirmed pivot points. Shows ghost 👻 and cool 😎 emojis at key higher low setups. Great for identifying breakout retests and trend continuation zones. No repaint.
Cycles
Dynamic Gap Probability ToolDynamic Gap Probability Tool measures the percentage gap between price and a chosen moving average, then analyzes your chart history to estimate the likelihood of the next candle moving up or down. It dynamically adjusts its sample size to ensure statistical robustness while focusing on the exact deviation level.
Originality and Value:
• Combines gap-based analysis with dynamic sample aggregation to balance precision and reliability.
• Automatically extends the sample when exact matches are scarce, avoiding misleading signals on rare extreme moves.
• Provides real “next-candle” probabilities based on historical occurrences rather than fixed thresholds or untested heuristics.
• Adds value by giving traders an evidence-based edge: you see how similar past deviations actually played out.
How It Works:
1. Calculate gap = (close – moving average) / moving average * 100.
2. Round the absolute gap to nearest percent (X%).
3. Count historical bars where gap ≥ X% above or ≤ –X% below.
4. If exact X% count is below the minimum occurrences threshold, include gaps at X+1%, X+2%, etc., until threshold is reached.
5. Compute “next-candle” green vs. red probabilities from the aggregated sample.
6. Display current gap, sample size, green probability, and red probability in a table.
Inputs:
• Moving Average Type (SMA, EMA, WMA, VWMA, HMA, SMMA, TMA)
• Moving Average Period (default 200)
• Minimum Occurrences Threshold (default 50)
• Table position and styling options
Examples:
• If price is 3% above the 200-period SMA and 120 occurrences ≥3% are found, with 84 green next candles (70%) and 36 red (30%), the script displays “3% | 120 | 70% green | 30% red.”
• If price is 8% below the SMA but only 20 exact matches exist, the script will include 9% and 10% gaps until it reaches 50 samples, then calculate probabilities from that broader set.
Why It’s Useful:
• Mean-reversion traders see green-probability signals at extreme overbought or oversold levels.
• Trend-followers identify continuation likelihood when red probability is high.
• Risk managers gauge reliability by inspecting sample size before acting on any signal.
Limitations:
• Historical probabilities do not guarantee future performance.
• Results depend on timeframe and symbol, backtest with your data before trading.
• Use realistic slippage and commission when overlaying on strategy scripts.
Enhanced Gann Time-Price SquaresEnhanced Gann Time-Price Squares Indicator
A comprehensive Pine Script indicator that identifies and visualizes W.D. Gann's time-price square formations on your charts. This tool helps traders spot potential market turning points where time and price movements align according to Gann's legendary market theories.
Key Features:
Automatic Square Detection - Identifies completed squares where price movement equals time movement
Future Projections - Shows forming squares with projected completion points
Pivot Integration - Automatically detects pivot highs/lows as square starting points
Visual Clarity - Clean box outlines with customizable colors and styles
Smart Filtering - Prevents overlapping squares and includes minimum move thresholds
Real-time Status - Information table showing current square formations
How to Use:
The indicator draws boxes when price moves from pivot points equal the time elapsed (number of bars). Green squares indicate upward movements, red squares show downward movements. Dashed lines show forming squares, while dotted lines project where they might complete.
Settings:
Adjust pivot sensitivity and minimum price moves
Customize tolerance for time-price matching
Toggle projections, labels, and visual elements
Fine-tune colors and line styles
Perfect for Gann theory practitioners and traders looking for time-based market analysis. The squares often coincide with significant support/resistance levels and potential reversal points.
Compatible with all timeframes and instruments.
More updates to follow
Altcoin Liquidity Flow Score - Big Moves Only//@version=6
indicator("Altcoin Liquidity Flow Score - Big Moves Only", overlay=false)
// Pull weekly macro data
walcl = request.security("FRED:WALCL", "W", close)
rrp = request.security("FRED:RRPONTSYD", "W", close)
tga = request.security("FRED:WDTGAL", "W", close)
hyg = request.security("AMEX:HYG", "W", close)
total3 = request.security("CRYPTOCAP:TOTAL3", "W", close)
usdt_d = request.security("CRYPTOCAP:USDT.D", "W", close)
// Calculate week-over-week change
delta_liquidity = ta.change(walcl + rrp - tga)
delta_rrp = ta.change(rrp)
delta_hyg = ta.change(hyg)
delta_total3 = ta.change(total3)
delta_usdt_d = ta.change(usdt_d)
// Compute raw score
raw_score = delta_liquidity - delta_rrp + delta_hyg + delta_total3 - delta_usdt_d
// Apply 3-week smoothing
score = ta.ema(raw_score, 3)
// Define threshold for major liquidity shift
threshold = 2.0
// Plot score + background for only strong signals
plot(score, title="Liquidity Flow Score (Smoothed)", color=color.teal, linewidth=2)
hline(0, "Zero Line", color=color.gray)
bgcolor(score > threshold ? color.new(color.green, 85) : score < -threshold ? color.new(color.red, 85) : na)
Heiken Ashi CVD v6.8🔷 Heiken Ashi CVD v6.8 — Predictive Gann HiLo + Momentum-Scored Trend System
Overview:
This premium-grade indicator blends the power of Heiken Ashi smoothing, real CVD (Cumulative Volume Delta), and a predictive Gann Hi-Lo trend engine — engineered for precision, clarity, and long-term stability.
💡 What it Does:
✅ Plots Smart Candles using your choice of:
Real CVD-based candles
Heiken Ashi CVD (for smoother order-flow clarity)
Or Heiken Ashi Price (as a fallback or volatility filter)
🔁 Switches Between 5 Trend Modes:
Gann HiLo – Traditional swing logic using high/low smoothing
HMA – Fast-reacting trend detection with Hull MA
GH-HMA (Average) – Balanced hybrid of HMA and SMA
GH-HMA (Confirm) – Requires both HMA and SMA to agree
GH-HMA (Score Weighted) – Uses intelligent scoring + momentum to confirm directional confidence
⚡ Optional Momentum Acceleration Filter:
Detects trend momentum surges using ROC (Rate of Change)
Filters weak signals in Score Weighted mode for higher confidence entries
User-toggleable: enable or disable as needed
📢 Alerts You ONLY When It Matters:
Buy/Sell signals fire only when both Price and your selected CVD/HA source close beyond the Gann HiLo trendline
Ensures the trend has flipped direction, not just flickered
🛡️ Failsafe Design:
Auto-fallback to HA Price if CVD data is unavailable
Candle logic and MA signals adapt seamlessly to selected source
Non-repainting, lightweight, multi-timeframe compatible
🎯 Ideal For:
Traders who want clean, high-probability trend signals
Volume delta analysts using Heiken Ashi-enhanced CVD
Professionals seeking a blend of visual clarity + confirmation logic
Anyone who wants predictive edge without repainting
🧠 Bonus:
Built with professional-grade logic, clean UI, and future-proof structure.
Fully customizable and user-friendly.
💎 Free to Use — Give Back, Not Guess
This tool was built to empower traders with transparent logic, predictive structure, and real insight — not just colors and noise.
Use it. Share it. Improve it.
CipherMatrix Dashboard (MarketCipher B)Pre-compute MarketCipher-B values for each fixed timeframe (5 m, 15 m, 30 m, 60 m, 4 H, Daily).
Pass those values into plotRow() instead of calling request.security() inside the helper—removes the style warning.
Added explicit range parameters to table.clear(dash, 0, 0, 2, 6) to satisfy v6’s argument requirement.
This version should compile without the previous warnings/errors. Swap in your real MarketCipher-B histogram when you’re ready, and the dashboard is good to go!
minchang volume tradingCondition
Point color
Volume ≥ 3× MA(24)
Violet
Volume ≥ 1.5× MA(24)
Red
Volume < 1.5× MA(24) & bullish
White
Volume < 1.5× MA(24) & bearish
Black
Breakout LabelsThis script labels the highest price of the lowest candle over a period of time. It then labels any bullish breakouts where the close price is higher than the high of the lowest candle.
Short-Term Holder MVRVThis script calculates and visualizes the Market Value to Realized Value (MVRV) ratio for Bitcoin, specifically focusing on short-term holders (STH). The MVRV ratio is a key on-chain metric that compares Bitcoin's market cap to its realized cap (the aggregate cost basis of all coins). It helps traders identify overbought and oversold conditions in the market.
Key Features
1. Moving Averages (Customizable)
The script allows users to apply different moving averages to smooth the MVRV data:
EMA (Exponential Moving Average)
SMA (Simple Moving Average)
SMMA/RMA (Smoothed/Rolling Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume-Weighted Moving Average)
HMA (Hull Moving Average)
2. Core Calculation
Fetches BTC_MVRV data from TradingView's security function.
Computes a moving average (default: 238-period WMA) of the MVRV values.
Calculates the Ratio_MVRV as:
text
Ratio_MVRV = Current MVRV / Moving Average of MVRV
A bullish signal is generated when Ratio_MVRV > 1 (market is heating up).
A bearish signal is generated when Ratio_MVRV < 1 (market is cooling down).
3. Visual Output
Main Plot:
A line chart showing Ratio_MVRV.
Orange when bullish (Ratio_MVRV > 1).
Purple when bearish (Ratio_MVRV < 1).
Horizontal Line:
A dotted white line at 1.0, acting as a threshold.
Table Display:
A small table in the top-right corner showing "↑ Bull" (green) or "↓ Bear" (red) based on the current market state.
4. Alerts
Triggers TradingView alerts when the market state changes between bullish and bearish.
Interpretation & Trading Signals
When Ratio_MVRV > 1 (Bullish):
Suggests Bitcoin is gaining momentum, possibly entering an overbought phase.
Could indicate a good time to hold or accumulate, but extreme highs may signal a potential top.
When Ratio_MVRV < 1 (Bearish):
Suggests Bitcoin is undervalued, possibly in an oversold phase.
Could indicate a buying opportunity, but prolonged lows may signal further downside.
Default Settings & Customization
Length: 238 (adjustable, default based on common long-term trend analysis).
Moving Average Type: WMA (Weighted Moving Average).
Users can modify these settings in the Inputs menu in TradingView.
Use Case
Helps traders identify market cycles by tracking short-term holder behavior.
Works best as a confirmation tool alongside other indicators (e.g., RSI, MACD).
Useful for swing traders and long-term investors looking for trend reversals.
XAUUSD BOS + Retest Looser Bot//@version=5
indicator("SMC Map — BOS/CHoCH + PD + Liquidity + Killzones", overlay=true)
// === CONFIG ===
pd_tf = input.timeframe("240", "HTF for PD array")
show_killzone = input.bool(true, "Show Killzones")
// === HTF SWINGS ===
htf_high = request.security(syminfo.tickerid, pd_tf, high)
htf_low = request.security(syminfo.tickerid, pd_tf, low)
pd_mid = (htf_high + htf_low) / 2
// Plot PD midline
plot(pd_mid, title="PD 50%", color=color.gray, linewidth=2)
// === SWING STRUCTURE ===
var float swing_high = na
var float swing_low = na
is_swing_high = ta.highest(high, 3) == high and close < high
is_swing_low = ta.lowest(low, 3) == low and close > low
if (is_swing_high)
swing_high := high
if (is_swing_low)
swing_low := low
// === BOS / CHoCH ===
bos_up = not na(swing_high) and close > swing_high
bos_down = not na(swing_low) and close < swing_low
var int structure_dir = 0 // 0=neutral, 1=up, -1=down
choch_up = false
choch_down = false
if (bos_up)
choch_up := structure_dir == -1
structure_dir := 1
if (bos_down)
choch_down := structure_dir == 1
structure_dir := -1
// === PLOTS ===
plotshape(bos_up, title="BOS UP", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(bos_down, title="BOS DOWN", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
plotshape(choch_up, title="CHOCH UP", style=shape.labelup, location=location.belowbar, color=color.lime, size=size.tiny, text="CHOCH")
plotshape(choch_down, title="CHOCH DOWN", style=shape.labeldown, location=location.abovebar, color=color.maroon, size=size.tiny, text="CHOCH")
plot(swing_high, title="Swing High Liquidity", color=color.new(color.green, 50), style=plot.style_cross, linewidth=1)
plot(swing_low, title="Swing Low Liquidity", color=color.new(color.red, 50), style=plot.style_cross, linewidth=1)
// === KILLZONE ===
in_london = (hour >= 6 and hour < 11)
in_ny = (hour >= 12 and hour < 18)
bgcolor(show_killzone and in_london ? color.new(color.green, 90) : na)
bgcolor(show_killzone and in_ny ? color.new(color.blue, 90) : na)
15min intervalsindicator displays 4 15 minute intervals within the hour. this simple indicator can be used for effective scalping.
Panchak 369This indicator highlights Panchak Dates based on Vedic astrology, marking specific lunar dates (Tithis) that occur when the Moon transits from Dhanishta to Revati Nakshatra. These days are considered astrologically sensitive and are traditionally avoided for initiating important activities.
Relative Strength Suite [BLC]📊 Relative Strength Suite
A powerful, all-in-one relative strength toolkit for traders and analysts. Whether you're a trend follower, momentum trader, or sector rotator, this script gives you the flexibility to analyze and screen assets using three distinct RS methodologies—all in one clean interface.
🔍 What It Does
Flexible Relative Strength allows you to compare any asset to a benchmark (like SP:SPX , NASDAQ:QQQ , AMEX:IWM , etc.) using one of four modes:
📈 Relative Strength – Classic price ratio comparison
📘 Dorsey Relative Strength – Smoothed trend-based RS using EMA
📒 Mansfield Relative Strength – Momentum-based RS normalized to its own average
🧮 Screener Mode – Load Indicator into Pine Screener to see all 3 values.
🛠️ Key Features & Settings
🧩 Relative Strength
Comparison Symbol: Select the ticker you want to use as a benchmark.
Highlights new highs/lows in Relative Strength with dynamic line coloring:
🟢 Green = New high (outperformance)
🔴 Red = New low (underperformance)
Optional moving average overlay (SMA, EMA, WMA, HMA) for trend smoothing.
✅ Use Case: Identify when a stock is gaining strength relative to the market or sector.
📘 2. Dorsey RS (Smoothed Trend)
Uses an EMA of the RS ratio to smooth out noise.
Rising Dorsey RS = consistent outperformance.
Falling Dorsey RS = consistent underperformance.
✅ Use Case: Spot long-term relative trends regardless of price volatility.
📒 3. Mansfield RS (Performance Momentum)
Compares RS ratio to its own long-term SMA (default 200).
Values above 0 = outperforming the benchmark.
Values below 0 = underperforming.
✅ Use Case: Ideal for momentum traders and Stan Weinstein-style stage analysis.
🧮 4. Screener Mode
Not for use on your chart. This is only to use in TradingView's Pine Screener.
Displays all three RS lines simultaneously.
Includes all 3 modes to act as screener signals
🛠️How to Use Screener Mode
Add this indicator to your favorites list.
Open Pine Screener and select this indicator.
Select your timeframe.
Click Settings & Change Strength Type to Screener > Click Apply
Hit Scan!
New High Low Signal: Finds stocks making a new RS high (1) or low (-1) over your lookback period.
Dorsey Trend Signal: Finds stocks where the smoothed RS trend is rising (1) or falling (-1).
Mansfield Zone Signal: Finds stocks where momentum is in the positive zone (1) or negative zone (-1)
✅ Use Case: Quickly scan multiple assets for relative strength breakouts, trend shifts, or momentum zones.
🧪 Pro Tip
Combine this indicator with volume, price structure, or moving averages to confirm breakouts and trend strength. Use Screener Mode on a watchlist to identify top RS candidates in seconds.
To clean up your screener table, click the column settings icon ( ⋮ ) and uncheck any columns you don't need to see. You can still filter by them even if they are hidden.
📝 Credits & Notes
Inspired by classic RS methods (including Dorsey and Mansfield).
Final, production-ready version with tooltips, labels, and screener outputs.
For educational and informational purposes—always test before live trading!
Let me know if you see any bugs, miscalculations, or any features you'd like to see added to it!
Fast Fourier Transform [ScorsoneEnterprises]The SCE Fast Fourier Transform (FFT) is a tool designed to analyze periodicities and cyclical structures embedded in price. This is a Fourier analysis to transform price data from the time domain into the frequency domain, showing the rhythmic behaviors that are otherwise invisible on standard charts.
Instead of merely observing raw prices, this implementation applies the FFT on the logarithmic returns of the asset:
Log Return(𝑚) = log(close / close )
This ensures stationarity and stabilizes variance, making the analysis statistically robust and less influenced by trends or large price swings.
For a user-defined lookback window 𝑁:
Each frequency component 𝑘 is computed by summing real and imaginary projections of log-returns multiplied by complex exponential functions:
𝑒^−𝑖𝜃 = cos(𝜃)−𝑖sin(𝜃)
where:
θ = 2πkm / N
he result is the magnitude spectrum, calculated as:
Magnitude(𝑘) = sqrt(Real_Sum(𝑘)^2 + Imag_Sum(𝑘)^2)
This spectrum represents the strength of oscillations at each frequency over the lookback period, helping traders identify dominant cycles.
Visual Analysis & Interpretation
To give traders context for the FFT spectrum’s values, this script calculates:
25th Percentile (Purple Line)
Represents relatively low cyclical intensity.
Values below this threshold may signal quiet, noisy, or trendless periods.
75th Percentile (Red Line)
Represents heightened cyclical dominance.
Values above this threshold may indicate significant periodic activity and potential trend formation or rhythm in price action.
The FFT magnitude of the lowest frequency component (index 0) is plotted directly on the chart in teal. Observing how this signal fluctuates relative to its percentile bands provides a dynamic measure of cyclical market activity.
Chart examples
In this NYSE:CL chart, we see the regime of the price accurately described in the spectral analysis. We see the price above the 75th percentile continue to trend higher until it breaks back below.
In long trending markets like NYSE:PL has been, it can give a very good explanation of the strength. There was confidence to not switch regimes as we never crossed below the 75th percentile early in the move.
The script is also usable on the lower timeframes. There is no difference in the usability from the different timeframes.
Script Parameters
Lookback Value (N)
Default: 30
Defines how many bars of data to analyze. Larger N captures longer-term cycles but may smooth out shorter-term oscillations.
9 EMA Angle Color Indicator//@version=5
indicator("9 EMA Angle Color Indicator", overlay=true)
// === INPUTS ===
emaLength = input.int(9, title="EMA Length")
angleThreshold = input.float(20.0, title="Angle Threshold (Degrees)", minval=0.1)
lookbackBars = input.int(5, title="Bars to Calculate Angle", minval=1)
// === EMA CALCULATION ===
emaValue = ta.ema(close, emaLength)
// === ANGLE CALCULATION (in degrees) ===
// Use simple slope * 100 and arc tangent conversion to degrees
slope = (emaValue - emaValue ) / lookbackBars
angle = math.atan(slope) * (180 / math.pi)
// === COLOR LOGIC ===
var color emaColor = color.black
// Initial color: black when angle is within range
emaColor := color.black
// Price and angle-based color change
if angle > angleThreshold and close > emaValue
emaColor := color.green
else if angle < -angleThreshold and close < emaValue
emaColor := color.red
else
emaColor := color.black
// === PLOT EMA ===
plot(emaValue, color=emaColor, linewidth=2, title="9 EMA Colored")
DIP BUYING by HAZEREAL BUY THE DIP - Educational Price Movement Indicator
This technical indicator is designed for educational purposes to help traders identify potential price reversal opportunities in equity markets, particularly focusing on NASDAQ-100 index tracking instruments and technology sector ETFs.
Key Features:
Monitors price movements relative to recent highs over customizable lookback periods
Identifies two distinct price decline thresholds: standard (5%+) and extreme (12.3%+)
Visual signals with triangular markers and background color zones
Real-time data table showing current metrics and status
Customizable alert system with webhook-ready JSON formatting
Clean overlay design that doesn't obstruct price action
How It Works:
The indicator tracks the highest price within a specified lookback period and calculates the percentage decline from that high. When price drops below the minimum threshold, it generates visual buy signals. The extreme threshold triggers enhanced alerts for more significant market movements.
Best Use Cases:
Educational analysis of market volatility patterns
Identifying potential support levels during market corrections
Studying historical price behavior around significant declines
Risk management and position sizing education
Important Note: This is a technical analysis tool for educational purposes only. All trading decisions should be based on comprehensive analysis and appropriate risk management. Past performance does not guarantee future results.
我的策略
The specific implementation of the dominant_cycle function needs to be done using ta.ht_dominant_cycle_period or by calculating the rate of change of the phase, which requires detailed technical processing in actual coding.
How to use the "Market Mathieu Oscillator":
• Green background (stable zone): The market is likely to be in a consolidation or mean reversion state. Trend strategies are riskier, while range trading or option seller strategies may be more dominant.
• Yellow background (warning zone): The market has entered a "flammable" state where resonance may occur. Counter-trend trading should be reduced, and preparations for potential breakthroughs should be started, tightening stops.
• Red background (unstable/resonance zone): **Highest alert! ** This shows that the market is not only "flammable", but also has a "spark" (strong driving force). This is the stage where the trend is most likely to accelerate and sustain itself. Counter-trend operations should be strictly avoided, and trend-following strategies should be actively adopted.
• Q Oscillator:
• The rising q value means that emotions are moving to extremes and the "fuel" of the trend is increasing.
• The q-value is falling, indicating that sentiment is returning to neutrality and the "fuel" of the trend is decreasing, which may indicate the exhaustion of the trend or the beginning of consolidation.
• When the q-value exceeds the red threshold line, it indicates that the driving force is extremely strong, which is one of the necessary conditions for entering the red background.
The "Market Mathieu Oscillator" is an innovative attempt to transform a profound physical and financial theory into an intuitive decision-making aid available on TradingView through a proxy and simplified approach. It cannot make precise quantitative predictions like theoretical models, but it provides a whole new dimension to observe the market: it no longer focuses solely on the price itself, but on the relationship between the "force" that drives the price and the "rhythm" of the market itself. Through this lens, traders can better understand when the market may turn from stability to turbulence, and make more strategic decisions.
TVI-3 Z-Score: MA + VWAP + BB Composite🔧 Overview:
It combines:
Z-score of price relative to the 200-period simple moving average (MA)
Z-score of price relative to the 200-period VWAP (volume-weighted average price)
Z-score of Bollinger Band width
The result is an average of these three Z-scores, plotted as a composite indicator for identifying overvalued and undervalued conditions.
Nến Tô Màu Theo Volume / MA(21)Condition
Point color
Volume ≥ 3× MA(24)
Violet
Volume ≥ 1.5× MA(24)
Red
Volume < 1.5× MA(24) & bullish
White
Volume < 1.5× MA(24) & bearish
Black
Repeating Trend HighlighterThis custom indicator helps you see when the current price trend is similar to a past trend over the same number of candles. Think of it like checking whether the market is repeating itself.
You choose three settings:
• Lookback Period: This is how many candles you want to measure. For example, if you set it to 10, it looks at the price change over the last 10 bars.
• Offset Bars Ago: This tells the indicator how far back in time to look for a similar move. If you set it to 50, it compares the current move to what happened 50 bars earlier.
• Tolerance (%): This is how closely the moves must match to be considered similar. A smaller number means you only get a signal if the moves are almost the same, while a larger number allows more flexibility.
When the current price move is close enough to the past move you picked, the background of your chart turns light green. This makes it easy to spot repeating trends without studying numbers manually.
You’ll also see two lines under your chart if you enable them: a blue line showing the percentage change of the current move and an orange line showing the change in the past move. These help you compare visually.
This tool is useful in several ways. You can use it to confirm your trading setups, for example if you suspect that a strong rally or pullback is happening again. You can also use it to filter trades by combining it with other indicators, so you only enter when trends repeat. Many traders use it as a learning tool, experimenting with different lookback periods and offsets to understand how often similar moves happen.
If you are a scalper working on short timeframes, you can set the lookback to a small number like 3–5 bars. Swing traders who prefer daily or weekly charts might use longer lookbacks like 20–30 bars.
Keep in mind that this indicator doesn’t guarantee price will move the same way again—it only shows similarity in how price changed over time. It works best when you use it together with other signals or market context.
In short, it’s like having a simple spotlight that tells you: “This move looks a lot like what happened before.” You can then decide if you want to act on that information.
If you’d like, I can help you tweak the settings or combine it with alerts so it notifies you when these patterns appear.