EVWAPThis indicator plots two Volume-Weighted Average Price (VWAP) lines anchored to earnings events:
EVWAP (Earnings Day): Resets VWAP on the day of the earnings release.
EVWAP (Post-Earnings Day): Resets VWAP on the first trading day after earnings.
These earnings-based VWAPs help identify average price zones impacted by earnings, providing insight into post-earnings support/resistance and potential trend shifts. Works on all timeframes.
Useful for traders analyzing price reactions around earnings reports.
Göstergeler ve stratejiler
Volume MAs Oscillator | Lyro RSVolume MAs Oscillator | Lyro RS
Overview
The Volume MAs Oscillator is a powerful volume‑adjusted momentum tool that combines custom‑weighted moving averages on volume‑weighted price with smoothed deviation bands. It offers dynamic insights into trend direction, overbought/oversold conditions, and relative valuation — all within a single indicator
Key Features
Volume‑Adjusted Moving Averages: Moving averages can be volume‑weighted using the following formula: a moving average of (Price × Volume) divided by a moving average of Volume. This formula is applied across more than 14 different moving averages; however, it is not used with the VWMA, as VWMA is inherently a volume-weighted moving average.
Percentage Oscillator: Displays the normalized difference: (source – MA) / MA * 100, centered around zero for easy interpretation of strength and direction.
Deviation Bands: Builds upper and lower bands from standard deviation of the oscillator over a selected lookback, with distinct positive/negative multipliers and optional smoothing to reduce noise.
Inputs: Band Length, Band Smoothing, Positive Band Multiplier, Negative Band Multiplier.
Multi‑Mode Signal System:
1. Trend Mode – Colors oscillator according to breaks above (bullish) or below (bearish) respective bands.
2. Reversion Mode – Inverses color logic: signals overextensions beyond bands as reversion opportunities, greys inside the bands.
3. Valuation Mode – Applies a gradient color scale (UpC ⇄ DnC) to reflect relative valuation strength.
Customizable Visuals: Select from 5 pre‑set palettes—Classic, Mystic, Major Themes, Accented, Royal—or define your own custom bullish/bearish colors.
Chart enhancements include color‑coded oscillator line, deviation bands, glow‑effect midline at zero, background shading and candlestick/bar coloring aligned to signal mode.
Built‑In Signals: Automatically plots ▲ oversold and ▼ overbought markers upon crosses of lower/upper bands (in trend or reversion modes), enhancing signal clarity.
How It Works
MA Calculation – Applies the selected MA type to price × volume (normalized by MA of volume) or direct VWMA.
Oscillator Output – Calculates the % difference of source vs. derived MA.
Band Construction – Computes rolling standard deviation; applies user‑defined multipliers; smooths bands with exponential blending.
Mode-Dependent Coloring & Signals –
• Trend: Highlights strength trends via band cross coloring.
• Reversion: Flags extremes beyond bands as potential pullbacks.
• Valuation: Uses gradient to reflect oscillator’s position relative to recent range.
Signal Markers – Deploys arrows and color rules to flag overbought (▼) or oversold (▲) conditions when bands are breached.
Practical Use
Trend Confirmation – In Trend Mode, use upward price_diff cross above upper band as bullish; downward cross below lower band as bearish.
Mean Reversion – In Reversion Mode, fading extremes beyond bands may precede a retracement.
Relative Valuation – Valuation Mode shines when assessing how extended price_diff is, with gradient colors indicating valuation zones.
Bars/candles color‑coded to oscillator state boosts clarity of market tone and allows for rapid visual scanning.
Customization
Adjust MA type/length to tune responsiveness vs. smoothing.
Configure band settings for volatility sensitivity.
Toggle between signal modes for trend-following or reversion strategies.
Stylish visuals: pick or customize color schemes to match your chart setup.
⚠️Disclaimer
This indicator is a tool for technical analysis and does not provide guaranteed results. It should be used in conjunction with other analysis methods and proper risk management practices. The creators of this indicator are not responsible for any financial decisions made based on its signals.
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
WT-FLOW: MTF WaveTrend Trend-Follower📘 Strategy Introduction: WT-FLOW (WaveTrend Trend-Follower)
WT-FLOW is a multi-timeframe trend-following strategy specifically **optimized for the 15-minute timeframe** on the BTC/USDT trading pair. It is designed to help professional users follow buy/sell trends with high precision.
The strategy utilizes a three-tiered time alignment:
- **240min WaveTrend**: Macro trend filter (determines high-timeframe direction)
- **30min WaveTrend**: Momentum confirmation (validates trend continuation)
- **15min WaveTrend**: Signal generation (entries and exits are executed here)
It features an advanced **Trailing Stop** mechanism that includes maximum gain-based tracking logic and percentage-based fallback tolerance. Entry and exit points are marked on the chart with colored labels (🟢🔴❅❄), including bar index information.
⚙️ Technical Features:
- Compatible with Pine Script v5
- Backtestable via the `strategy()` block
- Supports both Long and Short position tracking
- Trailing Stop and Marginal Stop systems work in tandem
⚠️ Disclaimer:
This strategy is based on historical data. It should not be used in live markets without manual confirmation and appropriate risk management. Use is at your own risk.
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.
Gabriel's Relative Strength IndexGabriel’s RSI—The Reinvention of Relative Strength
Not your average RSI.
This is a fully reengineered Relative Strength Index that merges the power of advanced signal processing, adaptive smoothing, volume dynamics, and intelligent divergence detection into a single, modular toolkit designed for precision trading across all markets.
Whether you’re scalping crypto, swing trading equities, or dissecting futures contracts—Gabriel’s RSI adapts to your strategy with unrivaled control and clarity.
1. RSI Settings
RSI Length (Jurik): Set to 51 by default to mimic a 21-period standard RSI when Jurik smoothing is applied. Adjust lower (e.g., 22) to mimic a 9-period RSI.
RSI Source: The default is hlc3 for smoother RSI inputs. Can be changed to any price-based series (close, open, etc.) for customization.
2. RSI Smoothing Options
MA Type: Smoothing applies to both RSI and its MA overlay simultaneously. I used to use the 56 EMA RSI, and it works well too.
JMA: Best for adaptive recursive smoothing. A power of 2 and a phase of 50 are used.
T3: Smooth and lag-reduced, suitable for trend detection. The alpha is 0.7.
SMA + Bollinger Bands: Adds deviation-based envelopes for volatility spotting.
MA Length: Affects how smooth or reactive the RSI signal is.
BB StdDev: Only relevant if BBs are used. Controls bandwidth for overbought/oversold zones.
3. MACD Settings
Fast/Slow Length: Defaults (21/81) optimized for smoother MACD with SMA or T3. For Algo trading, EMA/JMA is best.
Signal Length: Shorter (e.g., 2) gives more reactive crossover signals, it can be increased.
Source: Default is close. Close works best for the settings I input.
MA Types: JMA and EMA reduce noise and increase signal generation. Select SMA for simplicity or T3 for trend-following.
Histogram: Bar colors signal strength and trend of MACD directly on your chart.
4. Directional Movement Index (DMI)
ADX Smoothing: High values (e.g., 100) offer strong trend confirmation with Hann Window smoothing.
DI Length: Affects DI+/- sensitivity. 100 ADX - 12 DI or 15 ADX - 35 DI are suggested, the latter for quicker boot time, as 100 bars is quite long.
Smoothing Type: Choose Hann Window for refined smoothing; RMA (SMMA) for simplicity.
Volatility Type: ATR includes gaps; ADR is useful for gapless strategies.
Plotted as area fills, 0 to 100 scaled.
5. Volume Z-Score
%R Length: Normalizes volume to percentile range (73 swing, 112 exhaustion).
Z-Score Lengths: Compares short-term and long-term volume trends with Z-scores of volume.
Fast Z-Score < Slow Z-Score = Gives a Volume Squeeze.
Fast MA > Slow MA = Bullish Volume Divergence; volume has been fired. Not via Z-score, but instead via SMA, ALMA, and RMA of volume.
WPR Volume: Weighted %R used to highlight exhaustion/pivot points.
Plot volume bars after a volume squeeze has been fired; if bars aren't plotted, then it's under squeeze. Backtest on ES1! Prove it's good for catching bottoms below 15 minutes as well.
6. Divergence Engine
Pivot Settings: Pivot Period (12), Divergence minval Lookback (5), and max Lookback Bars (100) control sensitivity. Works well on any asset class; these are the optimal settings for the RSI.
Source Options: RSI, MACD, ADX, DI difference, or Volume %R.
Divergence Type:
Regular: Classic reversal signals.
Hidden: Continuation signals.
Heikin Ashi Mode: Enables use of HA candles on normal charts for smoother pivots. May distort values if your chart is H.A. so leave it unchecked then.
7. Squeeze Momentum (SQZMOM)
Squeeze Types:
Wide (Black): Regular compression
Normal (Red), Regular Squeeze
Narrow (Yellow), Golden Squeeze
Very Narrow (Purple) Extreme compression
Fired (Green): Breakout detected
Plotted as circles on the bottom of my indicator.
Momentum Bar Colors:
Cyan: Rising momentum
Blue: Pullback within uptrend
Red: Falling momentum
Yellow: Correction within downtrend
Reversal Lines: Dashed lines indicate momentum crossing its Jurik MA (DM-Style Pivots).
Plotted as squares on the top of my indicator.
8. Rate of Change (RoC)
RoC of Momentum: EMA-smoothed RoC on momentum for leading signals. Double smoothed, once and then another time for smoother signals.
Signal Line: JMA used to filter noise and generate reversal signals.
Crossovers: Bullish/bearish signals based on RoC vs signal line are plotted as triangles directly on your chart.
Optimized: Backtested for short-term setups like 1H or faster. Works on Daily timeframes as well for Futures.
9. Multi-Timeframe Squeeze Settings
Each timeframe (Hourly, 4H, Daily, Weekly, Monthly) has:
Reversal Toggle: Enables dashed line DM-Style Pivots on crossovers.
MA Length: For Jurik MA smoothing on momentum.
BB/KC Thresholds: Define squeeze sensitivity per timeframe. A shorter BB/KC length, 17-14-12, responds better on lower timeframes.
Momentum Length: Tailors oscillator responsiveness; 20 is ideal.
10. BB Std. Deviation Scaling
Low-Pass Super Smoother : Smooths (True Range) noise for BBs.
High-Pass Butterworth : Extracts cycles for BB Stdv. blend.
Root Mean Squared : Dynamic BB width adjustment based on market activity.
11. Alerts
RSI: Overbought/oversold reversals. Several types.
MACD: Histogram shift through zero line.
DMI/ADX: Crossovers and strength conditions. The 17 key level is used for the ADX.
Volume: Smart Money alerts on low-volume zones. May concentrate on ICT sessions.
Squeeze: Alerts on all 5 squeeze states.
Momentum: Crosses and reversals.
RoC: Bullish and bearish crosses.
Divergences: Regular, hidden, combined.
12. Visual Output Summary
RSI Line + MA/BBs
MACD Histogram Bar Colors
DMI/ADX as area fills
Volume %R columns
Squeeze Momentum Shapes and Dots
RoC Crossover Arrows
DM-style Breakout Pivots
Divergence Lines and Labels
Best Practices
Watch the slope of the RSI for pullbacks on a strong trend. Combine it with squeeze for exit timing.
Combine RSI Divergence with MACD histogram cross and Squeeze firing for precise entry.
Use Volume Z-Score to filter for institutional activity, and enter Long. Watch for reversals as well.
Watch RoC crossovers for fast, leading signals.
Enable Reversal Lines on 1H+ charts for breakout or breakdown pivots.
Use multi-timeframe thresholds for swing confirmation. The TFs I use the most are 2-5-15 minutes for futures and swinging with 1 hour daily and weekly. Those are the TFs I backtested.
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.
Gann Octave 8 - Professional V 1.0Gann Octave 8 Indicator:
Core Concept: This indicator divides the price range between highest high and lowest low into 8 equal parts (octaves), creating support/resistance levels based on W.D. Gann's trading principles.
Key Components:
1. Price Range Calculation:
o Finds highest high and lowest low over a lookback period (default 50 bars)
o Divides this range into 8 equal segments (12.5% each)
2. 8 Octave Levels:
o 0% (Low Support) - Strongest support
o 12.5%, 25%, 37.5% - Minor levels
o 50% (CRITICAL) - Most important level
o 62.5%, 75%, 87.5% - Minor levels
o 100% (High Resistance) - Strongest resistance
3. Gann Angles: Projects trend lines from high/low points at various angles (1x1, 2x1, 1x2, etc.)
4. Visual Features:
o Color-coded levels
o Information table showing current position
o Background highlighting when near critical levels
o Trend analysis (bullish/bearish zones)
Trading Strategy
Entry Signals:
BULLISH TRADES:
• Price crosses above 50% level → Strong buy signal
• Price bounces from 25% or 37.5% levels → Support bounce
• Price in upper zone (above 50%) → Bullish bias
BEARISH TRADES:
• Price crosses below 50% level → Strong sell signal
• Price rejects at 75% or 87.5% levels → Resistance rejection
• Price in lower zone (below 50%) → Bearish bias
Key Trading Rules:
1. 50% Level is Critical: Most important for trend direction
2. Zone Trading:
o Above 50% = Bullish zone (look for longs)
o Below 50% = Bearish zone (look for shorts)
3. Strength Levels:
o Above 75% or below 25% = Strong moves
o Near 100% (high) or 0% (low) = Extreme levels
Risk Management:
• Stop Loss: Place below previous octave level
• Take Profit: Target next octave level
• Position Size: Reduce size near extreme levels (0%, 100%)
Example Trade:
If price breaks above 50% level:
• Entry: Long position
• Stop: Below 37.5% level
• Target: 75% level
• Risk: Monitor for rejection at resistance levels
The indicator works best in trending markets and helps identify high-probability reversal zones.
Works for both Stocks & Derivatives. Experiment with code and share your feedback in comments..
UT Bot + LinReg Candles (Dual Sensitivity)
Script Description:
This indicator combines the popular UT Bot Alerts system with Linear Regression Candles (open source) for enhanced trend detection and trading signals in one singel script. The UT Bot features independent, then 2 x ATR sensitivity and periods controls for buy and sell signals, allowing you to fine-tune entries and exits to match your strategy. The script also overlays colored Linear Regression Candles with an optional signal line, helping you visually identify trend strength and direction. All calculations are performed on standard chart prices (no Heikin Ashi). Suitable for all asset classes and timeframes.
Eample setting for usdjpy 5 min chart for repeated buy and sell singnals based on trend:
BUY ATR period 300 multiplier 1
SELL ATR period 1 multiplier 2
Disclaimer:
This script is for informational and educational purposes only. It is not financial advice. Use at your own risk; the author assumes no responsibility for any trading results or losses.
Credits goes to to Ugurvu for linreg candles and quantnomad for UT Bot alerts that make this script possible.
Author: Patrick
Custom Daily Session Zones by KoenigseggCustom Daily Session Zones
🟣 Description
This indicator displays customizable trading session time zones as background highlights on your chart, on any timeframe you choose. The inline info tooltip provides the precise start and end times of the three largest market sessions—the US, the EU, and ASIA—for quick reference. It provides flexible control over session times for different days of the week, making it ideal for traders who need to visualize specific market hours or trading sessions.
🟣 Key Features
- Flexible Session Configuration: Set a common session time for all days or customize individual sessions for each day of the week
- Per-Day Control: Enable or disable sessions for specific days (Monday through Sunday)
- Color Customization: Choose unique colors for each day's session zones
- UTC Timezone Standard: All session times are defined in UTC to ensure consistency across charts
- Clean Visual Display: Non-intrusive background highlighting that doesn't interfere with price action
🟣 How to Use
- Common Session Mode: Use the default mode to apply the same session time across all enabled days
- Manual Per-Day Mode: Enable "Manual per-day sessions" to set different session times for each day
- Day Selection: Toggle individual days on/off based on your trading schedule
- Color Coding: Customize colors for each day to easily distinguish between different sessions
🟣 Technical Details
- Uses Pine Script v6 for optimal performance
- Implements proper session time detection using TradingView's built-in time functions
- Operates in UTC timezone for all session calculations
- Lightweight code that doesn't impact chart performance
🟣 Use Cases
- Highlight specific trading sessions (London, New York, Tokyo, etc.)
- Mark important market hours for your trading strategy
- Visualize different session overlaps
- Create custom trading time windows
- Track market activity during specific hours
🟣 Compatibility
- Works on all timeframes
- Compatible with all asset classes (Forex, Stocks, Crypto, Futures, etc.)
- Supports all TradingView chart types
- Responsive design that adapts to different screen sizes
🟣 Image Descriptions
- First Image (main image): Shows multiple New York Stock Exchange sessions from 1:30 p.m. to 8:00 p.m. (UTC), on the 15-minute timeframe, with each day’s zone colored differently to demonstrate the indicator’s customizable color settings.
- Second Image: A zoomed‑in fractal chart view of the same New York session on the 15-minute timeframe, illustrating how the background session zone appears even at higher detail levels.
Third Image: A close‑up of the New York session (1:30 p.m. to 8:00 p.m.) on the 3-minute timeframe, reaffirming the consistency of zone highlighting across different zoom levels.
🟣 Future Updates (v2)
In the next release, you’ll be able to define multiple session blocks per day—displaying two distinct colored zones within the same trading day. This will help you visualize when one market session ends and another begins without losing chart clarity.
🟣 Conclusion
This indicator is perfect for traders who need precise control over Market Session visualization and want to maintain a clean, professional chart appearance.
🟣 Disclaimer
This script is provided for educational and illustrative purposes only. It is not financial or trading advice, nor a recommendation to buy or sell any asset. Always conduct your own research and consult a professional before making any trading decisions.
Multi-Time Period Charts with Wicks - ENEXSLWe wanted to see the candle wicks on the official Multi-Time Period Charts indicator.
This version has wick calculations added. Please see www.tradingview.com for the original indicator breakdown.
In short, this indicator will reference larger time periods and draw a candle with the wick around a smaller timeframe chart..
Divergence Screener [Trendoscope®]🎲Overview
The Divergence Screener is a powerful TradingView indicator designed to detect and visualize bullish and bearish divergences, including hidden divergences, between price action and a user-selected oscillator. Built with flexibility in mind, it allows traders to customize the oscillator type, trend detection method, and other parameters to suit various trading strategies. The indicator is non-overlay, displaying divergence signals directly on the oscillator plot, with visual cues such as lines and labels on the chart for easy identification.
This indicator is ideal for traders seeking to identify potential reversal or continuation signals based on price-oscillator divergences. It supports multiple oscillators, trend detection methods, and alert configurations, making it versatile for different markets and timeframes.
🎲Features
🎯Customizable Oscillator Selection
Built-in Oscillators : Choose from a variety of oscillators including RSI, CCI, CMO, COG, MFI, ROC, Stochastic, and WPR.
External Oscillator Support : Users can input an external oscillator source, allowing integration with custom or third-party indicators.
Configurable Length : Adjust the oscillator’s period (e.g., 14 for RSI) to fine-tune sensitivity.
🎯Divergence Detection
The screener identifies four types of divergences:
Bullish Divergence : Price forms a lower low, but the oscillator forms a higher low, signaling potential upward reversal.
Bearish Divergence : Price forms a higher high, but the oscillator forms a lower high, indicating potential downward reversal.
Bullish Hidden Divergence : Price forms a higher low, but the oscillator forms a lower low, suggesting trend continuation in an uptrend.
Bearish Hidden Divergence : Price forms a lower high, but the oscillator forms a higher high, suggesting trend continuation in a downtrend.
🎯Flexible Trend Detection
The indicator offers three methods to determine the trend context for divergence detection:
Zigzag : Uses zigzag pivots to identify trends based on higher highs (HH), higher lows (HL), lower highs (LH), and lower lows (LL).
MA Difference : Calculates the trend based on the difference in a moving average (e.g., SMA, EMA) between divergence pivots.
External Trend Signal : Allows users to input an external trend signal (positive for uptrend, negative for downtrend) for custom trend analysis.
🎯Zigzag-Based Pivot Analysis
Customizable Zigzag Length : Adjust the zigzag length (default: 13) to control the sensitivity of pivot detection.
Repaint Option : Choose whether divergence lines repaint based on the latest data or wait for confirmed pivots, balancing responsiveness and reliability.
🎯Visual and Alert Features
Divergence Visualization : Divergence lines are drawn between price pivots and oscillator pivots, color-coded for easy identification:
Bullish Divergence : Green
Bearish Divergence : Red
Bullish Hidden Divergence : Lime
Bearish Hidden Divergence : Orange
Labels and Tooltips : Labels (e.g., “D” for divergence, “H” for hidden) appear on price and oscillator pivots, with tooltips providing detailed information such as price/oscillator values, ratios, and pivot directions.
Alerts : Configurable alerts for each divergence type (bullish, bearish, bullish hidden, bearish hidden) trigger on bar close, ensuring timely notifications.
🎲 How It Works
🎯Oscillator Calculation
The indicator calculates the selected oscillator (or uses an external source) and plots it on the chart.
Oscillator values are stored in a map for reference during divergence calculations.
🎯Pivot Detection
A zigzag algorithm identifies pivots in the oscillator data, with configurable length and repainting options.
Price and oscillator pivots are compared to detect divergences based on their direction and ratio.
🎯Divergence Identification
The indicator compares price and oscillator pivot directions (HH, HL, LH, LL) to identify divergences.
Trend context is determined using the selected method (Zigzag, MA Difference, or External).
Divergences are classified as bullish, bearish, bullish hidden, or bearish hidden based on price-oscillator relationships and trend direction.
🎯Visualization and Alerts
Valid divergences are drawn as lines connecting price and oscillator pivots, with corresponding labels.
Alerts are triggered for allowed divergence types, providing detailed information via tooltips.
🎯Validation
Divergence lines are validated to ensure no intermediate bars violate the divergence condition, enhancing signal reliability.
🎲 Usage Instructions as Indicator
🎯Add to Chart:
Add the “Divergence Screener ” to your TradingView chart.
The indicator appears in a separate pane below the price chart, plotting the oscillator and divergence signals.
🎯Configure Settings:
Adjust the oscillator type and length to match your trading style.
Select a trend detection method and configure related parameters (e.g., MA type/length or external signal).
Set the zigzag length and repainting preference.
Enable/disable alerts for specific divergence types.
I🎯nterpret Signals:
Bullish Divergence (Green) : Look for potential buy opportunities in a downtrend.
Bearish Divergence (Red) : Consider sell opportunities in an uptrend.
Bullish Hidden Divergence (Lime) : Confirm continuation in an uptrend.
Bearish Hidden Divergence (Orange): Confirm continuation in a downtrend.
Use tooltips on labels to review detailed pivot and divergence information.
🎯Set Alerts:
Create alerts for each divergence type to receive notifications via TradingView’s alert system.
Alerts include detailed text with price, oscillator, and divergence information.
🎲 Example Scenarios as Indicator
🎯 With External Oscillator (Use MACD Histogram as Oscillator)
In order to use MACD as an oscillator for divergence signal instead of the built in options, follow these steps.
Load MACD Indicator from Indicator library
From Indicator settings of Divergence Screener, set Use External Oscillator and select MACD Histograme from the dropdown
You can now see that the oscillator pane shows the data of selected MACD histogram and divergence signals are generated based on the external MACD histogram data.
🎯 With External Trend Signal (Supertrend Ladder ATR)
Now let's demonstrate how to use external direction signals using Supertrend Ladder ATR indicator. Please note that in order to use the indicator as trend source, the indicator should return positive integer for uptrend and negative integer for downtrend. Steps are as follows:
Load the desired trend indicator. In this example, we are using Supertrend Ladder ATR
From the settings of Divergence Screener, select "External" as Trend Detection Method
Select the trend detection plot Direction from the dropdown. You can now see that the divergence signals will rely on the new trend settings rather than the built in options.
🎲 Using the Script with Pine Screener
The primary purpose of the Divergence Screener is to enable traders to scan multiple instruments (e.g., stocks, ETFs, forex pairs) for divergence signals using TradingView’s Pine Screener, facilitating efficient comparison and identification of trading opportunities.
To use the Divergence Screener as a screener, follow these steps:
Add to Favorites : Add the Divergence Screener to your TradingView favorites to make it available in the Pine Screener.
Create a Watchlist : Build a watchlist containing the instruments (e.g., stocks, ETFs, or forex pairs) you want to scan for divergences.
Access Pine Screener : Navigate to the Pine Screener via TradingView’s main menu: Products -> Screeners -> Pine, or directly visit tradingview.com/pine-screener/.
Select Watchlist : Choose the watchlist you created from the Watchlist dropdown in the Pine Screener interface.
Choose Indicator : Select Divergence Screener from the Choose Indicator dropdown.
Configure Settings : Set the desired timeframe (e.g., 1 hour, 1 day) and adjust indicator settings such as oscillator type, zigzag length, or trend detection method as needed.
Select Filter Criteria : Select the condition on which the watchlist items needs to be filtered. Filtering can only be done on the plots defined in the script.
Run Scan : Press the Scan button to display divergence signals across the selected instruments. The screener will show which instruments exhibit bullish, bearish, bullish hidden, or bearish hidden divergences based on the configured settings.
🎲 Limitations and Possible Future Enhancements
Limitations are
Custom input for oscillator and trend detection cannot be used in pine screener.
Pine screener has max 500 bars available.
Repaint option is by default enabled. When in repaint mode expect the early signal but the signals are prone to repaint.
Possible future enhancements
Add more built-in options for oscillators and trend detection methods so that dependency on external indicators is limited
Multi level zigzag support
Logistic Regression ICT FVG🚀 OVERVIEW
Welcome to the Logistic Regression Fair Value Gap (FVG) System — a next-gen trading tool that blends precision gap detection with machine learning intelligence.
Unlike traditional FVG indicators, this one evolves with each bar of price action, scoring and filtering gaps based on real market behavior.
🔧 CORE FEATURES
✨ Smart Gap Detection
Automatically identifies bullish and bearish Fair Value Gaps using volatility-aware candle logic.
📊 Probability-Based Filtering
Uses logistic regression to assign each gap a confidence score (0 to 1), showing only high-probability setups.
🔁 Real-Time Retest Tracking
Continuously watches how price interacts with each gap to determine if it deserves respect.
📈 Multi-Factor Assessment
Evaluates RSI, MACD, and body size at gap formation to build a full context snapshot.
🧠 Self-Learning Engine
The logistic regression model updates on each bar using gradient descent, refining its predictions over time.
📢 Built-In Alerts
Get instant alerts when a gap forms, gets retested, or breaks.
🎨 Custom Display Options
Control the color of bullish/bearish zones, and toggle on/off probability labels for cleaner charts.
🚩 WHAT MAKES IT DIFFERENT
This isn’t just another box-drawing indicator.
While others mark every imbalance, this system thinks before it draws — using statistical modeling to filter out noise and prioritize high-impact zones.
By learning from how price behaves around gaps (not just how they form), it helps you trade only what matters — not what clutters.
⚙️ HOW IT WORKS
1️⃣ Detection
FVGs are identified using ATR-based thresholds and sharp wick imbalances.
2️⃣ Behavior Monitoring
Every gap is tracked — and if respected enough times, it becomes part of the elite training set.
3️⃣ Context Capture
Each new FVG logs RSI, MACD, and body size to provide a feature-rich context for prediction.
4️⃣ Prediction (Logistic Regression)
The model predicts how likely the gap is to be respected and assigns it a probability score.
5️⃣ Classification & Alerts
Gaps above the threshold are plotted with score labels, and alerts trigger for entry/respect/break.
⚙️ CONFIGURATION PANEL
🔧 System Inputs
• Max Retests – How many times a gap must be respected to train the model
• Prediction Threshold – Minimum score to show a gap on the chart
• Learning Rate – Controls how fast the model adapts (default: 0.009)
• Max FVG Lifetime – Expiration duration for unused gaps
• Show Historic Gaps – Show/hide expired or invalidated gaps
🎨 Visual Options
• Bullish/Bearish Colors – Set gap colors to fit your chart style
• Confidence Labels – Show probability scores next to FVGs
• Alert Toggles – Enable alerts for:
– New FVG detected
– FVG respected (entry)
– FVG invalidated (break)
💡 WHY LOGISTIC REGRESSION?
Traditional FVG tools rely on candle shapes.
This system relies on probability — by training on RSI, MACD, and price behavior, it predicts whether a gap will act as a true liquidity zone.
Logistic regression lets the system continuously adapt using new data, making it more accurate the longer it runs.
That means smarter signals, fewer false positives, and a clearer view of where real opportunities lie.
Hybrid: RSI + Breakout + Dashboard95% of traders lose, then i developped a bot that can go over those rules.
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)
The Essa System V1.5The Essa System V1.5
Overview
The Essa System is a comprehensive trading strategy and backtesting tool designed for traders who use market structure and Fibonacci retracements. It automatically identifies significant trading ranges, calculates key retracement levels, and then backtests a complete trading strategy based on entries at these levels.
This is more than just an indicator; it's a full suite of analytical tools designed to help you develop, test, and analyze a complete trading plan directly on your chart.
How It Works
The system's logic is based on a classic price action concept:
Range Detection: First, it automatically identifies a significant trading range by finding the highest high and lowest low based on pivot points over a user-defined lookback period.
Fibonacci Analysis: Once the range direction (bullish or bearish) is established, the script calculates and displays key Fibonacci retracement levels (50%, 61.8%, 70.5%, and 78.6%).
Trade Execution: The system then looks for historical and live trading opportunities, entering a trade when the price pulls back to one of the enabled Fibonacci levels. All trades are managed with a predefined Stop Loss and Take Profit in pips.
Key Features
Automatic Range & Fibonacci Analysis: Automatically draws the primary trading range and key Fib levels, updating as market structure evolves.
Historical Backtesting: Plots all historical trade entries based on the strategy rules, allowing for a complete performance review over the chosen chart history.
Detailed Trade Visuals: Displays active trades on the chart with clear lines and boxes for entry, stop loss, and take profit zones.
Advanced Session Filtering: Allows you to isolate trades to specific market sessions (London, New York, Asia) with timezone support and daily trade limits.
Built-in Risk Management: A cornerstone of the system. It automatically calculates the required position size for each trade based on your specified Account Size, Risk Percentage, and Stop Loss.
Comprehensive Performance Tables: The script includes two powerful analytical tables:
Trade Helper Table: Shows the status of live or potential upcoming trades, including entry/SL/TP prices and the calculated position size.
History Table: Logs all recent trades and calculates key statistics like Profit Factor, Win Rate, and the overall PnL impact on your account balance.
Customizable Strategy: Fine-tune every aspect of the strategy with inputs for the lookback period, SL/TP in pips, which Fib levels are tradable, and a cooldown timer to prevent over-trading.
How to Use
Add the indicator to your chart.
Navigate to the settings and, under "Account Settings," configure your Account Size and Risk Per Trade (%). This is essential for the PnL and position sizing calculations to be meaningful.
Under "Session Filter Settings," adjust the sessions you wish to trade.
Analyze the historical trades and the performance tables to understand the strategy's behaviour on your chosen asset and timeframe.
Disclaimer: This is a tool for strategy analysis and backtesting. It is not financial advice. Past performance is not indicative of future results. Always use proper risk management.
liq depth fvg/bprA script that draws liquidity depth boxes from the 9.30-10.00 am range which can prove decent areas to look for a reversal. It also draws in fvg and bpr levels which can help add confluence to a trade ideas. The 9.30 to 10.00 am range is highlighted by blue lines to assist in opening range trades as described by Casper SMC.
Candle Emotion Oscillator [CEO]Candle Emotion Oscillator (CEO) - Revolutionary User Guide
🧠 World's First Market Psychology Oscillator
The Candle Emotion Oscillator (CEO) is a groundbreaking indicator that measures market emotions through pure candle price action analysis. This is the first oscillator ever created that translates candle patterns into psychological states, giving you unprecedented insight into market sentiment.
🚀 Revolutionary Concept
What Makes CEO Unique
100% Pure Price Action: No volume, no external data - just candle analysis
Market Psychology: Measures actual emotions: Fear, Greed, Panic, Euphoria
Never Been Done Before: First oscillator to analyze market emotions
Exhaustion Prediction: Detects emotional fatigue before reversals
Fast Response: Perfect for your 2-5 minute scalping setup
The Four Core Emotions
🟢 GREED (Positive Values)
What it measures: Market conviction and decisiveness
Candle Pattern: Large bodies, small wicks
Psychology: Traders are confident and decisive
Oscillator: Positive values (0 to +100)
Trading Implication: Trend continuation likely
🔴 FEAR (Negative Values)
What it measures: Market uncertainty and indecision
Candle Pattern: Small bodies, large wicks
Psychology: Traders are uncertain and hesitant
Oscillator: Negative values (0 to -100)
Trading Implication: Consolidation or reversal likely
🚀 EUPHORIA (Extreme Positive)
What it measures: Excessive optimism and buying pressure
Candle Pattern: Large green bodies with upper wicks
Psychology: Extreme bullish sentiment
Oscillator: Values above +60
Trading Implication: Overbought, reversal warning
💥 PANIC (Extreme Negative)
What it measures: Capitulation and selling pressure
Candle Pattern: Large red bodies with lower wicks
Psychology: Extreme bearish sentiment
Oscillator: Values below -60
Trading Implication: Oversold, reversal opportunity
📊 Visual Elements Explained
Main Components
Thick Colored Line: Primary emotion oscillator
Green: Greed (positive emotions)
Red: Fear (negative emotions)
Bright Green: Euphoria (extreme positive)
Dark Red: Panic (extreme negative)
Thin Blue Line: Emotion trend (longer-term context)
Background Gradient: Emotional intensity
Darker = stronger emotions
Lighter = weaker emotions
Diamond Signals: 🔶 Emotional exhaustion detected
Rocket Signals: 🚀 Extreme euphoria warning
Explosion Signals: 💥 Extreme panic warning
Information Table (Top Right)
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
SMMA Cross Strategy stopsuzThey were formed by the intersections of 2 SMMA moving averages. You can adjust the parameter and make profit.
FVG MTF + 50%
// This indicator identifies Fair Value Gaps (FVGs) on M15, H1, and H4 timeframes, highlights them on the chart as colored boxes, draws the 50% median line,
// and displays price labels for the 0%, 50%, and 100% levels of each gap.
// It also tracks when gaps are “filled” (mitigated) and logs counts on a dashboard, providing real-time metrics on open/filled FVGs for liquidity analysis.
//
// Key Features:
// 1. Multi‐Timeframe Detection: Scans M15, H1, H4 for three‐bar FVG patterns using a configurable threshold.
// 2. Colored Zones and Median Lines: Draws bullish (green) and bearish (red) gap boxes, bordered in white, with a dashed white line at the midpoint.
// 3. Price Labels: Optionally annotates each gap with “0% FVG = $X,” “50% FVG = $Y,” and “100% FVG = $Z” at the moment of detection.
// 4. Gap Mitigation: Monitors price re‐entry into a gap; when filled, it removes the box and logs a dashed line at the fill price.
// 5. Dashboard: Counts total bullish/bearish FVGs and calculates the percentage filled on each timeframe.
// 6. Alerts: Configurable alerts for new gap creation and fill events at 0%, 50%, and 100% levels.
//
// Implementation Details:
// • Detection Logic: A three-bar gap occurs when the middle bar’s low is above the prior bar’s high (bullish) or its high is below the prior bar’s low (bearish).
// A “threshold” parameter filters minor gaps based on relative size.
// • Data Structures: Uses Pine v6’s user‐defined “fvg” type to store gap high, low, direction, and timestamp. Arrays track open boxes, lines, labels for each timeframe.
// • Drawing:
// – box.new() draws transparent rectangles spanning 500 bars into the future.
// – line.new() draws dashed median lines and mitigation lines when gaps are filled.
// – label.new() places price annotations at the current right edge with textalign=text.align_right.
// • Dashboard: table.new() creates a 3×3 panel showing “Bullish”/“Bearish” counts and “Mitigated” percentages in real time.
// • Alerts: alertcondition() triggers when new gaps form or are mitigated at specified percentages.
//
// Usage:
// • Add to chart: Apply the script; enable or disable timeframes via checkboxes (Enable FVG M15, H1, H4).
// • Configure text labels: Toggle “Text” to show or hide on‐chart price annotations.
// • Monitor dashboard: Observe counts and fill rates to gauge market liquidity pressure.
// • Set alerts: Enable alerts for specific levels (0%, 50%, 100%) and timeframes as needed.
//
// Potential Extensions:
// • Customizable lookback on fill monitoring (beyond “showLast” parameter).
// • Dynamic threshold based on ATR or volatility metrics instead of static percentage.
// • Integration with order‐flow or volume data to refine gap significance.
// • Expanded timeframes (D1, W, etc.) for higher‐timeframe liquidity profiling.
//
// =============================================================================
//
// © 2025. Licensed under CC BY‐NC‐SA 4.0 International.
// Feel free to reference academic works (Hasbrouck, Bouchaud, O’Hara) for theoretical context.
//
// End of Description.
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)
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.