DoublePatternsDetects Double Top and Double Bottom patterns from pivot points using structural symmetry, valley/peak depth, and extreme validation. Returns a detailed result object including similarity score, target price, and breakout quality.
Göstergeler ve stratejiler
WedgePatternsDetects Rising and Falling Wedge chart patterns using pivot points, trendline convergence, and volume confirmation. Includes adaptive wedge length analysis and a quality score for each match. Returns full wedge geometry and classification via WedgeResult.
HeadShouldersPatternsDetects Head & Shoulders and Inverse Head & Shoulders chart patterns from pivot point arrays. Includes neckline validation, shoulder symmetry checks, and head extremeness filtering. Returns a detailed result object with structure points, bar indices, and projected price target.
XABCD_HarmonicsLibrary for detecting harmonic patterns using ZigZag pivots or custom swing points. Supports Butterfly, Gartley, Bat, and Crab patterns with automatic Fibonacci ratio validation and optional D-point projection using extremes. Returns detailed PatternResult including structure points and target projection. Ideal for technical analysis, algorithmic detection, or overlay visualizations.
[Top] Multi-Candle Pattern DetectorThe Multi-Candle Pattern Detector is a powerful tool that scans for a wide variety of high-probability candlestick formations directly on the chart. It highlights key multi-bar reversal and continuation patterns using intuitive emoji-based labels and descriptive tooltips, helping traders quickly assess market conditions and potential setups.
Supported patterns include:
Bullish & Bearish Engulfing
Morning Star / Evening Star
Three Line Strike
Rising / Falling Three Methods
Hammer / Inverted Hammer / Hanging Man / Gravestone Doji
To reduce false signals, this script includes a built-in trend filter using a custom LHAMA (Low-High Adaptive Moving Average) calculation. Patterns are only displayed when recent price action is not flat, helping traders avoid entries during consolidation.
Users can toggle each pattern type individually, making the script adaptable for various strategies and timeframes.
⸻
Potential Uses
Reversal Spotting: Identify key inflection points at the end of trends.
Continuation Confirmation: Confirm trend strength following brief pauses in momentum.
Price Action Training: Visually reinforce recognition of textbook candlestick patterns.
Strategy Integration: Combine with trend or volume filters for more advanced rule-based systems.
⸻
This indicator is suitable for traders who rely on price action and candlestick psychology, and is useful across all asset classes and chart intervals.
[Top] Unified Divergence DetectorThe Unified Divergence Detector (UDD) is a powerful tool designed to identify both regular and hidden divergences across multiple oscillators—RSI, CCI, and Stochastic—in a single unified indicator.
Unlike other divergence tools that focus on one source at a time, this script cross-checks multiple indicators simultaneously and consolidates the results into a single signal. Labels appear only when at least one divergence is detected, with optional color-coding to distinguish the number and type of divergences:
🐂 Bullish Divergence: Signals a potential reversal or continuation to the upside.
🐻 Bearish Divergence: Signals a potential reversal or continuation to the downside.
The script lets users configure:
Whether to detect regular, hidden, or both types of divergence.
Pivot lookback parameters and divergence detection range.
Separate label colors for 1, 2, or 3+ confirmations from different indicators.
Tooltips are dynamically generated and offer guidance on interpreting each signal based on the oscillator sources involved and the divergence type. Labels are intelligently placed to avoid clutter and display only the strongest, most relevant signals.
⸻
Potential Uses
Trend Reversals: Spot early signs of exhaustion and prepare for a trend change.
Trend Continuations: Confirm existing trends via hidden divergence signals.
Multi-Timeframe Confirmation: Combine this indicator with higher timeframe trend tools to validate entries or exits.
Custom Strategy Building: Integrate into more complex strategies involving price action or volume filters.
⸻
This indicator is ideal for traders who value confirmation from multiple sources and prefer clear, high-confidence signals over constant alerts. It works well across all timeframes and asset classes.
Period Separator with Dates & PriceSimple period separator with dates and h/l price. Easy to analyze market structure, and thats all you need. Enjoy trading!
ATR Dynamic Stop (Table + Plot + ATR %)📊 This script displays dynamic stop levels based on ATR, designed for active traders.
Features:
- Shows long and short stop levels (price ± ATR × multiplier).
- Displays values as a floating table on the top-right corner.
- Optional plot lines directly on the chart.
- Option to calculate based on realtime price or last close.
- Displays the ATR value both in price units and as a percentage of the selected price.
- Fully customizable table: text size, text color, background color.
Inputs:
- ATR Multiplier and Length.
- Show/hide stop lines on the chart.
- Select price source (realtime or last close).
- Table appearance options.
Ideal for:
- Traders who want a clear visual stop guide.
- Combining volatility with risk management.
High Volume Buyers/Sellers+High Volume Buyers/Sellers+
This indicator helps traders spot bars where unusually high or extreme volume occurs, indicating strong buying or selling pressure.
How it works:
Calculates a volume moving average (SMA) over a user-defined period.
Marks bars where the current volume exceeds:
High Volume Multiplier → small green circle (bullish) or red circle (bearish).
Extreme Volume Multiplier → small green up-triangle (bullish) or red down-triangle (bearish).
Settings:
Volume MA Period → Number of bars used to calculate the average volume.
High Volume Multiplier → Threshold to define high volume.
Extreme Volume Multiplier → Threshold to define extreme volume.
Show Extreme Volume Signals → Option to enable or disable extreme volume markers.
Usage tips:
Apply this indicator on a clean chart to visually highlight momentum bursts or exhaustion points.
It works well for both intraday and swing trading strategies where volume confirmation matters.
⚠ Note: This script only displays on-chart markers and does not plot any lines or indicators.
✅ TrendSniper Pro✅ SPNIPER ENTRY – Precision Trend Reversal Signals
The SPNIPER ENTRY is a smart trend-following and reversal indicator designed for traders who want timely entries, clear trend confirmation, and clean visuals.
Key Features:
✅ Triple TEMA Trend Confirmation (21, 50, 200): Ensures you're entering only when all moving averages agree on direction.
🎯 Dip/Top Detection: Uses pivot analysis and ATR proximity to detect ideal pullback entries in the prevailing trend.
📉 Stop Loss & Take Profit Zones: ATR-based dynamic SL/TP levels plotted automatically.
📛 False Signal Filter: Avoids multiple entries by maintaining a position until an opposite signal occurs.
📊 Clean Chart Coloring: Candles turn green for confirmed uptrend and red for downtrend—easy to follow.
🔔 Built-in Alerts: Be notified when conditions align perfectly for a high-probability trade.
👁️ Optional TEMA Display: Toggle visibility of trend components for deeper insight.
How it Works:
A buy signal occurs only when:
All 3 TEMA slopes are positive
Price pulls back near a recent pivot low (dip)
A valid uptrend is in place
A sell signal occurs only when:
All 3 TEMA slopes are negative
Price nears a recent pivot high (top)
A confirmed downtrend is active
This indicator is ideal for swing traders, intraday traders, and scalpers who want precise entries based on structure, slope, and volatility.
MA Shift (Offset Only + Flip Dots)Indicator Overview
This custom moving average indicator shifts the SMA away from price by a fixed percent or ATR multiple. It delivers a clear, uncluttered view of trend direction and momentum while keeping the price bars visible. A single offset line glows in semi-transparent shading and changes color based on trend state. When the price crosses the base SMA, a small dot marks the flip point.
Key Features
Adjustable Length
Choose any SMA period (default six) to suit your time frame and trading style.
Flexible Offset Mode
Percent mode places the line a fixed percentage above or below the SMA.
ATR mode spaces the line dynamically based on market volatility.
Direction Toggle
Shift the line up or down away from candles.
Glow Effect
A wide, semi-transparent band highlights the offset line for easy visibility.
Trend-Flip Dots
A tiny circle appears below the bar when the trend turns up and above the bar when it turns down, helping you spot reversals at a glance.
Custom Candle and Bar Coloring
Bars and candles recolor to reflect the current trend, reinforcing visual clarity.
How It Works
Base SMA Calculation
The indicator computes a standard SMA on your chosen source (high+low 2 by default).
Offset Application
It then adds or subtracts the percent or ATR-based distance to create a second line.
Trend Detection
When price moves above the SMA, the offset line and bars turn to your “up” color. When price drops below, they switch to your “down” color.
Flip Signals
On the bar that triggers a color change, a dot marks the exact reversal point.
Trading Signals and Usage
Trend Confirmation
Use the offset line as a clean trend guide. Price consistently above the line with green bars signals a bullish regime. Price below the line with orange bars signals bearish control.
Entry and Exit
Long Entry: Wait for a flip-up dot and a green close above the offset line.
Short Entry: Watch for a flip-down dot and an orange close below the offset line.
Stops and Targets: Place stops just inside the offset line on pullbacks for dynamic risk management.
Avoiding Whipsaws
The visual separation helps you ignore minor noise around price. Combine flip dots with bar color to filter false turns.
Confluence with MACD
Pair this offset SMA with the MACD for stronger signals:
MACD Trend Filter
Require the MACD line to be above its signal line (and histogram above zero) before taking a long flip-up from the offset MA.
Momentum Confirmation
When the offset SMA flips to a downtrend, look for the MACD histogram to turn negative. That alignment avoids fade-against-momentum trades.
Entry Timing
Use the MACD crossover as a lead-in filter and the offset SMA flip as the actual trigger. This two-step approach keeps you on the right side of larger moves.
Publishing Tips on TradingView
Description: Summarize features and usage in the indicator’s “About” field.
Inputs: List each setting clearly so users know how to tweak period, offset mode, percent/ATR values and color choices.
Examples: Include a chart snapshot showing a long setup with both the offset SMA flip and a confirming MACD crossover.
Release Notes: Mention version defaults (six-period SMA, ten-percent offset) and invite feedback for improvements.
Tags: Use relevant keywords like “Moving Average,” “Offset Indicator,” “Trend Filter,” and “MACD Confluence” to make it easy to find.
With its simple dot signals and customizable glow, this offset SMA becomes a powerful visual tool—especially when paired with MACD—for spotting clean trend entries and exits.
Multiple SMAsPlots multiple SMAs in a single indicator.
This script only plots the SMAs if the timeframe is set to daily.
- SMA10 in light blue
- SMA20 in yellow
- SMA50 in red
- SMA100 in green
- SMA200 in blue
It also plots the crosses between SMA20 and SMA50
Breakout of fractals with alternating signals📌 Indicator Name: Break of Fractal Body (with Alternating Signals and Extended Lines)
🔍 Purpose:
This indicator detects swing highs and lows (fractals) based on candle body closes, not wicks. It then:
Confirms a breakout when the price closes beyond the body of the fractal.
Alternates signals: a "long" signal only appears after a "short", and vice versa.
Draws a horizontal line from the original fractal bar (where it formed) to the current bar where the breakout happens.
⚙️ Key Features:
✅ Fractals Based on Candle Bodies Only:
A top fractal is where the candle body is higher than len candles on both sides.
A bottom fractal is where the candle body is lower than len candles on both sides.
✅ Breakout Confirmation:
A bullish breakout is when price closes above the last top body fractal.
A bearish breakout is when price closes below the last bottom body fractal.
Breakouts are only recognized if they alternate: you won’t get multiple long/shorts in a row.
✅ Visual Elements:
🔺 Red triangle: Top body fractal.
🔻 Green triangle: Bottom body fractal.
📈 Label BUY: when price breaks a top body fractal.
📉 Label SELL: when price breaks a bottom body fractal.
➖ Horizontal line: drawn from the fractal bar to the breakout bar, showing the exact level of breakout.
✅ Alerts:
Alert when a bullish breakout occurs.
Alert when a bearish breakout occurs.
No Supply No Demand (NSND) – Volume Spread Analysis ToolThis indicator is designed for traders utilizing Volume Spread Analysis (VSA) techniques. It automatically detects potential No Demand (ND) and No Supply (NS) candles based on volume and price behavior, and confirms them using future price action within a user-defined number of lookahead bars.
Confirmed No Demand (ND): Detected when a bullish candle has volume lower than the previous two bars and is followed by weakness (next highs swept, close below).
Confirmed No Supply (NS): Detected when a bearish candle has volume lower than the previous two bars and is followed by strength (next lows swept, close above).
Adjustable lookahead bars parameter to control the confirmation window.
This tool helps identify potential distribution (ND) and accumulation (NS) areas, providing early signs of market turning points based on professional volume logic. The dot appears next to ND or NS.
Volatility Breakout Strategy W15_T2.0# How to Use This Indicator
## **Setup Instructions:**
**Adjust parameters** as needed:
- **Volatility Window**: 15 (default) for 15-period volatility calculation
- **Volatility Threshold**: 2.0 (default) for 2x volatility spike trigger
- **Price Direction Periods**: 5 (default) for trend direction detection
### **What You'll See:**
- **🟢 Green UP arrows**: BUY signals (high volatility + upward price movement)
- **🔴 Red DOWN arrows**: SELL signals (high volatility + downward price movement)
- **🟠 Orange circles**: EXIT signals (volatility cooled down)
- **🟨 Yellow background**: High volatility periods (above threshold)
- **📊 Info table**: Real-time volatility metrics (top-right corner)
### **Signal Logic:**
- **Entry**: When volatility ratio ≥ 2.0x AND price direction is clear
- **Exit**: When volatility ratio drops below 1.4x (70% of threshold)
- **Direction**: Based on 5-period price change
### **Best Timeframes:**
- **1-minute**: Very sensitive, many signals
- **5-minute**: Balanced (matches your original analysis)
- **15-minute**: Less frequent but higher quality signals
### **Alert Setup:**
The indicator includes built-in alerts for:
- Buy signals
- Sell signals
- Exit signals
Fat Tails Analyzer🧠 Fat Tails Analyzer — Analysis of Anomalous ("Fat-Tailed") Movements
📌 Description
Fat Tails Analyzer is a tool for analyzing "fat tails" in the distribution of returns. Unlike normal distribution, financial markets often exhibit frequent extreme movements. This indicator identifies and visualizes such events by analyzing logarithmic returns, deviations from normal distribution, and excess kurtosis.
🔬 Methodology
Logarithmic returns (ln(Close / Close )) are calculated for accurate aggregation and symmetry.
Moving average and standard deviation of returns are computed over a specified period.
"Fat-tailed" events are identified when returns exceed μ ± k·σ, where k is user-defined.
Normal distribution bands (±2σ) and kurtosis (a measure of tail "heaviness") are displayed for clarity.
📊 What It Displays
📈 Histogram of Returns: Green for positive, red for negative.
🟣 Fat Tail Threshold Lines: Marking extreme events.
⚪ Silver Normal Distribution Bands: ±2σ boundaries.
🔵 Kurtosis Line: If enabled.
📋 Table with Key Metrics: Mean, σ, kurtosis.
⚙️ Parameters
Lookback Period (Bars): Analysis period (default: 252).
Fat Tail Threshold (Std Devs): Deviation for extreme events (k, default: 2.5).
Show Normal Distribution Bands: Toggle ±2σ boundaries.
Show Kurtosis: Enable kurtosis analysis mode.
📌 Interpretation
Excess Kurtosis > 0: More extreme events than predicted by normal distribution.
Returns beyond fat-tail thresholds: Potential signals of panic, shock, or exceptional news.
Consistently high kurtosis: Unstable or speculative asset.
🧪 Applications
📉 Identify extreme risks in assets (especially cryptocurrencies and derivatives).
🧠 Study market behavior and dispersion.
🛡 Support risk analysis, stop-loss settings, and systemic risk assessment.
🔎 Compare assets by the "normality" of their behavior.
🧭 Live Metrics Table
Displayed in the bottom-right corner:
Mean return
Standard deviation
Excess kurtosis (color-coded by value)
🧠 Good to Know
Normal distribution has kurtosis = 0.
> 0: "Fat tails" (more extreme values).
< 0: "Thin tails" (values close to the mean).
Volume Peak LineA fully configurable “Volume Peak Line” indicator that draws a horizontal threshold at the highest volume over the last X candles (default 5).
Custom lookback (X volume candles)
Optional alert when current volume exceeds that peak
Separate up/down volume bars (green/red) or hide them to use your own volume overlays
Use it to spot surges in trading activity on any timeframe—ideal for intraday or swing setups where a barn-burner volume bar can signal a reversal or the start of a new trend.
💧 USD Liquidity Index (Fed + M2 + Base)This custom indicator tracks USD liquidity by combining the Federal Reserve’s total assets (WALCL), M2 money supply (M2SL), and the monetary base (BASE) — all sourced from FRED (Federal Reserve Economic Data).
It's designed to provide a macro-level view of liquidity conditions in the U.S. financial system. This index can be used to help gauge the risk-on vs risk-off environment for assets like Bitcoin, equities, and commodities.
Higher values typically indicate liquidity expansion (bullish for risk assets).
Declining values indicate liquidity contraction or quantitative tightening (bearish for risk assets).
📊 Data Sources:
FRED:WALCL – Fed Balance Sheet
FRED:M2SL – M2 Money Supply
FRED:BASE – Monetary Base
⚠️ Weekly timeframe only. Designed for macro swing traders, crypto investors, and liquidity-driven strategists.
Combined: Strat Dashboard + FVG + M&E StarsSTRAT MIX + VECTOR + SUPPORT
In financial markets, support and resistance are fundamental concepts in technical analysis used to identify price levels where an asset's price tends to pause or reverse. They are essentially areas on a chart where buying or selling pressure is expected to be strong enough to temporarily halt or reverse the prevailing price trend.
Here's a breakdown:
* Support: This is a price level where an asset's downward movement is expected to stop due to increased buying interest. Think of it as a "floor" where demand is strong enough to prevent the price from falling further. When the price approaches a support level, buyers tend to step in, leading to a potential bounce or reversal upwards. The more times a price level has held as support in the past, the stronger it's generally considered.
* Resistance: This is a price level where an asset's upward movement is expected to stop due to increased selling interest. It acts like a "ceiling" where supply is strong enough to prevent the price from rising higher. When the price approaches a resistance level, sellers tend to step in, leading to a potential pullback or reversal downwards. Similar to support, the more times a price level has acted as resistance, the more significant it's often seen.
Key characteristics:
* Supply and Demand: Support and resistance levels are a reflection of the continuous interplay between supply (sellers) and demand (buyers) in the market.
* Dynamic Nature: These levels are not fixed lines but rather zones. They can also "flip roles"; if a resistance level is broken and the price moves above it, that former resistance can then become a new support level, and vice-versa.
* Psychological Importance: These levels often derive their strength from collective market psychology, as many traders and investors recognize and react to the same price points.
Lunar Sentiment BandsThe Lunar Sentiment Bands indicator is designed to combine simple price volatility analysis with the timing of moon phases. It's based on a moving average and two bands above and below it—similar to Bollinger Bands. But unlike regular bands, the width of these adjusts dynamically depending on two key conditions: the moon phase and market volume.
Around Full Moons, markets often show emotional or volatile behavior. If there's also a surge in trading volume during that time, the indicator automatically expands the bands. This tells you the market might be gearing up for a breakout or high-energy move.
Around New Moons, things are typically quieter. If there’s no significant volume, the indicator contracts the bands. This reflects a calmer environment or a potential “coil” where price is building up energy.
Traders can use this shifting bandwidth to guide decisions. Wide bands suggest breakout potential—either to join the move or to stand back until direction becomes clearer. Narrow bands suggest you may want to trade reversals, or simply wait for volatility to return before entering a position.
This approach doesn't try to predict direction. Instead, it gives you a sense of when the market is most likely to become active or stay quiet, using the rhythm of the moon and real-time volume to shape that view.
TREV Candles - Range-Based Trend ReversalTREV Candles - Range-Based Trend Reversal Chart Implementation
What is a Trend Reversal (TREV) Chart?
A Trend Reversal chart, also known as a Point & Figure chart variation, is a unique charting method that focuses on price movement thresholds rather than time intervals. Unlike traditional candlestick charts where each candle represents a fixed time period, TREV candles form only when price moves by predefined amounts in ticks.
TREV charts eliminate time-based noise and focus purely on significant price movements, making them ideal for identifying genuine trend changes and continuation patterns.
How TREV Candles Work
This indicator implements true TREV logic with two critical thresholds:
Trend Size: The number of ticks price must move in the current direction to form a trend continuation candle
Reversal Size: The number of ticks price must move against the current direction to form a reversal candle and change the overall trend direction
Key TREV Rules Enforced:
Direction Changes Only Through Reversals: You cannot go from bullish trend directly to bearish trend - a reversal candle must occur first
Threshold-Based Formation: Candles form only when price thresholds are breached, not on time
Logical Wick Placement: Wicks only appear on the "open" side of candles where price temporarily moved against the formation direction
Multiple Candles Per Bar: When price moves significantly, several TREV candles can form within a single time-based bar
Four Distinct Candle Types
Bullish Trend (Green): Continues upward movement when trend threshold is hit
Bearish Trend (Red): Continues downward movement when trend threshold is hit
Bullish Reversal (Blue): Changes from bearish to bullish direction when reversal threshold is breached
Bearish Reversal (Orange): Changes from bullish to bearish direction when reversal threshold is breached
Practical Trading Applications
Trend Identification: Clear visual representation of when trends are continuing vs. reversing
Noise Reduction: Filters out insignificant price movements that don't meet threshold requirements
Support/Resistance: TREV levels often act as significant support and resistance zones
Breakout Confirmation: When price forms multiple trend candles in succession, it confirms strong directional movement
Reversal Signals: Reversal candles provide early warning of potential trend changes
Technical Implementation Features
Intelligent Price Path Processing: Analyzes the assumed price path within each bar (Low→High→Close for bullish bars, High→Low→Close for bearish bars)
Automatic Tick Size Detection: Works with any instrument by automatically detecting the correct tick size
Manual Override Option: Allows manual tick size specification for custom analysis
Impossible Scenario Prevention: Built-in logic prevents impossible wick configurations and direction changes
PineScript Optimization: Efficient state management and drawing limits handling for smooth performance
Comprehensive Styling Options
Each of the four candle types offers complete visual customization:
Body Colors: Independent color settings for each candle type's body
Border Colors: Separate border color customization
Border Styles: Choose from solid, dashed, or dotted borders
Wick Colors: Individual wick color settings for each candle type
Default Color Scheme:
🟢 Bullish Trend: Green body and wicks
🔵 Bullish Reversal: Blue body and wicks
🔴 Bearish Trend: Red body and wicks
🟠 Bearish Reversal: Orange body and wicks
Configuration Guidelines
Trend Size: Larger values create fewer, more significant trend candles. Smaller values increase sensitivity
Reversal Size: Should typically be smaller than trend size. Controls how easily the trend direction can change
Tick Size: Use "auto" for most instruments. Manual override useful for custom point values or backtesting
Ideal Use Cases
Swing Trading: Identify major trend changes and continuation patterns
Scalping: Use smaller thresholds to catch quick reversals and momentum shifts
Position Trading: Use larger thresholds to filter noise and focus on major trend moves
Multi-Timeframe Analysis: Compare TREV patterns across different threshold settings
Support/Resistance Trading: TREV close levels often become significant price zones
Why This Implementation is Superior
True TREV Logic: Enforces proper trend reversal rules that many implementations ignore
No Impossible Scenarios: Prevents wicks on both sides of candles and impossible direction changes
Professional Visualization: Clean, customizable appearance suitable for serious analysis
Performance Optimized: Handles large datasets without lag or drawing limit issues
Educational Value: Helps traders understand the difference between time-based and threshold-based charting
Perfect for traders who want to see beyond time-based noise and focus on what price is actually doing - moving in significant, measurable amounts that matter for trading decisions.
Ease of Movement Z-Score Trend | DextraGeneral Description:
The "Ease of Movement Z-Score Trend | Dextra" (EOM-Z Trend) is an innovative technical analysis tool that combines the Ease of Movement (EOM) concept with Z-Score to measure how easily price moves relative to volume, while identifying market trends with intuitive visualization. This indicator is designed to help traders detect uptrend and downtrend phases with precision, enhanced by candle coloring for direct trend representation on the chart.
Key Features
Ease of Movement (EOM): Measures how easily price moves based on the change in the midpoint price and volume, normalized with Z-Score for statistical analysis.
Z-Score Normalization: Provides an indication of deviations from the mean, enabling the identification of overbought or oversold conditions.
Adjustable Thresholds: Users can customize upper and lower thresholds to define trend boundaries.
Candle Coloring: Visual trend representation with green (uptrend), red (downtrend), and gray (neutral) candles.
Flexibility: Adjustable for different timeframes and assets.
How It Works
The indicator operates through the following steps:
EOM Calculation:
hl2 = (high + low) / 2: Calculates the average midpoint price per bar.
eom = ta.sma(10000 * ta.change(hl2) * (high - low) / volume, length): EOM is computed as the smoothed average of the price midpoint change multiplied by the price range per unit volume, scaled by 10,000, over length bars (default 20).
Z-Score Calculation:
mean_eom = ta.sma(eom, z_length): Average EOM over z_length bars (default 93).
std_dev_eom = ta.stdev(eom, z_length): Standard deviation of EOM.
z_score = (eom - mean_eom) / std_dev_eom: Z-Score indicating how far EOM deviates from its mean in standard deviation units.
Trend Detection:
upperthreshold (default 1.03) and lowerthreshold (default -1.63): Thresholds to classify uptrend (if Z-Score > upperthreshold) and downtrend (if Z-Score < lowerthreshold).
eom_is_up and eom_is_down: Logical variables for trend status.
Visualization:
plot(z_score, ...): Z-Score line plotted with green (uptrend), red (downtrend), or gray (neutral) coloring.
plotcandle(...): Candles colored green, red, or gray based on trend.
hline(...): Dashed lines marking the thresholds.
Input Settings
EOM Length (default 20): Period for calculating EOM, determining sensitivity to price changes.
Z-Score Lookback Period (default 93): Period for calculating the Z-Score mean and standard deviation.
Uptrend Threshold (default 1.03): Minimum Z-Score value to classify an uptrend.
Downtrend Threshold (default -1.93): Maximum Z-Score value to classify a downtrend.
How to Use
Installation: Add the indicator via the "Indicators" menu in TradingView and search for "EOM-Z Trend | Dextra".
Customization:
Adjust EOM Length and Z-Score Lookback Period based on the timeframe (e.g., 20 and 93 for daily timeframes).
Set Uptrend Threshold and Downtrend Threshold according to preference or asset characteristics (e.g., lower to 0.8 and -1.5 for volatile markets).
Interpretation:
Uptrend (Green): Z-Score above upperthreshold, indicating strong upward price movement.
Downtrend (Red): Z-Score below lowerthreshold, indicating significant downward movement.
Neutral (Gray): Conditions between thresholds, suggesting a sideways market.
Use candle coloring as the primary visual guide, combined with the Z-Score line for confirmation.
Advantages
Intuitive Visualization: Candle coloring simplifies trend identification without deep analysis.
Flexibility: Customizable parameters allow adaptation to various markets.
Statistical Analysis: Z-Score provides a robust perspective on price deviations from the norm.
No Repainting: The indicator uses historical data and does not alter values after a bar closes.
Limitations
Volume Dependency: Requires accurate volume data; an error occurs if volume is unavailable.
Market Context: Effectiveness depends on properly tuned thresholds for specific assets.
Lack of Additional Signals: No built-in alerts or supplementary confirmation indicators.
Recommendations
Ideal Timeframe: Daily (1D) or (2D) for stable trends.
Combination: Pair with others indicators for signal validation.
Optimization: Test thresholds on historical data of the traded asset for optimal results.
Important Notes
This indicator relies entirely on internal TradingView data (high, low, close, volume) and does not integrate on-chain data. Ensure your data provider supports volume to avoid errors. This version (1.0) is the initial release, with potential future updates including features like alerts or multi-timeframe analysis.
Trap Detector Signals [Tweaked Version]This script highlights potential institutional liquidity traps by detecting price extensions relative to VWAP during periods of short-term volatility compression — using manual VIX9D input as a proxy for complacency.