Inside SwingsOverview
The Inside Swings indicator identifies and visualizes "inside swing" patterns in price action. These patterns occur when price creates a series of pivots that form overlapping ranges, indicating potential consolidation or reversal zones.
What are Inside Swings?
Inside swings are specific pivot patterns where:
- HLHL Pattern: High-Low-High-Low sequence where the first high is higher than the second high, and the first low is lower than the second low
- LHLH Pattern: Low-High-Low-High sequence where the first low is lower than the second low, and the first high is higher than the second high
Here an Example
These patterns create overlapping price ranges that often act as:
- Support/Resistance zones
- Consolidation areas
- Potential reversal points
- Breakout levels
Levels From the Created Range
Input Parameters
Core Settings
- Pivot Lookback Length (default: 5): Number of bars on each side to confirm a pivot high/low
- Max Boxes (default: 100): Maximum number of patterns to display on chart
Extension Settings
- Extend Lines: Enable/disable line extensions - this extends the Extremes of the Swings to where a new Swing Started or Extended Right for the Latest Inside Swings
- Show High 1 Line: Display first high/low extension line
- Show High 2 Line: Display second high/low extension line
- Show Low 1 Line: Display first low/high extension line
- Show Low 2 Line: Display second low/high extension line
Visual Customization
Box Colors
- HLHL Box Color: Color for HLHL pattern boxes (default: green)
- HLHL Border Color: Border color for HLHL boxes
- LHLH Box Color: Color for LHLH pattern boxes (default: red)
- LHLH Border Color: Border color for LHLH boxes
Line Colors
- HLHL Line Color: Extension line color for HLHL patterns
- LHLH Line Color: Extension line color for LHLH patterns
- Line Width: Thickness of extension lines (1-5)
Pattern Detection Logic
HLHL Pattern (Bullish Inside Swing)
Condition: High1 > High2 AND Low1 < Low2
Sequence: High → Low → High → Low
Visual: Two overlapping boxes with first range encompassing second
Detection Criteria:
1. Last 4 pivots form High-Low-High-Low sequence
2. Fourth pivot (first high) > Second pivot (second high)
3. Third pivot (first low) < Last pivot (second low)
LHLH Pattern (Bearish Inside Swing)
Condition: Low1 < Low2 AND High1 > High2
Sequence: Low → High → Low → High
Visual: Two overlapping boxes with first range encompassing second
Detection Criteria:
1. Last 4 pivots form Low-High-Low-High sequence
2. Fourth pivot (first low) < Second pivot (second low)
3. Third pivot (first high) > Last pivot (second high)
Visual Elements
Boxes
- Box 1: Spans from first pivot to last pivot (larger range)
- Box 2: Spans from third pivot to last pivot (smaller range)
- Overlap: The intersection of both boxes represents the inside swing zone
Extension Lines
- High 1 Line: Horizontal line at first high/low level
- High 2 Line: Horizontal line at second high/low level
- Low 1 Line: Horizontal line at first low/high level
- Low 2 Line: Horizontal line at second low/high level
Line Extension Behavior
- Historical Patterns: Lines extend until the next pattern starts
- Latest Pattern: Lines extend to the right edge of chart
- Dynamic Updates: All lines are redrawn on each bar for accuracy
Trading Applications
Support/Resistance Levels
Inside swing levels often act as:
- Dynamic support/resistance
- Breakout confirmation levels
- Reversal entry points
Pattern Interpretation
- HLHL Patterns: Potential bullish continuation or reversal
- LHLH Patterns: Potential bearish continuation or reversal
- Overlap Zone: Key area for price interaction
Entry Strategies
1. Breakout Strategy: Enter on break above/below inside swing levels
2. Reversal Strategy: Enter on bounce from inside swing levels
3. Range Trading: Trade between inside swing levels
Technical Implementation
Data Structures
type InsideSwing
int startBar // First pivot bar
int endBar // Last pivot bar
string patternType // "HLHL" or "LHLH"
float high1 // First high/low
float low1 // First low/high
float high2 // Second high/low
float low2 // Second low/high
box box1 // First box
box box2 // Second box
line high1Line // High 1 extension line
line high2Line // High 2 extension line
line low1Line // Low 1 extension line
line low2Line // Low 2 extension line
bool isLatest // Latest pattern flag
Memory Management
- Pattern Storage: Array-based storage with automatic cleanup
- Pivot Tracking: Maintains last 4 pivots for pattern detection
- Resource Cleanup: Automatically removes oldest patterns when limit exceeded
Performance Optimization
- Duplicate Prevention: Checks for existing patterns before creation
- Efficient Redraw: Only redraws lines when necessary
- Memory Limits: Configurable maximum pattern count
Usage Tips
Best Practices
1. Combine with Volume: Use volume confirmation for breakouts
2. Multiple Timeframes: Check higher timeframes for context
3. Risk Management: Set stops beyond inside swing levels
4. Pattern Validation: Wait for confirmation before entering
Common Scenarios
- Consolidation Breakouts: Inside swings often precede significant moves
- Reversal Zones: Failed breakouts at inside swing levels
- Trend Continuation: Inside swings in trending markets
Limitations
- Lagging Indicator: Patterns form after completion
- False Signals: Not all inside swings lead to significant moves
- Market Dependent: Effectiveness varies by market conditions
Customization Options
Visual Adjustments
- Modify colors for different market conditions
- Adjust line widths for visibility
- Enable/disable specific elements
Detection Sensitivity
- Increase pivot length for smoother patterns
- Decrease for more sensitive detection
- Balance between noise and signal
Display Management
- Control maximum pattern count
- Adjust cleanup frequency
- Manage memory usage
Conclusion
The Inside Swings indicator provides a systematic approach to identifying consolidation and potential reversal zones in price action. By visualizing overlapping pivot ranges
The indicator's strength lies in its ability to:
- Identify key price levels automatically
- Provide visual context for market structure
- Offer flexible customization options
- Maintain performance through efficient memory management
Indicators and strategies
Relative Performance Tracker [QuantAlgo]🟢 Overview
The Relative Performance Tracker is a multi-asset comparison tool designed to monitor and rank up to 30 different tickers simultaneously based on their relative price performance. This indicator enables traders and investors to quickly identify market leaders and laggards across their watchlist, facilitating rotation strategies, strength-based trading decisions, and cross-asset momentum analysis.
🟢 Key Features
1. Multi-Asset Monitoring
Track up to 30 tickers across any market (stocks, crypto, forex, commodities, indices)
Individual enable/disable toggles for each ticker to customize your watchlist
Universal compatibility with any TradingView symbol format (EXCHANGE:TICKER)
2. Ranking Tables (Up to 3 Tables)
Each ticker's percentage change over your chosen lookback period, calculated as:
(Current Price - Past Price) / Past Price × 100
Automatic sorting from strongest to weakest performers
Rank: Position from 1-30 (1 = strongest performer)
Ticker: Symbol name with color-coded background (green for gains, red for losses)
% Change: Exact percentage with color intensity matching magnitude
For example, Rank #1 has the highest gain among all enabled tickers, Rank #30 has the lowest (or most negative) return.
3. Histogram Visualization
Adjustable bar count: Display anywhere from 1 to 30 top-ranked tickers (user customizable)
Bar height = magnitude of percentage change.
Bars extend upward for gains, downward for losses. Taller bars = larger moves.
Green bars for positive returns, red for negative returns.
4. Customizable Color Schemes
Classic: Traditional green/red for intuitive interpretation
Aqua: Blue/orange combination for reduced eye strain
Cosmic: Vibrant aqua/purple optimized for dark mode
Custom: Full personalization of positive and negative colors
5. Built-In Ranking Alerts
Six alert conditions detect when rankings change:
Top 1 Changed: New #1 leader emerges
Top 3/5/10/15/20 Changed: Shifts within those tiers
🟢 Practical Applications
→ Momentum Trading: Focus on top-ranked assets (Rank 1-10) that show strongest relative strength for trend-following strategies
→ Market Breadth Analysis: Monitor how many tickers are above vs. below zero on the histogram to gauge overall market health
→ Divergence Spotting: Identify when previously leading assets lose momentum (drop out of top ranks) as potential trend reversal signals
→ Multi-Timeframe Analysis: Use different lookback periods on different charts to align short-term and long-term relative strength
→ Customized Focus: Adjust histogram bars to show only top 5-10 strongest movers for concentrated analysis, or expand to 20-30 for comprehensive overview
HTF Candles with PVSRA Volume Coloring (PCS Series)This indicator displays higher timeframe (HTF) candles using a PVSRA-inspired color model that blends price and volume strength, allowing traders to visualize higher-timeframe activity directly on lower-timeframe charts without switching screens.
OVERVIEW
This script visualizes higher-timeframe (HTF) candles directly on lower-timeframe charts using a custom PVSRA (Price, Volume & Support/Resistance Analysis) color model.
Unlike standard HTF indicators, it aggregates real-time OHLC and volume data bar-by-bar and dynamically draws synthetic HTF candles that update as the higher-timeframe bar evolves.
This allows traders to interpret momentum, trend continuation, and volume pressure from broader market structures without switching charts.
INTEGRATION LOGIC
This script merges higher-timeframe candle projection with PVSRA volume analysis to provide a single, multi-timeframe momentum view.
The HTF structure reveals directional context, while PVSRA coloring exposes the underlying strength of buying and selling pressure.
By combining both, traders can see when a higher-timeframe candle is building with strong or weak volume, enabling more informed intraday decisions than either tool could offer alone.
HOW IT WORKS
Aggregates price data : Groups lower-timeframe bars to calculate higher-timeframe Open, High, Low, Close, and total Volume.
Applies PVSRA logic : Compares each HTF candle’s volume to the average of the last 10 bars:
• >200% of average = strong activity
• >150% of average = moderate activity
• ≤150% = normal activity
Assigns colors :
• Green/Blue = bullish high-volume
• Red/Fuchsia = bearish high-volume
• White/Gray = neutral or low-volume moves
Draws dynamic outlines : Outlines update live while the current HTF candle is forming.
Supports symbol override : Calculations can use another instrument for correlation analysis.
This multi-timeframe aggregation avoids repainting issues in request.security() and ensures accurate real-time HTF representation.
FEATURES
Dual HTF Display : Visualize two higher timeframes simultaneously (e.g., 4H and 1D).
Dynamic PVSRA Coloring : Volume-weighted candle colors reveal bullish or bearish dominance.
Customizable Layout : Adjust candle width, spacing, offset, and color schemes.
Candle Outlines : Highlight the forming HTF candle to monitor developing structure.
Symbol Override : Display HTF candles from another instrument for cross-analysis.
SETTINGS
HTF 1 & HTF 2 : enable/disable, set timeframes, choose label colors, show/hide outlines.
Number of Candles : choose how many HTF candles to plot (1–10).
Offset Position : distance to the right of the current price where HTF candles begin.
Spacing & Width : adjust separation and scaling of candle groups.
Show Wicks/Borders : toggle wick and border visibility.
PVSRA Colors : enable or disable volume-based coloring.
Symbol Override : use a secondary ticker for HTF data if desired.
USAGE TIPS
Set the indicator’s visual order to “Bring to front.”
Always choose HTFs higher than your active chart timeframe.
Use PVSRA colors to identify strong momentum and potential reversals.
Adjust candle spacing and width for your chart layout.
Outlines are not shown on chart timeframes below 5 minutes.
TRADING STRATEGY
Strategy Overview : Combine HTF structure and PVSRA volume signals to
• Identify zones of high institutional activity and potential reversals.
• Wait for confirmation through consolidation or a pullback to key levels.
• Trade in alignment with dominant higher-timeframe structure rather than chasing volatility.
Setup :
• Chart timeframe: lower (5m, 15m, 1H)
• HTF 1: 4H or 1D
• HTF 2: 1D or 1W
• PVSRA Colors: enabled
• Outlines: enabled
Entry Concept :
High-volume candles (green or red) often indicate market-maker activity , such zones often reflect liquidity absorption by larger players and are not necessarily ideal entry points.
Wait for the next consolidation or pullback toward a support or resistance level before acting.
Bullish scenario :
• After a high-volume or rejection candle near a low, price consolidates and forms a higher low.
• Enter long only when structure confirms strength above support.
Bearish scenario :
• After a high-volume or rejection candle near a top, price consolidates and forms a lower high.
• Enter short once resistance holds and momentum weakens.
Exit Guidelines :
• Exit when next HTF candle shifts in color or momentum fades.
• Exit if price structure breaks opposite to your trade direction.
• Always use stop-loss and take-profit levels.
Additional Tips :
• Never enter directly on strong green/red high-volume candles, these are usually areas of institutional absorption.
• Wait for market structure confirmation and volume normalization.
• Combine with RSI, moving averages, or support/resistance for timing.
• Avoid trading when HTF candles are mixed or low-volume (unclear bias).
• Outlines hidden below 5m charts.
Risk Management :
• Use stop-loss and take-profit on all positions.
• Limit risk to 1–2% per trade.
• Adjust position size for volatility.
FINAL NOTES
This script helps traders synchronize lower-timeframe execution with higher-timeframe momentum and volume dynamics.
Test it on demo before live use, and adjust settings to fit your trading style.
DISCLAIMER
This script is for educational purposes only and does not constitute financial advice.
SUPPORT & UPDATES
Future improvements may include alert conditions and additional visualization modes. Feedback is welcome in the comments section.
CREDITS & LICENSE
Created by @seoco — open source for community learning.
Licensed under Mozilla Public License 2.0 .
Realtime RenkoI've been working on real-time renko for a while as a coding challenge. The interesting problem here is building renko bricks that form based on incoming tick data rather than waiting for bar closes. Every tick that comes through gets processed immediately, and when price moves enough to complete a brick, that brick closes and a new one opens right then. It's just neat because you can run it and it updates as you'd expect with renko, forming bricks based purely on price movement happening in real time rather than waiting for arbitrary time intervals to pass.
The three brick sizing methods give you flexibility in how you define "enough movement" to form a new brick. Traditional renko uses a fixed price range, so if you set it to 10 ticks, every brick represents exactly 10 ticks of movement. This works well for instruments with stable tick sizes and predictable volatility. ATR-based sizing calculates the average true range once at startup using a weighted average across all historical bars, then divides that by your brick value input. If you want bricks that are one full ATR in size, you'd use a brick value of 1. If you want half-ATR bricks, use 2. This inverted relationship exists because the calculation is ATR divided by your input, which lets you work with multiples and fractions intuitively. Percentage-based sizing makes each brick a fixed percentage move from the previous brick's close, which automatically scales with price level and works well for instruments that move proportionally rather than in absolute tick increments.
The best part about this implementation is how it uses varip for state management. When you first load the indicator, there's no history at all. Everything starts fresh from the moment you add it to your chart because varip variables only exist in real-time. This means you're watching actual renko bricks form from real tick data as it arrives. The indicator builds its own internal history as it runs, storing up to 250 completed bricks in memory, but that history only exists for the current session. Refresh the page or reload the indicator and it starts over from scratch.
The visual implementation uses boxes for brick bodies and lines for wicks, drawn at offset bar indices to create the appearance of a continuous renko chart in the indicator pane. Each brick occupies two bar index positions horizontally, which spaces them out and makes the chart readable. The current brick updates in real time as new ticks arrive, with its high, low, and close values adjusting continuously until it reaches the threshold to close and become finalized. Once a brick closes, it gets pushed into the history array and a new brick opens at the closing level of the previous one.
What makes this especially useful for debugging and analysis are the hover tooltips on each brick. Clicking on any brick brings up information showing when it opened with millisecond precision, how long it took to form from open to close, its internal bar index within the renko sequence, and the brick size being used. That time delta measurement is particularly valuable because it reveals the pace of price movement. A brick that forms in five seconds indicates very different market conditions than one that takes three minutes, even though both bricks represent the same amount of price movement. You can spot acceleration and deceleration in trend development by watching how quickly consecutive bricks form.
The pine logs that generate when bricks close serve as breadcrumbs back to the main chart. Every time a brick finalizes, the indicator writes a log entry with the same information shown in the tooltip. You can click that log entry and TradingView jumps your main chart to the exact timestamp when that brick closed. This lets you correlate renko brick formation with what was happening on the time-based chart, which is critical for understanding context. A brick that closed during a major news announcement or at a key support level tells a different story than one that closed during quiet drift, and the logs make it trivial to investigate those situations.
The internal bar indexing system maintains a separate count from the chart's bar_index, giving each renko brick its own sequential number starting from when the indicator begins running. This makes it easy to reference specific bricks in your analysis or when discussing patterns with others. The internal index increments only when a brick closes, so it's a pure measure of how many bricks have formed regardless of how much chart time has passed. You can match these indices between the visual bricks and the log entries, which helps when you're trying to track down the details of a specific brick that caught your attention.
Brick overshoot handling ensures that when price blows through the threshold level instead of just barely touching it, the brick closes at the threshold and the excess movement carries over to the next brick. This prevents gaps in the renko sequence and maintains the integrity of the brick sizing. If price shoots up through your bullish threshold and keeps going, the current brick closes at exactly the threshold level and the new brick opens there with the overshoot already baked into its initial high. Without this logic, you'd get renko bricks with irregular sizes whenever price moved aggressively, which would undermine the whole point of using fixed-range bricks.
The timezone setting lets you adjust timestamps to your local time or whatever reference you prefer, which matters when you're analyzing logs or comparing brick formation times across different sessions. The time delta formatter converts raw milliseconds into human-readable strings showing days, hours, minutes, and seconds with fractional precision. This makes it immediately clear whether a brick took 12.3 seconds or 2 minutes and 15 seconds to form, without having to parse millisecond values mentally.
This is the script version that will eventually be integrated into my real-time candles library. The library version had an issue with tooltips not displaying correctly, which this implementation fixes by using a different approach to label creation and positioning. Running it as a standalone indicator also gives you more control over the visual settings and makes it easier to experiment with different brick sizing methods without affecting other tools that might be using the library version.
What this really demonstrates is that real-time indicators in Pine Script require thinking about state management and tick processing differently than historical indicators. Most indicator code assumes bars are immutable once closed, so you can reference `close ` and know that value will never change. Real-time renko throws that assumption out because the current brick is constantly mutating with every tick until it closes. Using varip for state variables and carefully tracking what belongs to finalized bricks versus the developing brick makes it possible to maintain consistency while still updating smoothly in real-time. The fact that there's no historical reconstruction and everything starts fresh when you load it is actually a feature, not a limitation, because you're seeing genuine real-time brick formation rather than some approximation of what might have happened in the past.
Order Flow Bubbles -Volume-CORINDDisplays “Order Flow Bubbles” on a TradingView chart — highlighting candles with unusually high volume or delta (buy/sell imbalance).
The bubbles show numeric values (volume, delta, etc.) above or below candles.
⚙️ Main Features
Detects Volume or Delta Spikes:
Compares each bar’s value to a moving average. If it’s much higher (a “spike”), it plots a bubble.
Buy vs Sell Detection:
Green bubbles → high buying activity.
Red bubbles → high selling activity.
Dynamic Bubble Placement:
Uses candle range and ATR so bubbles move naturally with chart zooming and scaling.
Black Text Inside Bubble:
Clear and bold-style numbers inside each bubble for easy reading.
Optional Faux-Bold Text:
Adds extra invisible text layers to make text appear bolder without breaking TradingView limits.
Tooltip Info:
Hovering a bubble shows details — volume, ratio, delta, buy/sell volume, and price.
Delta Line (Optional):
Option to plot the delta as a line below chart for reference.
Mean Reversion Oscillator [Alpha Extract]An advanced composite oscillator system specifically designed to identify extreme market conditions and high-probability mean reversion opportunities, combining five proven oscillators into a single, powerful analytical framework.
By integrating multiple momentum and volume-based indicators with sophisticated extreme level detection, this oscillator provides precise entry signals for contrarian trading strategies while filtering out false reversals through momentum confirmation.
🔶 Multi-Oscillator Composite Framework
Utilizes a comprehensive approach that combines Bollinger %B, RSI, Stochastic, Money Flow Index, and Williams %R into a unified composite score. This multi-dimensional analysis ensures robust signal generation by capturing different aspects of market extremes and momentum shifts.
// Weighted composite (equal weights)
normalized_bb = bb_percent
normalized_rsi = rsi
normalized_stoch = stoch_d_val
normalized_mfi = mfi
normalized_williams = williams_r
composite_raw = (normalized_bb + normalized_rsi + normalized_stoch + normalized_mfi + normalized_williams) / 5
composite = ta.sma(composite_raw, composite_smooth)
🔶 Advanced Extreme Level Detection
Features a sophisticated dual-threshold system that distinguishes between moderate and extreme market conditions. This hierarchical approach allows traders to identify varying degrees of mean reversion potential, from moderate oversold/overbought conditions to extreme levels that demand immediate attention.
🔶 Momentum Confirmation System
Incorporates a specialized momentum histogram that confirms mean reversion signals by analyzing the rate of change in the composite oscillator. This prevents premature entries during strong trending conditions while highlighting genuine reversal opportunities.
// Oscillator momentum (rate of change)
osc_momentum = ta.mom(composite, 5)
histogram = osc_momentum
// Momentum confirmation
momentum_bullish = histogram > histogram
momentum_bearish = histogram < histogram
// Confirmed signals
confirmed_bullish = bullish_entry and momentum_bullish
confirmed_bearish = bearish_entry and momentum_bearish
🔶 Dynamic Visual Intelligence
The oscillator line adapts its color intensity based on proximity to extreme levels, providing instant visual feedback about market conditions. Background shading creates clear zones that highlight when markets enter moderate or extreme territories.
🔶 Intelligent Signal Generation
Generates precise entry signals only when the composite oscillator crosses extreme thresholds with momentum confirmation. This dual-confirmation approach significantly reduces false signals while maintaining sensitivity to genuine mean reversion opportunities.
How It Works
🔶 Composite Score Calculation
The indicator simultaneously tracks five different oscillators, each normalized to a 0-100 scale, then combines them into a smoothed composite score. This approach eliminates the noise inherent in single-oscillator analysis while capturing the consensus view of multiple momentum indicators.
// Mean reversion entry signals
bullish_entry = ta.crossover(composite, 100 - extreme_level) and composite < (100 - extreme_level)
bearish_entry = ta.crossunder(composite, extreme_level) and composite > extreme_level
// Bollinger %B calculation
bb_basis = ta.sma(src, bb_length)
bb_dev = bb_mult * ta.stdev(src, bb_length)
bb_percent = (src - bb_lower) / (bb_upper - bb_lower) * 100
🔶 Extreme Zone Identification
The system automatically identifies when markets reach statistically significant extreme levels, both moderate (65/35) and extreme (80/20). These zones represent areas where mean reversion has the highest probability of success based on historical market behavior.
🔶 Momentum Histogram Analysis
A specialized momentum histogram tracks the velocity of oscillator changes, helping traders distinguish between healthy corrections and potential trend reversals. The histogram's color-coded display makes momentum shifts immediately apparent.
🔶 Divergence Detection Framework
Built-in divergence analysis identifies situations where price and oscillator movements diverge, often signaling impending reversals. Diamond-shaped markers highlight these critical divergence patterns for enhanced pattern recognition.
🔶 Real-Time Information Dashboard
An integrated information table provides instant access to current oscillator readings, market status, and individual component values. This dashboard eliminates the need to manually check multiple indicators while trading.
🔶 Individual Component Display
Optional display of individual oscillator components allows traders to understand which specific indicators are driving the composite signal. This transparency enables more informed decision-making and deeper market analysis.
🔶 Adaptive Background Coloring
Intelligent background shading automatically adjusts based on market conditions, creating visual zones that correspond to different levels of mean reversion potential. The subtle color gradations make pattern recognition effortless.
1D
3D
🔶 Comprehensive Alert System
Multi-tier alert system covers confirmed entry signals, divergence patterns, and extreme level breaches. Each alert type provides specific context about the detected condition, enabling traders to respond appropriately to different signal strengths.
🔶 Customizable Threshold Management
Fully adjustable extreme and moderate levels allow traders to fine-tune the indicator's sensitivity to match different market volatilities and trading timeframes. This flexibility ensures optimal performance across various market conditions.
🔶 Why Choose AE - Mean Reversion Oscillator?
This indicator provides the most comprehensive approach to mean reversion trading by combining multiple proven oscillators with advanced confirmation mechanisms. By offering clear visual hierarchies for different extreme levels and requiring momentum confirmation for signals, it empowers traders to identify high-probability contrarian opportunities while avoiding false reversals. The sophisticated composite methodology ensures that signals are both statistically significant and practically actionable, making it an essential tool for traders focused on mean reversion strategies across all market conditions.
CQ_(0)_Essential Indicators [BITCOIN HOY]Essential indicators (BitcoinHoy)
A Comprehensive TradingView Indicator for Crypto Traders and Analysts
Introduction
The Essential indicators (BitcoinHoy) is a versatile TradingView indicator designed to streamline and enrich the trading experience for cryptocurrency traders and analysts. Developed as a practical complement to popular Fibonacci-based range tools, this indicator brings together manual input capabilities and a curated suite of proven Pine Script tools, providing users with a robust, all-in-one solution for technical analysis.
Complementary Indicators
Essential indicators (BitcoinHoy) is specifically crafted to work alongside the Fibonacci IntraDay Range, Fibonacci IntraWeek Range, and Fibonacci IntraMonth Range tools. By integrating with these established indicators, it enhances multi-timeframe analysis, allowing traders to visualize and act upon key price levels within daily, weekly, and monthly contexts. This synergy helps users refine their strategies and better anticipate market movements.
Manual Input Features
A standout feature of Essential indicators (BitcoinHoy) is its support for manual input of both mid and long-term price targets. Users can easily enter their own key levels, including potential entries and target prices, directly on the chart. Additionally, the indicator enables the marking of specific entry events and target events, offering a clear historical and forward-looking view of trading plans and outcomes. This manual flexibility empowers traders to adapt their analysis to evolving market conditions and personal strategies.
Integrated Indicators
To further enhance its utility, Essential indicators (BitcoinHoy) integrates a selection of carefully chosen indicators authored by respected members of the Pine Script community. Each tool adds unique analytical power, covering various aspects of price action, trend identification, and market structure.
Candles in a Row: Sequence Visualization
Based on Zeiierman's popular "Candles in a Row," this feature counts and displays consecutive green (bullish) and red (bearish) candles on the chart. By visualizing these sequences, traders can quickly identify streaks of buying or selling pressure, spot potential exhaustion points, and time entries or exits more effectively. This clarity is especially valuable in volatile crypto markets, where momentum shifts can be rapid and impactful.
Trend Range Detector: Range and Breakout Identification
Also from Zeiierman, the "Trend Range Detector" module identifies and highlights price ranges, signaling periods of consolidation or equilibrium. When price action breaks out of these defined ranges, the indicator draws attention to these events, helping traders recognize emerging trends and potential trade opportunities. This detection capability supports both range-bound and breakout trading strategies.
Fibonacci Retracement Neo: Key Level Progress Tracking
Incorporating .srb's "Fibonacci Retracement Neo," Essential indicators (BitcoinHoy) displays a dynamic progress gauge, showing how far price has moved through significant Fibonacci retracement levels. The indicator also marks entry events at these key levels, providing actionable signals for traders who rely on Fibonacci-based strategies. This visual feedback aids in tracking price reactions at important support and resistance zones.
ZigZag Trend Metrics Delta: Pivot Analysis
Leveraging Fract's "ZigZag Trend Metrics Delta," this component identifies and annotates major price pivots, offering insight into the broader trend structure. By highlighting significant swing highs and lows, the indicator helps users spot trend reversals, continuation patterns, and optimal points for entry or exit. This information is crucial for analyzing market cycles and refining risk management.
Conclusion
Essential indicators (BitcoinHoy) provides a holistic and user-friendly solution for crypto traders and analysts seeking to enhance their technical analysis on TradingView. By combining the flexibility of manual input with a suite of trusted Pine Script indicators, it enables users to monitor price action, track key events, and respond proactively to market developments. Whether used alone or in conjunction with Fibonacci range tools, Essential indicators (BitcoinHoy) supports informed decision-making and improved trading outcomes
Dynamic Market Structure (MTF) - Dow TheoryDynamic Market Structure (MTF)
OVERVIEW
This advanced indicator provides a comprehensive and fully customizable solution for analyzing market structure based on classic Dow Theory principles. It automates the identification of key structural points, including Higher Highs (HH), Higher Lows (HL), Lower Lows (LL), and Lower Highs (LH).
Going beyond simple pivot detection, this tool visualizes the flow of the trend by plotting dynamic Breaks of Structure (BOS) and potential reversals with Changes of Character (CHoCH). It is designed to be a flexible and powerful tool for traders who use price action and trend analysis as a core part of their strategy.
CORE CONCEPTS
The indicator is built on the foundational principles of Dow Theory:
Uptrend: A series of Higher Highs and Higher Lows.
Downtrend: A series of Lower Lows and Lower Highs.
Break of Structure (BOS): Occurs when price action continues the current trend by creating a new HH in an uptrend or a new LL in a downtrend.
Change of Character (CHoCH): Occurs when the established trend sequence is broken, signaling a potential reversal. For example, when a Lower Low forms after a series of Higher Highs.
CALCULATION METHODOLOGY
This section explains the indicator's underlying logic:
Pivot Detection: The indicator's core logic is based on TradingView's built-in ta.pivothigh() and ta.pivotlow() functions. The sensitivity of this detection is fully controlled by the user via the Pivot Lookback Left and Pivot Lookback Right settings.
Structure Calculation (BOS/CHoCH): The script identifies market structure by analyzing the sequence of these confirmed pivots.
A bullish BOS is plotted when a new ta.pivothigh is confirmed at a price higher than the previous confirmed ta.pivothigh.
A bearish CHoCH is plotted when a new ta.pivotlow is confirmed at a price lower than the previous confirmed ta.pivotlow , breaking the established sequence of higher lows.
The logic is mirrored for bearish BOS and bullish CHoCH.
Invalidation Levels: This feature identifies the last confirmed pivot before a structure break (e.g., the last ta.pivotlow before a bullish BOS) and plots a dotted line from it to the breakout bar. This level is considered the structural invalidation point for that move.
MTF Confirmation: This unique feature provides confluence by analyzing a second, lower timeframe. When a pivot (e.g., a Higher Low) is confirmed on the main chart, the script requests pivot data from the user-selected lower timeframe. If a corresponding trend reversal is detected on that lower timeframe (e.g., a break of its own minor downtrend), the pivot is labeled "Firm" (FHL); otherwise, it is labeled "Soft" (SHL).
KEY FEATURES
This indicator is packed with advanced features designed to provide a deeper level of market insight:
Dynamic Structure Lines: BOS and CHoCH levels are plotted with clean, dashed lines that dynamically start at the old pivot and terminate precisely at the breakout bar, keeping the chart clean and precise.
Invalidation Levels: For every structure break, the indicator can plot a dotted "Invalidation" line (INV). This marks the critical support or resistance pivot that, if broken, would negate the previous move, providing a clear reference for risk management.
Multi-Timeframe (MTF) Confirmation: Add a layer of confluence to your analysis by confirming pivots on a lower timeframe. The indicator can label Higher Lows and Lower Highs as either "Firm" (FHL/FLH) if confirmed by a reversal on a lower timeframe, or "Soft" (SHL/SLH) if not.
Flexible Pivot Detection: Fully adjustable Pivot Lookback settings for the left and right sides allow you to tune the indicator's sensitivity to match any timeframe or trading style, from long-term investing to short-term scalping.
Full Customization: Take complete control of the indicator's appearance. A dedicated style menu allows you to customize the colors for all bullish, bearish, and reversal elements, including the transparency of the trend-based candle coloring.
HOW TO USE
Trend Identification: Use the sequence of HH/HL and LL/LH, along with the trend-colored candles, to quickly assess the current market direction on any timeframe.
Entry Signals: A confirmed BOS can signal a potential entry in the direction of the trend. A CHoCH can signal a potential reversal, offering an opportunity to enter a new trend early.
Risk Management: Use the automatically plotted "Invalidation" (INV) lines as a logical reference point for placing stop losses. A break of this level indicates that the structure you were trading has failed.
Confluence: Use the "Firm" pivot signals from the MTF analysis to identify high-probability swing points that are supported by price action on multiple timeframes.
SETTINGS BREAKDOWN
Pivot Lookback Left/Right: Controls the sensitivity of pivot detection. Higher numbers find more significant (but fewer) pivots.
MTF Confirmation: Enable/disable the "Firm" vs. "Soft" pivot analysis and select your preferred lower timeframe for confirmation.
Style Settings: Customize all colors and the transparency of the candle coloring to match your chart's theme.
Show Invalidation Levels: Toggle the visibility of the dotted invalidation lines.
This indicator is a powerful tool for visualizing and trading with the trend. Experiment with the settings to find a configuration that best fits your personal trading strategy.
Tristan's W%R StrategyOverview:
This strategy uses the raw Williams %R oscillator to automatically generate buy and sell signals based on overbought and oversold levels. It is session-aware, allowing you to restrict trades to specific market hours (New York, London, or Asia).
Key Features:
Buy Signal: Fires whenever the raw Williams %R is at or below the oversold level (default −100).
Sell Signal: Fires whenever the raw Williams %R is at or above the overbought level (default 0).
Session Filtering: Only triggers trades during the selected session (All, New York, London, or Asia).
Pyramiding: Allows multiple trades to stack, so every qualifying signal results in a new trade.
Alerts: Optional alerts for automation via webhook or broker integration.
Session Highlight: Background shading indicates when the selected session is active.
How to Use:
Set the Williams %R length, overbought, and oversold levels to match your trading style.
Select the session you want the strategy to be active in (New York, London, or Asia).
Enable alerts if you plan to automate trades with an API.
Add the strategy to your chart. It will execute trades automatically whenever the raw %R meets the configured thresholds during the selected session.
Adjust pyramiding if you want to limit the number of stacked trades per session.
Note:
This script uses the raw W%R signal vs the smoothed one because I found it to be more accurate for automated trading.
Every qualifying signal results in a trade, even if positions are already open.
Fair Value Lead-Lag Model [BackQuant]Fair Value Lead-Lag Model
A cross-asset model that estimates where price "should" be relative to a chosen reference series, then tracks the deviation as a normalized oscillator. It helps you answer two questions: 1) is the asset rich or cheap vs its driver, and 2) is the driver leading or lagging price over the next N bars.
Concept in one paragraph
Many assets co-move with a macro or sector driver. Think BTC vs DXY, gold vs real yields, a stock vs its sector ETF. This tool builds a rolling fair value of the charted asset from a reference series and shows how far price is above or below that fair value in standard deviation units. You can shift the reference forward or backward to test who leads whom, then use the deviation and its bands to structure mean-reversion or trend-following ideas.
What the model does
Reference mapping : Pulls a reference symbol at a chosen timeframe, with an optional lead or lag in bars to test causality.
Fair value engine : Converts the reference into a synthetic fair value of the chart using one of four methods:
Ratio : price/ref with a rolling average ratio. Good when the relationship is proportional.
Spread : price minus ref with a rolling average spread. Good when the relationship is additive.
Z-Score : normalizes both series, aligns on standardized units, then re-projects to price space. Good when scale drifts.
Beta-Adjusted : rolling regression style. Uses covariance and variance to compute beta, then builds a fair value = mean(price) + beta * (ref − mean(ref)).
Deviation and bands : Computes a z-scored deviation of price vs fair value and plots sigma bands (±1, ±2, ±3) around the fair value line on the chart.
Correlation context : Shows rolling correlation so you can judge if deviations are meaningful or just noise when co-movement is weak.
Visuals :
Fair value line on price chart with sigma envelopes.
Deviation as a column oscillator and optional line.
Threshold shading beyond user-set upper and lower levels.
Summary table with reference, deviation, status, correlation, and method.
Why this is useful
Mean reversion framework : When correlation is healthy and deviation stretches beyond your sigma threshold, probability favors reversion toward fair value. This is classic pairs logic adapted to a driver and a target.
Trend confirmation : If price rides the fair value line and deviation stays modest while correlation is positive, it supports trend persistence. Pullbacks to negative deviation in an uptrend can be buyable.
Lead-lag discovery : Shift the reference forward by +N bars. If correlation improves, the reference tends to lead. Shift backward for the reverse. Use the best setting for planning early entries or hedges.
Regime detection : Large persistent deviations with falling correlation hint at regime change. The relationship you relied on may be breaking down, so reduce confidence or switch methods.
How to use it step by step
Pick a sensible reference : Choose a macro, index, currency, or sector driver that logically explains the asset’s moves. Example: gold with DXY, a semiconductor stock with SOXX.
Test lead-lag : Nudge Lead/Lag Periods to small positive values like +1 to +5 to see if the reference leads. If correlation improves, keep that offset. If correlation worsens, try a small negative value or zero.
Select a method :
Start with Beta-Adjusted when the relationship is approximately linear with drift.
Use Ratio if the assets usually move in proportional terms.
Use Spread when they trade around a level difference.
Use Z-Score when scales wander or volatility regimes shift.
Tune windows :
Rolling Window controls how quickly fair value adapts. Shorter equals faster but noisier.
Normalization Period controls how deviations are standardized. Longer equals stabler sigma sizing.
Correlation Length controls how co-movement is measured. Keep it near the fair value window.
Trade the edges :
Mean reversion idea : Wait for deviation beyond your Upper or Lower Threshold with positive correlation. Fade back toward fair value. Exit at the fair value line or the next inner sigma band.
Trend idea : In an uptrend, buy pullbacks when deviation dips negative but correlation remains healthy. In a downtrend, sell bounces when deviation spikes positive.
Read the table : Deviation shows how many sigmas you are from fair value. Status tells you overvalued or undervalued. Correlation color hints confidence. Method tells you the projection style used.
Reading the display
Fair value line on price chart: the model’s estimate of where price should trade given the reference, updated each bar.
Sigma bands around fair value: a quick sense of residual volatility. Reversions often target inner bands first.
Deviation oscillator : above zero means rich vs fair value, below zero means cheap. Color bins intensify with distance.
Correlation line (optional): scale is folded to match thresholds. Higher values increase trust in deviations.
Parameter tips
Start with Rolling Window 20 to 30, Normalization Period 100, Correlation Length 50.
Upper and Lower Threshold at ±2.0 are classic. Tighten to ±1.5 for more signals or widen to ±2.5 to focus on outliers.
When correlation drifts below about 0.3, treat deviations with caution. Consider switching method or reference.
If the fair value line whipsaws, increase Rolling Window or move to Beta-Adjusted which tends to be smoother.
Playbook examples
Pairs-style reversion : Asset is +2.3 sigma rich vs reference, correlation 0.65, trend flat. Short the deviation back toward fair value. Cover near the fair value line or +1 sigma.
Pro-trend pullback : Uptrend with correlation 0.7. Deviation dips to −1.2 sigma while price sits near the −1 sigma band. Buy the dip, target the fair value line, trail if the line is rising.
Lead-lag timing : Reference leads by +3 bars with improved correlation. Use reference swings as early cues to anticipate deviation turns on the target.
Caveats
The model assumes a stable relationship over the chosen windows. Structural breaks, policy shocks, and index rebalances can invalidate recent history.
Correlation is descriptive, not causal. A strong correlation does not guarantee future convergence.
Do not force trades when the reference has low liquidity or mismatched hours. Use a reference timeframe that captures real overlap.
Bottom line
This tool turns a loose cross-asset intuition into a quantified, visual fair value map. It gives you a consistent way to find rich or cheap conditions, time mean-reversion toward a statistically grounded target, and confirm or fade trends when the driver agrees.
Asia Session Mechanical Entry by AleThis indicator executes fully mechanical trades at the start of the Asian session (default: 20:00 Argentina time).
Core logic:
Compares the closing prices of the previous two sessions at 20:00 and 09:00 to determine bias.
If both days move in the same direction, the indicator takes a mean-reversion trade (opposite to the last two days’ move).
If the days move in opposite directions, the trade follows the most recent day’s direction.
Execution details:
Entry price: exact session open or delayed by a user-defined number of candles.
Stop Loss: nearest swing high/low ± ATR multiplier buffer.
Take Profit: calculated from entry to SL distance, multiplied by user-defined RR ratio.
ATR value plotted for volatility reference.
Works on H1 charts for consistent candle timing.
Features:
Adjustable start/end session times.
Configurable ATR multiplier, RR ratio, and delay before entry.
Manual overrides for SL/TP levels.
Automatic daily reset for next session's logic.
Notes:
This tool is based on a classic session-reversion model enhanced with ATR-based filters, flexible timing, and manual overrides. It is designed for systematic execution and quick visual backtesting.
CQ_(0)_Essential Indicators [BITCOIN HOY]Essential indicators (BitcoinHoy)
A Comprehensive TradingView Indicator for Crypto Traders and Analysts
Introduction
The Essential indicators (BitcoinHoy) is a versatile TradingView indicator designed to streamline and enrich the trading experience for cryptocurrency traders and analysts. Developed as a practical complement to popular Fibonacci-based range tools, this indicator brings together manual input capabilities and a curated suite of proven Pine Script tools, providing users with a robust, all-in-one solution for technical analysis.
Complementary Indicators
Essential indicators (BitcoinHoy) is specifically crafted to work alongside the Fibonacci IntraDay Range, Fibonacci IntraWeek Range, and Fibonacci IntraMonth Range tools. By integrating with these established indicators, it enhances multi-timeframe analysis, allowing traders to visualize and act upon key price levels within daily, weekly, and monthly contexts. This synergy helps users refine their strategies and better anticipate market movements.
Manual Input Features
A standout feature of Essential indicators (BitcoinHoy) is its support for manual input of both mid and long-term price targets. Users can easily enter their own key levels, including potential entries and target prices, directly on the chart. Additionally, the indicator enables the marking of specific entry events and target events, offering a clear historical and forward-looking view of trading plans and outcomes. This manual flexibility empowers traders to adapt their analysis to evolving market conditions and personal strategies.
Integrated Indicators
To further enhance its utility, Essential indicators (BitcoinHoy) integrates a selection of carefully chosen indicators authored by respected members of the Pine Script community. Each tool adds unique analytical power, covering various aspects of price action, trend identification, and market structure.
Candles in a Row: Sequence Visualization
Based on Zeiierman's popular "Candles in a Row," this feature counts and displays consecutive green (bullish) and red (bearish) candles on the chart. By visualizing these sequences, traders can quickly identify streaks of buying or selling pressure, spot potential exhaustion points, and time entries or exits more effectively. This clarity is especially valuable in volatile crypto markets, where momentum shifts can be rapid and impactful.
Trend Range Detector: Range and Breakout Identification
Also from Zeiierman, the "Trend Range Detector" module identifies and highlights price ranges, signaling periods of consolidation or equilibrium. When price action breaks out of these defined ranges, the indicator draws attention to these events, helping traders recognize emerging trends and potential trade opportunities. This detection capability supports both range-bound and breakout trading strategies.
Fibonacci Retracement Neo: Key Level Progress Tracking
Incorporating .srb's "Fibonacci Retracement Neo," Essential indicators (BitcoinHoy) displays a dynamic progress gauge, showing how far price has moved through significant Fibonacci retracement levels. The indicator also marks entry events at these key levels, providing actionable signals for traders who rely on Fibonacci-based strategies. This visual feedback aids in tracking price reactions at important support and resistance zones.
ZigZag Trend Metrics Delta: Pivot Analysis
Leveraging Fract's "ZigZag Trend Metrics Delta," this component identifies and annotates major price pivots, offering insight into the broader trend structure. By highlighting significant swing highs and lows, the indicator helps users spot trend reversals, continuation patterns, and optimal points for entry or exit. This information is crucial for analyzing market cycles and refining risk management.
Conclusion
Essential indicators (BitcoinHoy) provides a holistic and user-friendly solution for crypto traders and analysts seeking to enhance their technical analysis on TradingView. By combining the flexibility of manual input with a suite of trusted Pine Script indicators, it enables users to monitor price action, track key events, and respond proactively to market developments. Whether used alone or in conjunction with Fibonacci range tools, Essential indicators (BitcoinHoy) supports informed decision-making and improved trading outcomes
Luxy Adaptive MA Cloud - Trend Strength & Signal Tracker V2Luxy Adaptive MA Cloud - Professional Trend Strength & Signal Tracker
Next-generation moving average cloud indicator combining ultra-smooth gradient visualization with intelligent momentum detection. Built for traders who demand clarity, precision, and actionable insights.
═══════════════════════════════════════════════
WHAT MAKES THIS INDICATOR SPECIAL?
═══════════════════════════════════════════════
Unlike traditional MA indicators that show static lines, Luxy Adaptive MA Cloud creates a living, breathing visualization of market momentum. Here's what sets it apart:
Exponential Gradient Technology
This isn't just a simple fill between two lines. It's a professionally engineered gradient system with 26 precision layers using exponential density distribution. The result? An organic, cloud-like appearance where the center is dramatically darker (15% transparency - where crossovers and price action occur), while edges fade gracefully (75% transparency). Think of it as a visual "heat map" of trend strength.
Dynamic Momentum Intelligence
Most MA clouds only show structure (which MA is on top). This indicator shows momentum strength in real-time through four intelligent states:
- 🟢 Bright Green = Explosive bullish momentum (both MAs rising strongly)
- 🔵 Blue = Weakening bullish (structure intact, but momentum fading)
- 🟠 Orange = Caution zone (bearish structure forming, weak momentum)
- 🔴 Deep Red = Strong bearish momentum (both MAs falling)
The cloud literally tells you when trends are accelerating or losing steam.
Conditional Performance Architecture
Every calculation is optimized for speed. Disable a feature? It stops calculating entirely—not just hidden, but not computed . The 26-layer gradient only renders when enabled. Toggle signals off? Those crossover checks don't run. This makes it one of the most efficient cloud indicators available, even with its advanced visual system.
Zero Repaint Guarantee
All signals and momentum states are based on confirmed bar data only . What you see in historical data is exactly what you would have seen trading live. No lookahead bias. No repainting tricks. No signals that "magically" appear perfect in hindsight. If a signal shows in history, it would have triggered in real-time at that exact moment.
Educational by Design
Every single input includes comprehensive tooltips with:
- Clear explanations of what each parameter does
- Practical examples of when to use different settings
- Recommended configurations for scalping, day trading, and swing trading
- Real-world trading impact ("This affects entry timing" vs "This is visual only")
You're not just getting an indicator—you're learning how to use it effectively .
═══════════════════════════════════════════════
THE GRADIENT CLOUD - TECHNICAL DETAILS
═══════════════════════════════════════════════
Architecture:
26 precision layers for silk-smooth transitions
Exponential density curve - layers packed tightly near center (where crossovers happen), spread wider at edges
75%-15% transparency range - center is highly opaque (15%), edges fade gracefully (75%)
V-Gradient design - emphasizes the action zone between Fast and Medium MAs
The Four Momentum States:
🟢 GREEN - Strong Bullish
Fast MA above Medium MA
Both MAs rising with momentum > 0.02%
Action: Enter/hold LONG positions, strong uptrend confirmed
🔵 BLUE - Weak Bullish
Fast MA above Medium MA
Weak or flat momentum
Action: Caution - bullish structure but losing strength, consider trailing stops
🟠 ORANGE - Weak Bearish
Medium MA above Fast MA
Weak or flat momentum
Action: Warning - bearish structure developing, consider exits
🔴 RED - Strong Bearish
Medium MA above Fast MA
Both MAs falling with momentum < -0.02%
Action: Enter/hold SHORT positions, strong downtrend confirmed
Smooth Transitions: The momentum score is smoothed using an 8-bar EMA to eliminate noise and prevent whipsaws. You see the true trend , not every minor fluctuation.
═══════════════════════════════════════════════
FLEXIBLE MOVING AVERAGE SYSTEM
═══════════════════════════════════════════════
Three Customizable MAs:
Fast MA (default: EMA 10) - Reacts quickly to price changes, defines short-term momentum
Medium MA (default: EMA 20) - Balances responsiveness with stability, core trend reference
Slow MA (default: SMA 200, optional) - Long-term trend filter, major support/resistance
Six MA Types Available:
EMA - Exponential; faster response, ideal for momentum and day trading
SMA - Simple; smooth and stable, best for swing trading and trend following
WMA - Weighted; middle ground between EMA and SMA
VWMA - Volume-weighted; reflects market participation, useful for liquid markets
RMA - Wilder's smoothing; used in RSI/ADX, excellent for trend filters
HMA - Hull; extremely responsive with minimal lag, aggressive option
Recommended Settings by Trading Style:
Scalping (1m-5m):
Fast: EMA(5-8)
Medium: EMA(10-15)
Slow: Not needed or EMA(50)
Day Trading (5m-1h):
Fast: EMA(10-12)
Medium: EMA(20-21)
Slow: SMA(200) for bias
Swing Trading (4h-1D):
Fast: EMA(10-20)
Medium: EMA(34-50)
Slow: SMA(200)
Pro Tip: Start with Fast < Medium < Slow lengths. The gradient works best when there's clear separation between Fast and Medium MAs.
═══════════════════════════════════════════════
CROSSOVER SIGNALS - CLEAN & RELIABLE
═══════════════════════════════════════════════
Golden Cross ⬆ LONG Signal
Fast MA crosses above Medium MA
Classic bullish reversal or trend continuation signal
Most reliable when accompanied by GREEN cloud (strong momentum)
Death Cross ⬇ SHORT Signal
Fast MA crosses below Medium MA
Classic bearish reversal or trend continuation signal
Most reliable when accompanied by RED cloud (strong momentum)
Signal Intelligence:
Anti-spam filter - Minimum 5 bars between signals prevents noise
Clean labels - Placed precisely at crossover points
Alert-ready - Built-in ALERTS for automated trading systems
No repainting - Signals based on confirmed bars only
Signal Quality Assessment:
High-Quality Entry:
Golden Cross + GREEN cloud + Price above both MAs
= Strong bullish setup ✓
Low-Quality Entry (skip or wait):
Golden Cross + ORANGE cloud + Choppy price action
= Weak bullish setup, likely whipsaw ✗
═══════════════════════════════════════════════
REAL-TIME INFO PANEL
═══════════════════════════════════════════════
An at-a-glance dashboard showing:
Trend Strength Indicator:
Visual display of current momentum state
Color-coded header matching cloud color
Instant recognition of market bias
MA Distance Table:
Shows percentage distance of price from each enabled MA:
Green rows : Price ABOVE MA (bullish)
Red rows : Price BELOW MA (bearish)
Gray rows : Price AT MA (rare, decision point)
Distance Interpretation:
+2% to +5%: Healthy uptrend
+5% to +10%: Getting extended, caution
+10%+: Overextended, expect pullback
-2% to -5%: Testing support
-5% to -10%: Oversold zone
-10%+: Deep correction or downtrend
Customization:
4 corner positions
5 font sizes (Tiny to Huge)
Toggle visibility on/off
═══════════════════════════════════════════════
HOW TO USE - PRACTICAL TRADING GUIDE
═══════════════════════════════════════════════
STRATEGY 1: Trend Following
Identify trend : Wait for GREEN (bullish) or RED (bearish) cloud
Enter on signal : Golden Cross in GREEN cloud = LONG, Death Cross in RED cloud = SHORT
Hold position : While cloud maintains color
Exit signals :
• Cloud turns ORANGE/BLUE = momentum weakening, tighten stops
• Opposite crossover = close position
• Cloud turns opposite color = full reversal
STRATEGY 2: Pullback Entries
Confirm trend : GREEN cloud established (bullish bias)
Wait for pullback : Price touches or crosses below Fast MA
Enter when : Price rebounds back above Fast MA with cloud still GREEN
Stop loss : Below Medium MA or recent swing low
Target : Previous high or when cloud weakens
STRATEGY 3: Momentum Confirmation
Your setup triggers : (e.g., chart pattern, support/resistance)
Check cloud color :
• GREEN = proceed with LONG
• RED = proceed with SHORT
• BLUE/ORANGE = skip or reduce size
Use gradient as confluence : Not as primary signal, but as momentum filter
Risk Management Tips:
Never enter against the cloud color (don't LONG in RED cloud)
Reduce position size during BLUE/ORANGE (transition periods)
Place stops beyond Medium MA for swing trades
Use Slow MA (200) as final trend filter - don't SHORT above it in uptrends
═══════════════════════════════════════════════
PERFORMANCE & OPTIMIZATION
═══════════════════════════════════════════════
Tested On:
Crypto: BTC, ETH, major altcoins
Stocks: SPY, AAPL, TSLA, QQQ
Forex: EUR/USD, GBP/USD, USD/JPY
Indices: S&P 500, NASDAQ, DJI
═══════════════════════════════════════════════
TRANSPARENCY & RELIABILITY
═══════════════════════════════════════════════
Educational Focus:
Detailed tooltips on every input
Clear documentation of methodology
Practical examples in descriptions
Teaches you why , not just what
Open Logic:
Momentum calculation: (Fast slope + Medium slope) / 2
Smoothing: 8-bar EMA to reduce noise
Thresholds: ±0.02% for strong momentum classification
Everything is transparent and explainable
═══════════════════════════════════════════════
COMPLETE FEATURE LIST
═══════════════════════════════════════════════
Visual Components:
26-layer exponential gradient cloud
3 customizable moving average lines
Golden Cross / Death Cross labels
Real-time info panel with trend strength
MA distance table
Calculation Features:
6 MA types (EMA, SMA, WMA, VWMA, RMA, HMA)
Momentum-based cloud coloring
Smoothed trend strength scoring
Conditional performance optimization
Customization Options:
All MA lengths adjustable
All colors customizable (when gradient disabled)
Panel position (4 corners)
Font sizes (5 options)
Toggle any feature on/off
Signal Features:
Anti-spam filter (configurable gap)
Clean, non-overlapping labels
Built-in alert conditions
No repainting guarantee
═══════════════════════════════════════════════
IMPORTANT DISCLAIMERS
═══════════════════════════════════════════════
This indicator is for educational and informational purposes only
Not financial advice - always do your own research
Past performance does not guarantee future results
Use proper risk management - never risk more than you can afford to lose
Test on paper/demo accounts before using with real money
Combine with other analysis methods - no single indicator is perfect
Works best in trending markets; less effective in choppy/sideways conditions
Signals may perform differently in different timeframes and market conditions
The indicator uses historical data for MA calculations - allow sufficient lookback period
═══════════════════════════════════════════════
CREDITS & TECHNICAL INFO
═══════════════════════════════════════════════
Version: 2.0
Release: October 2025
Special Thanks:
TradingView community for feedback and testing
Pine Script documentation for technical reference
═══════════════════════════════════════════════
SUPPORT & UPDATES
═══════════════════════════════════════════════
Found a bug? Comment below with:
Ticker symbol
Timeframe
Screenshot if possible
Steps to reproduce
Feature requests? I'm always looking to improve! Share your ideas in the comments.
Questions? Check the tooltips first (hover over any input) - most answers are there. If still stuck, ask in comments.
═══════════════════════════════════════════════
Happy Trading!
Remember: The best indicator is the one you understand and use consistently. Take time to learn how the cloud behaves in different market conditions. Practice on paper before going live. Trade smart, manage risk, and may the trends be with you! 🚀
HermesHERMES STRATEGY - TRADINGVIEW DESCRIPTION
OVERVIEW
Hermes is an adaptive trend-following strategy that uses dual ALMA (Arnaud Legoux Moving Average) filters to identify high-quality entry and exit points. It's designed for swing and position traders who want smooth, low-lag signals with minimal whipsaws.
Unlike traditional moving averages that operate on price, Hermes analyzes price returns (percentage changes) to create signals that work consistently across any asset class and price range.
HOW IT WORKS
DUAL ALMA SYSTEM
The strategy uses two ALMA lines applied to price returns:
• Fast ALMA (Blue Line): Short-term trend signal (default: 80 periods)
• Slow ALMA (Black Line): Long-term baseline trend (default: 250 periods)
ALMA is superior to simple or exponential moving averages because it provides:
• Smoother curves with less noise
• Significantly reduced lag
• Natural resistance to outliers and flash crashes
TRADING LOGIC
BUY SIGNAL:
• Fast ALMA crosses above Slow ALMA (bullish regime)
• Price makes new N-bar high (momentum confirmation)
• Optional: Price above 200 EMA (macro trend filter)
• Optional: ALMA lines sufficiently separated (strength filter)
SELL SIGNAL:
• Fast ALMA crosses below Slow ALMA (bearish regime)
• Optional: Price makes new N-bar low (momentum confirmation)
The strategy stays in position during the entire bullish regime, allowing you to ride trends for weeks or months.
VISUAL INDICATORS
LINES:
• Blue Line: Fast ALMA (short-term signal)
• Black Line: Slow ALMA (long-term baseline)
TRADE MARKERS:
• Green Triangle Up: Buy executed
• Red Triangle Down: Sell executed
• Orange "M": Buy blocked by momentum filter
• Purple "W": Buy blocked by weak crossover strength
KEY PARAMETERS
ALMA SETTINGS:
• Short Period (default: 30) - Fast signal responsiveness
• Long Period (default: 250) - Baseline stability
• ALMA Offset (default: 0.90) - Balance between lag and smoothness
• ALMA Sigma (default: 7.5) - Gaussian curve width
ENTRY/EXIT FILTERS:
• Buy Lookback (default: 7) - Bars for momentum confirmation (required)
• Sell Lookback (default: 0) - Exit momentum bars (0 = disabled for faster exits)
• Min Crossover Strength (default: 0.0) - Required ALMA separation (0 = disabled)
• Use Macro Filter (default: true) - Only enter above 200 EMA
BEST PRACTICES
RECOMMENDED ASSETS - Works well on:
• Cryptocurrencies (Bitcoin, Ethereum, etc.)
• Major indices (S&P 500, Nasdaq)
• Large-cap stocks
• Commodities (Gold, Oil)
RECOMMENDED TIMEFRAMES:
• Daily: Primary timeframe for swing trading
• 4-Hour: More active trading (increase trade frequency)
• Weekly: Long-term position trading
PARAMETER TUNING:
• More trades: Lower Short Period (60-80)
• Fewer trades: Raise Short Period (100-120)
• Faster exits: Set Sell Lookback = 0
• Safer entries: Enable Macro Filter (Use Macro Filter = true)
STRATEGY ADVANTAGES
1. Low Lag - ALMA provides faster signals than traditional moving averages
2. Smooth Signals - Minimal whipsaws compared to crossover strategies
3. Asset Agnostic - Same parameters work across different markets
4. Trend Capture - Stays positioned during entire bullish regimes
5. Risk Management - Multiple filters prevent poor entries
6. Visual Clarity - Easy to interpret regime and filter states
WHEN TO USE HERMES
BEST FOR:
• Trending markets (crypto bull runs, equity uptrends)
• Swing trading (hold days to weeks)
• Position trading (hold weeks to months)
• Clear trend identification
• Risk-managed exposure
NOT SUITABLE FOR:
• Ranging/sideways markets
• Scalping or day trading
• High-frequency trading
• Mean reversion strategies
RISK DISCLAIMER
This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper position sizing and risk management. Test thoroughly on historical data before live trading.
CREDITS
Inspired by Giovanni Santostasi's Power Law Volatility Indicator, generalized for universal application across all assets using adaptive ALMA filtering.
Strategy by Hermes Trading Systems
QUICK START
1. Add indicator to chart
2. Use on daily timeframe for best results
3. Look for green buy signals when blue line crosses above black line
4. Exit on red sell signals when blue line crosses below black line
5. Adjust parameters based on your trading style:
• Conservative: Enable Macro Filter, increase Buy Lookback to 10
• Aggressive: Disable Macro Filter, lower Short Period to 60
• Default settings work well for most assets
NWOG/NDOG + EHPDA🌐 ENGLISH DESCRIPTION
Hybrid NWOG/NDOG + EHPDA – Advanced Gaps & Event Horizon Indicator
(Enhanced with Real-Time Alerts and Info Table)
📊 Overview
This advanced indicator combines automatic detection of weekly gaps (NWOG) and daily gaps (NDOG) with the Event Horizon (EHPDA) concept, now featuring customizable alerts and a real-time info table for a more efficient trading experience. Designed for traders who operate based on institutional price structures, liquidity zones, and SMC/ICT confluences.
✨ Key Features
1. Gap Detection & Visualization
NWOG (New Week Opening Gap): Identifies and visualizes the gap between Friday’s close and Monday’s open.
NDOG (New Day Opening Gap): Detects daily gaps on intraday timeframes.
Enhanced visualization: Semi-transparent boxes, price levels (top, middle, bottom), and lines extended to the current bar.
Customizable labels: Display gap formation date and price levels (optional).
2. Event Horizon (EHPDA)
Automatically calculates the Event Horizon level between two non-overlapping gaps.
Dashed line marking the equilibrium zone between bullish and bearish gaps.
3. Advanced 5pm-6pm Mode
Special option to detect the Sunday-Monday gap using 4H bars.
4. Real-Time Alerts
New gaps (NWOG/NDOG): Immediate notification when a new gap forms.
Gap fill: Alert when price completely fills a gap.
Event Horizon active: Notification when the Event Horizon level is triggered.
5. Info Table
Real-time display: number of active gaps, Event Horizon status, time remaining until weekly/daily close.
Customizable: position, size, and style.
🎨 Customization
Configurable colors for bullish gaps, bearish gaps, and Event Horizon line.
Customizable price labels and date format.
📈 Use Cases
Reversal trading, price targets, liquidity zones, SMC/ICT confluences.
⚙️ Recommended Settings
Timeframes: Daily and intraday (15m, 1H, 4H, etc.).
NWOG: Enable on all timeframes.
NDOG: Enable only on intraday.
Max Gaps: 3-5 for clean charts, 10-15 for historical analysis.
📝 Important Notes
Works best on 24/5 markets (Forex, Crypto).
Gaps automatically close when filled.
Event Horizon only appears with at least 2 non-overlapping gaps.
Trend Pivot Retracements [TradeEasy]▶ OVERVIEW
Trend Pivot Retracements identifies market trend direction using a Donchian-style channel and dynamically highlights retracement zones during trending conditions. It calculates the percentage pullbacks from recent highs and lows, plots labeled zones with varying intensity, and visually connects key retracement pivots. The indicator also emphasizes price proximity to trend boundaries by dynamically adjusting the thickness of plotted trend bands.
▶ TREND DETECTION & BAND STRUCTURE
The indicator determines the current trend by checking for new 50-bar extremes:
Uptrend: If a new highest high is made, the trend is considered bullish.
Downtrend: If a new lowest low is made, the trend is considered bearish.
Uptrend Band: Plots the 50-bar lowest low as a trailing support level.
Downtrend Band: Plots the 50-bar highest high as a trailing resistance level.
Thickness Variation: The thickness of the band increases the further price moves from it, indicating overextension.
▶ RETRACEMENT LABELING SYSTEM
During a trend, the indicator monitors pivot points in the opposite direction to measure retracements:
Bullish Retracement:
Triggered when a pivot low forms during an uptrend.
Measures % pullback from the most recent swing high (searched up to 20 bars back).
Plots a bold horizontal line at the low and a dashed diagonal from the previous swing high.
Adds a “-%” label above the low; intensity is based on recent 50 pullbacks.
Bearish Retracement:
Triggered when a pivot high forms during a downtrend.
Measures % pullback from the previous swing low (up to 20 bars back).
Plots a bold horizontal line at the high and a dashed diagonal from the prior swing low.
Adds a “%” label below the high with gradient color based on the past 50 extremes.
▶ PIVOT CONNECTION LINES
Each retracement includes a visual connector:
A diagonal dashed line linking the swing extreme (20 bars back) to the retracement point.
This line visually traces the path of price retreat within the trend.
Helps traders understand where the retracement originated and how steep it was.
▶ TREND SWITCH SIGNALS
When trend direction changes:
A diamond marker is plotted on the new pivot confirming the trend shift.
Green diamonds signal new bullish trends at fresh lows.
Magenta diamonds signal new bearish trends at fresh highs.
▶ COLOR INTENSITY & CONTEXTUAL AWARENESS
To help interpret the magnitude of retracements:
The % labels are color-coded using a gradient scale that references the max of the last 50 pullbacks.
Stronger pullbacks result in deeper color intensity, signaling more significant corrections.
Trend bands also use standard deviation normalization to adjust line thickness based on how far price has moved from the band.
This creates a visual cue for potential exhaustion or volatility extremes.
▶ USAGE
Trend Pivot Retracements is a powerful tool for traders who want to:
Identify trend direction and contextual pullbacks within those trends.
Spot key retracement points that may serve as entry opportunities or reversal signals.
Use visual retracement angles to understand market pressure and trend maturity.
Read dynamic band thickness as an alert for price stretch, potential mean reversion, or breakout setups.
▶ CONCLUSION
Trend Pivot Retracements gives traders a clean, visually expressive way to monitor trending markets, while capturing and labeling meaningful retracements. With adaptive color intensity, diagonal connectors, and smart trend switching, it enhances situational awareness and provides immediate clarity on trend health and pullback strength.
Cyclical Phases of the Market🧭 Overview
“Cyclical Phases of the Market” automatically detects major market cycles by connecting swing lows and measuring the average number of bars between them.
Once it learns the rhythm of past cycles, it projects the next expected cycle (in time and price) using a dashed orange line and a forecast label.
In simple terms:
The indicator shows where the next potential low is statistically expected to occur, based on the timing and depth of previous cycles.
⚙️ Core Logic – Step by Step
1️⃣ Pivot Detection
The script uses the built-in ta.pivotlow() and ta.pivothigh() functions to find local turning points:
pivotLow marks a local swing low, defined by pivotLeft and pivotRight bars on each side.
Only confirmed lows are used to define the major cycle points.
Each new pivot low is stored in two arrays:
cycleLows → price level of the low
cycleBars → bar index where the low occurred
2️⃣ Cycle Identification and Drawing
Every time two consecutive swing lows are found, the indicator:
Calculates the number of bars between them (cycle length).
If that distance is greater than or equal to minCycleBars, it draws a teal line connecting the two lows — visually representing one complete cycle.
These teal lines form the historical cycle structure of the market.
3️⃣ Average Cycle Length
Once there are at least three completed cycles, the script calculates the average duration (mean number of bars between lows).
This value — avgCycleLength — represents the dominant periodicity or cycle rhythm of the market.
4️⃣ Forecasting the Next Cycle
When a valid average cycle length exists, the model projects the next expected cycle:
Time projection:
Adds avgCycleLength to the last cycle’s ending bar index to find where the next low should occur.
Price projection:
Estimates the vertical amplitude by taking the difference between the last two cycle lows (priceDiff).
Adds this same difference to the last low price to forecast the next probable low level.
The result is drawn as an orange dashed line extending into the future, representing the Next Expected Cycle.
5️⃣ Forecast Label
An orange label 🔮 appears at the projected future point showing:
Text:
🔮 Upcoming Cycle Forecast
Price:
The label marks the probable area and timing of the next cyclical low.
(Note: the date/time calculation currently multiplies bar count by 7 days, so it’s designed mainly for daily charts. On other timeframes, that conversion can be adapted.)
📊 How to Read It on the Chart
Visual Element Meaning Interpretation
Teal lines Completed historical cycles (low to low) Show actual periodic rhythm of the market
Orange dashed line Projection of the next expected cycle Anticipated path toward the next cyclical low
Orange label 🔮 Upcoming Cycle Forecast Displays expected price and bar location
Average cycle length Internal variable (bars between lows) Represents the dominant cycle period
📈 Interpretation
When teal segments show consistent spacing, the market is following a stable rhythm → cycles are predictable.
When cycle spacing shortens, the market is accelerating (volatility rising).
When it widens, the market is slowing down or entering accumulation.
The orange dashed line represents the next expected low zone:
If the market drops near this line → cyclical pattern confirmed.
If the market breaks well below → cycle amplitude has increased (trend weakening).
If the market rises above and delays → a new longer cycle may be forming.
🧠 Practical Use
Combine with oscillators (e.g., RSI or TSI) to confirm momentum alignment near projected lows.
Use in conjunction with volume to identify accumulation or exhaustion near the expected turning point.
Compare across timeframes: weekly cycles confirm long-term rhythm; daily cycles refine short-term entries.
⚡ Summary
Aspect Description
Purpose Detect and forecast recurring market cycles
Cycle basis Low-to-Low pivot analysis
Visuals Teal historical cycles + Orange forecast line
Forecast Next expected low (price and time)
Ideal timeframe Daily
Main outputs Average cycle length, next projected cycle, visual cycle map
Alpha Candles-Candlestick Pattern Recognition — Multi-Pattern DeCandlestick Pattern Recognition — Multi-Pattern Detector
Description:
This Pine Script intelligently scans price action to automatically detect and label multiple candlestick patterns directly on your TradingView chart. It’s designed for traders who want to combine price psychology and pattern-based setups into their technical analysis.
Using built-in and custom logic, the script identifies both bullish and bearish reversal & continuation patterns, dynamically marking them on the chart for quick visual recognition.
✨ Key Features
🔍 Pattern Detection: Automatically identifies major candlestick formations such as:
Bullish Reversal Patterns: Hammer, Morning Star, Bullish Engulfing, Piercing Line, Three White Soldiers
Bearish Reversal Patterns: Shooting Star, Evening Star, Bearish Engulfing, Dark Cloud Cover, Three Black Crows
Continuation Patterns: Rising Three, Falling Three, Marubozu, Doji, Spinning Top
🧠 Smart Filtering: Optionally filters signals based on trend direction, volume confirmation, or body-to-wick ratios for higher accuracy.
🕯️ Custom Labels: Each detected pattern is plotted with a clean, color-coded label (green for bullish, red for bearish).
⚙️ Adjustable Sensitivity: Fine-tune thresholds like wick size, body ratio, or lookback periods to adapt detection to your preferred timeframe or asset class.
📈 Multi-Timeframe Ready: Works seamlessly across intraday, daily, and weekly charts.
How It Works
The script measures the relative body and wick sizes of recent candles and compares them against pattern-specific ratios.
For example:
A Bullish Engulfing is confirmed when the latest candle’s body fully engulfs the previous candle’s body, following a downtrend.
A Hammer is identified when the lower wick is at least twice the body size, appearing after a price decline.
These detections are then plotted as visual markers on your chart, helping you instantly spot momentum shifts or trend exhaustion zones.
Use Case
Perfect for:
Traders using price action-based entries
Backtesting pattern-based strategies
Educators demonstrating candlestick psychology
Analysts combining pattern recognition with indicators (RSI, EMAs, etc.)
Crypto DanR 1.5📜 Crypto DanR 1.5 Evolution Trading Society
This is Pre-Configured (Plug & Play) just install and use as is ready to trade !
This indicator combines Smart Money Concepts (SMC), Liquidity Analysis, and Trend Filtering to provide traders with a high-quality tool for intraday and swing trading on assets like XRP/USDT.
✅ What This Script Does
Crypto DanR 1.5 integrates the following advanced features:
Break of Structure (BOS) & Change of Character (CHoCH):
Detects key shifts in market structure
Helps confirm trend direction and reversal points
Fair Value Gaps (FVG):
Displays unmitigated liquidity voids using a style inspired by LuxAlgo
Highlights potential retracement zones where smart money may re-enter
Equal Highs / Equal Lows (EQH/EQL):
Marks liquidity zones that institutions often target before reversals
Order Blocks (OB):
Identifies potential institutional demand/supply zones
Option to filter by wick, body, or mitigation logic
Fibonacci Volatility Bands (based on BigBeluga’s logic):
Detects potential price extremes using Fib extensions on volatility
10 Moving Averages in One (inspired by hiimannshu's script):
Supports 10 custom MAs (SMA, EMA, RMA, HMA, VWMA, etc.) with adjustable source and timeframe
Ideal for trend filtering or dynamic support/resistance
Vector Candles (TradersReality / PVSRA):
Color-coded candles showing real-time volume pressure and trend bias
Visual Trade Plan:
Optional overlay for entry, stop-loss, and take-profit planning
Displays risk-to-reward ratio and potential % gain/loss live
🧠 How It Works
The script uses a price-action-first approach, built around concepts from Smart Money Theory. CHoCH and BOS detect structural shifts, while FVGs and OBs help forecast likely reaction zones. The multiple moving averages act as a trend filter to avoid entering against momentum.
This combination allows traders to:
Enter on mitigations or breakouts
Set stops outside liquidity zones
Manage trades visually with dynamic risk/reward levels
📊 Best Use Cases
15m or 1h scalping (ideal)
Swing trading on 4h
Works well on crypto, FX, and indices
🙏 Credits
TradersReality for PVSRA logic via public library
LuxAlgo for FVG inspiration
hiimannshu for 10-in-1 MA logic
BigBeluga for Fibonacci Bands methodology
All reused logic is significantly modified and part of a broader framework.
📌 Notes
Script is open-source to promote transparency and collaboration
Please do not copy-paste and republish without adding meaningful improvements
Feedback and suggestions welcome!
Reversal Super ScalperUsing Grok I've combined several indicators to be used for scalping reversals. My goal is to make sure it alerts me when all of the below conditions have been met.
Indicators that were combined to make this
FluidTrades - SMC Lite indicator - by Pmgjiv
Money Flow Index MTF + Alerts - by DreamsDefined
WaveTrend Filtered Signals (LazyBear Style) - by Uncle_the_shooter
Q-Trend - by tarasenko_
This strategy is for scalping on the 5 minute timeframe.
This way I can set alerts when the price action is close to demand or support levels marked out by the FluidTrades - SMC Lite indicator, the Money Flow Index MTF + Alerts indicator shows oversold if i'm trying to enter a long position or overbought if I'm trying to enter a short position, and the WaveTrend Filtered Signals indicator pops up a buy/sell signal either on the same 5 min candle or two 5 min candles before the Q-Trend buy/sell signal pops up. Once all of these conditions are met, this is when I would enter into a position at the close of the trigger candle from Q-Trend.
Here is an example of how to use this strategy
BUY (LONG) SIGNAL CONDITIONS
Price action must fall back into a level of demand marked out by the FluidTrades indicator.
The candle wick may cross below the demand level, and the candle body may cross slightly below it, as long as the candle does not close below the demand zone.
If any candle closes below the demand level, the buy signal created by the Q-Trend indicator is canceled. The WaveTrend Filtered Signals indicator should generate an alert on the current 5 min candle that Q-trend is generating a buy signal or two 5 min candles before it.
Money Flow Index (MFI) Condition:
On the candle where the buy signal is triggered by the Q-Trend indicator, the MFI must be oversold, with the white line below the 40 level, inside the Red Zone.
When the above conditions are met, enter after the close of the BUY signal trigger candle.
For the short signal it is the opposite of these conditions.
Constant Auto Trendlines (Extended Right)📈 Constant Auto Trendlines (Extended Right)
This indicator automatically detects market structure by connecting swing highs and lows with permanent, forward-projecting trendlines.
Unlike standard trendline tools that stop at the last pivot, this version extends each trendline infinitely into the future — helping traders visualize where price may react next.
🔍 How It Works
The script identifies pivot highs and lows using user-defined left/right bar counts.
When a new lower high or higher low appears, the indicator draws a line between the two pivots and extends it forward using extend.right.
Each new confirmed trendline stays fixed, creating a historical map of structure that evolves naturally with market action.
Optional filters:
Min Slope – ignore nearly flat trendlines
Show Latest Only – focus on the most relevant trendline
Alerts – get notified when price crosses the most recent uptrend or downtrend line
🧩 Why It’s Useful
This tool helps traders:
Spot emerging trends early
Identify dynamic support/resistance diagonals
Avoid redrawing trendlines manually
Backtest structure breaks historically
⚙️ Inputs
Pivot Left / Right bars
Min slope threshold
Line color, width, and style
Show only latest line toggle
Alert options
Smooth Theil-SenI wanted to build a Theil-Sen estimator that could run on more than one bar and produce smoother output than the standard implementation. Theil-Sen regression is a non-parametric method that calculates the median slope between all pairs of points in your dataset, which makes it extremely robust to outliers. The problem is that median operations produce discrete jumps, especially when you're working with limited sample sizes. Every time the median shifts from one value to another, you get a step change in your regression line, which creates visual choppiness that can be distracting even though the underlying calculations are sound.
The solution I ended up going with was convolving a Gaussian kernel around the center of the sorted lists to get a more continuous median estimate. Instead of just picking the middle value or averaging the two middle values when you have an even sample size, the Gaussian kernel weights the values near the center more heavily and smoothly tapers off as you move away from the median position. This creates a weighted average that behaves like a median in terms of robustness but produces much smoother transitions as new data points arrive and the sorted list shifts.
There are variance tradeoffs with this approach since you're no longer using the pure median, but they're minimal in practice. The kernel weighting stays concentrated enough around the center that you retain most of the outlier resistance that makes Theil-Sen useful in the first place. What you gain is a regression line that updates smoothly instead of jumping discretely, which makes it easier to spot genuine trend changes versus just the statistical noise of median recalculation. The smoothness is particularly noticeable when you're running the estimator over longer lookback periods where the sorted list is large enough that small kernel adjustments have less impact on the overall center of mass.
The Gaussian kernel itself is a bell curve centered on the median position, with a standard deviation you can tune to control how much smoothing you want. Tighter kernels stay closer to the pure median behavior and give you more discrete steps. Wider kernels spread the weighting further from the center and produce smoother output at the cost of slightly reduced outlier resistance. The default settings strike a balance that keeps the estimator robust while removing most of the visual jitter.
Running Theil-Sen on multiple bars means calculating slopes between all pairs of points across your lookback window, sorting those slopes, and then applying the Gaussian kernel to find the weighted center of that sorted distribution. This is computationally more expensive than simple moving averages or even standard linear regression, but Pine Script handles it well enough for reasonable lookback lengths. The benefit is that you get a trend estimate that doesn't get thrown off by individual spikes or anomalies in your price data, which is valuable when working with noisy instruments or during volatile periods where traditional regression lines can swing wildly.
The implementation maintains sorted arrays for both the slope calculations and the final kernel weighting, which keeps everything organized and makes the Gaussian convolution straightforward. The kernel weights are precalculated based on the distance from the center position, then applied as multipliers to the sorted slope values before summing to get the final smoothed median slope. That slope gets combined with an intercept calculation to produce the regression line values you see plotted on the chart.
What this really demonstrates is that you can take classical statistical methods like Theil-Sen and adapt them with signal processing techniques like kernel convolution to get behavior that's more suited to real-time visualization. The pure mathematical definition of a median is discrete by nature, but financial charts benefit from smooth, continuous lines that make it easier to track changes over time. By introducing the Gaussian kernel weighting, you preserve the core robustness of the median-based approach while gaining the visual smoothness of methods that use weighted averages. Whether that smoothness is worth the minor variance tradeoff depends on your use case, but for most charting applications, the improved readability makes it a good compromise.