Ranging DetectionRange detection study v 0.1
Trying to find ranges on price charts. looking at H1 on EURUSD, the indicator will mark a line at the low and high of the last 10 candles, and mark the background grey if it detects a range - defined by how many candles since last high/low (default 3)
Chart patterns
EMA 9/21 Cross + Volume FilterThis indicator plots fast (9-period) and slow (21-period) EMAs and highlights bullish or bearish crossovers only when volume exceeds its 20-period average, filtering out low-participation whipsaws. It places “UP”/“DN” triangles on qualifying crosses and includes built-in alertcondition() triggers plus a single alert() call, so one “Any alert() function call” alert delivers real-time push, e-mail, or webhook notifications. Adjustable inputs: EMA lengths, volume-SMA length, and a toggle to show/hide signal labels. Ideal for trend-following scalps or swing entries on any timeframe and ticker.
Consolidation BoxesConsolidation Boxes — Indicator
Overview :
This indicator automatically detects and highlights periods of market consolidation, drawing shaded boxes around tight price ranges where the market is temporarily indecisive. It’s designed to help traders easily identify when price is moving sideways — a key phase that often precedes a breakout.
Key Features :
-Automatic Consolidation Detection: Recognizes when a series of candles close within a defined range and marks the area as a consolidation zone.
-Customizable Parameters: Set how many candles must consolidate before a box is drawn.
-Breakout Alerts: Notifies you when price breaks out above or below a consolidation box — a potential signal for trade entries.
-Clean Chart Management: Optional setting to automatically remove old zones when new consolidations form.
-Dynamic Box Extension: As long as price stays within the box, the zone will continue to extend until a breakout occurs.
Inputs :
- Minimum Consolidation Candles : Define how many candles must fit within a range to confirm a consolidation zone.
- Terminate Old Zones : Automatically delete the previous zone when a new one is formed (optional).
How to use :
1. Add the Indicator: Apply it to any chart — works across all timeframes and markets (e.g., crypto, stocks, forex).
2. Adjust Parameters: Choose how many candles must consolidate to form a valid box. Enable or disable zone termination to fit your preference.
3. Watch the Boxes: The indicator draws a shaded box once it detects a valid consolidation zone. The box will continue to extend as long as price stays within the range.
4. Look for Breakouts: When price breaks above or below the box, a breakout is confirmed and an alert (if enabled) will trigger — great for breakout trading strategies.
5. Use in Strategy: Combine with volume, momentum indicators, or price action to validate breakouts and filter false signals.
Ideal For :
Traders who want to visually identify consolidation areas and trade breakout setups with minimal manual analysis. Especially useful for scalpers, day traders, and swing traders looking to anticipate volatility after quiet periods.
Chaikin Momentum Scalper🎯 Overview
The Chaikin Momentum Scalper is a powerful trading strategy designed to identify momentum shifts in the market and ride the trend for maximum profits. This strategy is ideal for trading the USD/JPY currency pair on a 15-minute chart, making it perfect for high-frequency trading (HFT). Whether you’re starting with a small account of $1,000 or managing a larger portfolio, this strategy can scale to suit your needs.
________________________________________
🔑 How the Strategy Works
Here’s how the Chaikin Momentum Scalper identifies trade opportunities:
1️⃣ Momentum Detection
The core of this strategy is the Chaikin Oscillator, a tool that measures the flow of money into or out of a market. It helps us understand whether buyers (bulls) or sellers (bears) are in control.
• When the indicator crosses above zero, it signals that buying momentum is picking up – a buying opportunity.
• When the indicator crosses below zero, it signals that selling momentum is increasing – a selling opportunity.
2️⃣ Trend Confirmation
We don’t just jump into trades based on momentum alone. We also use a 200-period simple moving average (SMA) to confirm the overall trend.
• If the price is above the SMA, it confirms an uptrend, so we look for buy trades.
• If the price is below the SMA, it confirms a downtrend, so we look for sell trades.
This way, we align our trades with the broader market direction for higher success rates.
3️⃣ Volatility & Risk Management
We use a tool called the Average True Range (ATR) to measure market volatility. This helps us:
• Set a stop-loss (where we’ll exit the trade if the market moves against us) at a safe distance from our entry point.
• Set a take-profit (where we’ll lock in profits) at a target that’s larger than the stop-loss, ensuring a good reward-to-risk ratio.
This approach adapts to the market’s behavior, tightening stops in calmer conditions and widening them when volatility increases.
________________________________________
📈 Why This Strategy Works
✅ It combines momentum and trend-following principles, increasing the chances of trading in the right direction.
✅ It dynamically adjusts risk levels based on market volatility, keeping losses small and profits big.
✅ It’s scalable – perfect for both small accounts (like $1,000) and larger, corporate-sized portfolios.
✅ It has been deep-backtested on USD/JPY 15-minute charts, proving its consistency across different market conditions.
________________________________________
📝 Important Notes
📌 This strategy is best used for USD/JPY on a 15-minute chart, making it great for high-frequency trading while you continue to build and refine your trading system.
📌 It’s designed to work on both small ($1,000+) and large accounts, so it can grow with you as your capital increases.
📌 While it has passed deep backtesting on this pair and timeframe, remember that no strategy is perfect. It’s crucial to test it yourself, start with a demo account, and apply proper risk management before trading real money.
🌟 Final Thoughts
The Chaikin Momentum Scalper is a solid, adaptable trading approach combining momentum, trend direction, and volatility awareness. If you’re looking for a strategy to kick-start your trading journey—or to add to your existing system—it offers a strong foundation.
cd_respect2_EQ_Cx🔹 Overview:
Many traders form a bias or look for trade setups by analyzing the high (H) and low (L) of previous higher timeframe candles. For example: a close above the previous daily high, a failure to close after breaking the high, or approaching the level without making a new high. As we’ve been taught to focus on these key levels, I wanted to draw attention to what's happening at the mid-levels (Equilibrium) of the current and higher timeframe candles.
We’ve all heard the phrase “Strong price reacts from equilibrium,” yet most of us wait at the extremes.
While working on equilibrium levels of both higher timeframes and the current timeframe, I noticed that when a current candle closes above/below the previous HTF candle's high/low, price often respects the part of the candle that caused the break — which I refer to as the Last Block. When respected, price tends to continue with momentum; when lost, a pullback or reversal often follows.
________________________________________
🔹 About the Indicator:
This tool analyzes four different higher timeframes and shows:
• Current candle equilibrium levels
• Previous candle equilibrium levels (2 display options):
1. On Box – classic display
2. On Candle – equilibrium is linked to the last candle that includes the level, making those candles more meaningful or "strengthened"
• Alerts (standard) and on-screen warnings when price approaches previous equilibrium levels
• High/Low levels of previous HTF candles
• High/Low levels of live HTF candles
• Last Block: the upper or lower part of the candle that caused the breakout when price closes above/below the previous HTF high/low
• Countdown timer until the close of selected HTFs
________________________________________
🔹 Menus & Usage:
🔸 Show/Hide Tab:
• Toggle Previous Equilibrium display (On Candle / On Box)
• Toggle Live Equilibrium levels, color selection, and left extension
• Toggle Current Candle Equilibrium and colors
• Alert on Chart: flashing on-screen visual alert
• Approach Limit: sets how close price must be to trigger alert
• Remaining Time (RT): toggle countdown display for selected timeframes
________________________________________
🔸 HTF H/L Levels Tab:
• Show previous and live HTF candle highs/lows
• Customize colors, starting points, and left extension options
________________________________________
🔸 Timeframes & Options Tab:
• Select which timeframes to display
• Choose level colors
• Enable price alerts
• Control visibility in the time chart
• Toggle Last Block display (close-to-high/low)
________________________________________
🔸 Look Back HTF Candles Tab:
• Delete filled levels: removes invalidated zones; only unmitigated remain
• Back Control: set how many candles to look back per timeframe (unlimited if not set)
________________________________________
🔸 HTF Boxes Tab:
• Display HTF candles in boxes
• Set colors (single color or per timeframe)
• Adjust font sizes across the chart
________________________________________
🔹 Usage & Last Blocks:
The core idea behind both equilibrium levels and last blocks is:
Price should “gain” and respect them to validate continuation.
Viewing multiple timeframes together strengthens bias.
Each level is treated as part of the candle it's associated with — defining the “area to be gained.”
“Did price respect the level because of that candle, or did the candle gain significance because it aligned with the level? That’s open for debate.”
(In my opinion, the candle gains significance because it aligns with the level.)
When respected, these levels/blocks act as support; when lost, they act as resistance.
In suitable timeframes, reclaiming previous equilibrium levels may be interpreted as CHoCH / CISD / IDM depending on the context.
________________________________________
🔹 Usage Example – Last Blocks:
I personally trade on 1-minute and use Daily / H4 / H1 / 15m as selected timeframes.
For example, if price reclaims the previous 15m level, I view it as a Change of Character. I then expect the next candle to show respect in that direction.
Choose timeframes based on your trading style.
Sometimes, HTF levels (past and live) cluster tightly — these areas are key watch zones for me.
That’s the reason I decided to share this indicator.
________________________________________
🔹 Chart Examples:
🔸 Example 1:
Price closes above both the 12:45 15m candle and the 12:00 H1 equilibrium levels.
Last Block forms. After retracing, price mitigates the block and respects live equilibrium levels (H4/H1/15m).
🔸 Example 2:
Explained on chart – Levels that pushed price down in the bearish trend later acted as support.
🔸 Example 3 – CHoCH/CISD/IDM Alternative:
Explained on chart – Replacing structural signals with equilibrium levels.
I see this pattern often — very effective.
🔸 Example 4:
Many levels are clustered in a narrow range; price shows respect across the board.
________________________________________
🔹 Final Note:
Hope you like the tool. I’d love to hear your thoughts and suggestions.
"Keep in mind, strong price reverses from equilibrium."
Happy trading!
Lorentzian Classification - Advanced Trading DashboardLorentzian Classification - Relativistic Market Analysis
A Journey from Theory to Trading Reality
What began as fascination with Einstein's relativity and Lorentzian geometry has evolved into a practical trading tool that bridges theoretical physics and market dynamics. This indicator represents months of wrestling with complex mathematical concepts, debugging intricate algorithms, and transforming abstract theory into actionable trading signals.
The Theoretical Foundation
Lorentzian Distance in Market Space
Traditional Euclidean distance treats all feature differences equally, but markets don't behave uniformly. Lorentzian distance, borrowed from spacetime geometry, provides a more nuanced similarity measure:
d(x,y) = Σ ln(1 + |xi - yi|)
This logarithmic formulation naturally handles:
Scale invariance: Large price moves don't overwhelm small but significant patterns
Outlier robustness: Extreme values are dampened rather than dominating
Non-linear relationships: Captures market behavior better than linear metrics
K-Nearest Neighbors with Relativistic Weighting
The algorithm searches historical market states for patterns similar to current conditions. Each neighbor receives weight inversely proportional to its Lorentzian distance:
w = 1 / (1 + distance)
This creates a "gravitational" effect where closer patterns have stronger influence on predictions.
The Implementation Challenge
Creating meaningful market features required extensive experimentation:
Price Features: Multi-timeframe momentum (1, 2, 3, 5, 8 bar lookbacks) Volume Features: Relative volume analysis against 20-period average
Volatility Features: ATR and Bollinger Band width normalization Momentum Features: RSI deviation from neutral and MACD/price ratio
Each feature undergoes min-max normalization to ensure equal weighting in distance calculations.
The Prediction Mechanism
For each current market state:
Feature Vector Construction: 12-dimensional representation of market conditions
Historical Search: Scan lookback period for similar patterns using Lorentzian distance
Neighbor Selection: Identify K nearest historical matches
Outcome Analysis: Examine what happened N bars after each match
Weighted Prediction: Combine outcomes using distance-based weights
Confidence Calculation: Measure agreement between neighbors
Technical Hurdles Overcome
Array Management: Complex indexing to prevent look-ahead bias
Distance Calculations: Optimizing nested loops for performance
Memory Constraints: Balancing lookback depth with computational limits
Signal Filtering: Preventing clustering of identical signals
Advanced Dashboard System
Main Control Panel
The primary dashboard provides real-time market intelligence:
Signal Status: Current prediction with confidence percentage
Neighbor Analysis: How many historical patterns match current conditions
Market Regime: Trend strength, volatility, and volume analysis
Temporal Context: Real-time updates with timestamp
Performance Analytics
Comprehensive tracking system monitors:
Win Rate: Percentage of successful predictions
Signal Count: Total predictions generated
Streak Analysis: Current winning/losing sequence
Drawdown Monitoring: Maximum equity decline
Sharpe Approximation: Risk-adjusted performance estimate
Risk Assessment Panel
Multi-dimensional risk analysis:
RSI Positioning: Overbought/oversold conditions
ATR Percentage: Current volatility relative to price
Bollinger Position: Price location within volatility bands
MACD Alignment: Momentum confirmation
Confidence Heatmap
Visual representation of prediction reliability:
Historical Confidence: Last 10 periods of prediction certainty
Strength Analysis: Magnitude of prediction values over time
Pattern Recognition: Color-coded confidence levels for quick assessment
Input Parameters Deep Dive
Core Algorithm Settings
K Nearest Neighbors (1-20): More neighbors create smoother but less responsive signals. Optimal range 5-8 for most markets.
Historical Lookback (50-500): Deeper history improves pattern recognition but reduces adaptability. 100-200 bars optimal for most timeframes.
Feature Window (5-30): Longer windows capture more context but reduce sensitivity. Match to your trading timeframe.
Feature Selection
Price Changes: Essential for momentum and reversal detection Volume Profile: Critical for institutional activity recognition Volatility Measures: Key for regime change detection Momentum Indicators: Vital for trend confirmation
Signal Generation
Prediction Horizon (1-20): How far ahead to predict. Shorter horizons for scalping, longer for swing trading.
Signal Threshold (0.5-0.9): Confidence required for signal generation. Higher values reduce false signals but may miss opportunities.
Smoothing (1-10): EMA applied to raw predictions. More smoothing reduces noise but increases lag.
Visual Design Philosophy
Color Themes
Professional: Corporate blue/red for institutional environments Neon: Cyberpunk cyan/magenta for modern aesthetics
Matrix: Green/red hacker-inspired palette Classic: Traditional trading colors
Information Hierarchy
The dashboard system prioritizes information by importance:
Primary Signals: Largest, most prominent display
Confidence Metrics: Secondary but clearly visible
Supporting Data: Detailed but unobtrusive
Historical Context: Available but not distracting
Trading Applications
Signal Interpretation
Long Signals: Prediction > threshold with high confidence
Look for volume confirmation
- Check trend alignment
- Verify support levels
Short Signals: Prediction < -threshold with high confidence
Confirm with resistance levels
- Check for distribution patterns
- Verify momentum divergence
- Market Regime Adaptation
Trending Markets: Higher confidence in directional signals
Ranging Markets: Focus on reversal signals at extremes
Volatile Markets: Require higher confidence thresholds
Low Volume: Reduce position sizes, increase caution
Risk Management Integration
Confidence-Based Sizing: Larger positions for higher confidence signals
Regime-Aware Stops: Wider stops in volatile regimes
Multi-Timeframe Confirmation: Align signals across timeframes
Volume Confirmation: Require volume support for major signals
Originality and Innovation
This indicator represents genuine innovation in several areas:
Mathematical Approach
First application of Lorentzian geometry to market pattern recognition. Unlike Euclidean-based systems, this naturally handles market non-linearities.
Feature Engineering
Sophisticated multi-dimensional feature space combining price, volume, volatility, and momentum in normalized form.
Visualization System
Professional-grade dashboard system providing comprehensive market intelligence in intuitive format.
Performance Tracking
Real-time performance analytics typically found only in institutional trading systems.
Development Journey
Creating this indicator involved overcoming numerous technical challenges:
Mathematical Complexity: Translating theoretical concepts into practical code
Performance Optimization: Balancing accuracy with computational efficiency
User Interface Design: Making complex data accessible and actionable
Signal Quality: Filtering noise while maintaining responsiveness
The result is a tool that brings institutional-grade analytics to individual traders while maintaining the theoretical rigor of its mathematical foundation.
Best Practices
- Parameter Optimization
- Start with default settings and adjust based on:
Market Characteristics: Volatile vs. stable
Trading Timeframe: Scalping vs. swing trading
Risk Tolerance: Conservative vs. aggressive
Signal Confirmation
Never trade on Lorentzian signals alone:
Price Action: Confirm with support/resistance
Volume: Verify with volume analysis
Multiple Timeframes: Check higher timeframe alignment
Market Context: Consider overall market conditions
Risk Management
Position Sizing: Scale with confidence levels
Stop Losses: Adapt to market volatility
Profit Targets: Based on historical performance
Maximum Risk: Never exceed 2-3% per trade
Disclaimer
This indicator is for educational and research purposes only. It does not constitute financial advice or guarantee profitable trading results. The Lorentzian classification system reveals market patterns but cannot predict future price movements with certainty. Always use proper risk management, conduct your own analysis, and never risk more than you can afford to lose.
Market dynamics are inherently uncertain, and past performance does not guarantee future results. This tool should be used as part of a comprehensive trading strategy, not as a standalone solution.
Bringing the elegance of relativistic geometry to market analysis through sophisticated pattern recognition and intuitive visualization.
Thank you for sharing the idea. You're more than a follower, you're a leader!
@vasanthgautham1221
Trade with precision. Trade with insight.
— Dskyz , for DAFE Trading Systems
ES OHLC BASED ON 9:301. RTH Price Levels
YC (Yesterday's Close): Previous day's RTH closing price at 4:00 PM ET
0DTE-O (Today's Open): Current day's RTH opening price at 9:30 AM ET
T-E-M (Today's Europe-Asia Midpoint): Midpoint of overnight session high/low
T-E-R (Today's Europe-Asia Resistance): Overnight session high
T-E-S (Today's Europe-Asia Support): Overnight session low
Y-T-M (Yesterday-Today Midpoint): Midpoint between YC and 0DTE-O
2. Previous Bar Percentage Levels
Displays 50% retracement level for all bars
Shows 70% level for bullish bars (close > open)
Shows 30% level for bearish bars (close < open)
Lines automatically update with each new bar
3. Custom Support/Resistance Lines
Up to 4 customizable horizontal levels (2 resistance, 2 support)
Useful for marking key psychological levels or pivot points
4. VIX-Based Options Strategy Suggestions
Real-time VIX value display
Time Zone Handling
The indicator is configured for Central Time (CT) as Pine Script's default:
RTH Open: 8:30 AM CT (9:30 AM ET)
RTH Close: 3:00 PM CT (4:00 PM ET)
Overnight session: 7:00 PM CT to 8:30 AM CT next day
Usage Notes
Chart Requirement: This indicator only works on 5-minute timeframe charts
Auto-refresh: All lines and labels automatically refresh at each new trading day's RTH open
24-hour Market: Designed for ES futures which trade nearly 24 hours
Visual Clarity: Different line styles and colors for easy identification
Ideal For
Day traders focusing on ES futures
0DTE options traders needing key reference levels
Traders using overnight gaps and previous day's levels
Those incorporating VIX-based strategies in their trading
Inside 4+ Candles Box (Entry + Target + SMA Stop Logic)🔍 What This Script Does
This indicator detects price compression areas using 4 or more consecutive inside candles, then draws a breakout box to visually highlight the range.
Once price closes above the box, a long entry marker is plotted, along with:
🎯 Target line at 1x box size above the breakout.
❌ Stop-loss at the box low or at a dynamic SMA-based level if the box is too large.
🧠 Why It’s Unique
This script combines inside bar compression, breakout logic, risk control, and visual clarity — all in one tool.
It also cancels the setup entirely if price closes below the box low before breakout, avoiding late or false entries.
⚙️ Customizable Settings
Minimum inside candles (default = 4)
SMA length (used as stop if box is large)
Box size % threshold to activate smart stop
Entry, Target, and Stop marker colors
📌 Notes
For long setups only (no short signals).
Use on any asset or timeframe (ideal on 4H/1D).
This is not financial advice. Use with proper risk management.
Backtest thoroughly before live use.
Built with ❤️ by using Pine Script v6.
🇸🇦 وصف مختصر باللغة العربية:
هذا المؤشر يكتشف مناطق تماسك السعر من خلال 4 شموع داخلية أو أكثر، ثم يرسم مربعًا يحدد منطقة الاختراق المحتملة.
عند الإغلاق أعلى المربع، يتم عرض إشارة دخول وسطر هدف بنسبة 100% من حجم المربع.
كما يتم احتساب وقف الخسارة تلقائيًا إما عند قاع المربع أو عند متوسط متحرك ذكي (SMA) إذا كان حجم المربع كبيرًا.
الميزة الإضافية: إذا تم كسر قاع المربع قبل الاختراق، يتم إلغاء الصفقة تلقائيًا لتجنب الدخول المتأخر.
🧪 للاستفادة التعليمية والتحليل فقط. لا يُعتبر توصية مالية.
Failure Swing IndicatorIdentify Failure Swing nice and easy
J. Welles Wilder Jr. describes Failure Swings as specific chart patterns used in conjunction with the Relative Strength Index (RSI) to identify potential reversals in price trends.
These patterns signal weakening momentum and can indicate a shift in market direction
Wilder emphasized that these patterns are more reliable when confirmed by price action or other technical indicators.
EMA Pullback Indicator with Volume Confirmationvolume analysis that follows momentum and only enters on pullbacks. Exit at end of next candle
ORB 5M + VWAP + Braid Filter + TP 2R o Niveles PreviosORB 5-Minute Breakout Strategy Summary
Strategy Name:
ORB 5M + VWAP + Braid Filter + TP 2R or Previous Levels
Timeframe:
5-minute chart
Trading Window:
9:35 AM to 11:00 AM (New York time)
✅ Entry Conditions:
Opening Range: Defined from 9:30 to 9:35 AM (first 5-minute candle).
Breakout Entry:
Long trade: Price breaks above the opening range high.
Short trade: Price breaks below the opening range low.
Confirmation Filters (All must be met):
Strong candle (green for long, red for short).
VWAP in the direction of the trade.
Braid Filter by Mango2Juice supports the breakout direction (green for long, red for short).
📉 Stop Loss:
Placed at the opposite side of the opening range.
🎯 Take Profit (TP):
+2R (Risk-to-Reward Ratio of 2:1),
or
Closest of the following: previous day’s high/low or premarket levels.
⚙️ Additional Rules:
Only valid signals between 9:35 and 11:00 AM.
Only one trade per breakout direction per day.
Filter out "trap candles" (very small or indecisive candles).
Avoid trading after 11:00 AM.
📊 Performance Goals:
Maintain a high Profit Factor (above 3 ideally).
Focus on tickers with good historical performance under this strategy (e.g., AMZN, PLTR, CVNA).
FVG (Nephew sam remake)Hello i am making my own FVG script inspired by Nephew Sam as his fvg code is not open source. My goal is to replicate his Script and then add in alerts and more functions. Thus, i spent few days trying to code. There is bugs such as lower time frame not showing higher time frame FVG.
This script automatically detects and visualizes Fair Value Gaps (FVGs) — imbalances between demand and supply — across multiple timeframes (15-minute, 1-hour, and 4-hour).
15m chart shows:
15m FVGs (green/red boxes)
1H FVGs (lime/maroon)
4H FVGs (faded green/red with borders) (Bugged For now i only see 1H appearing)
1H chart shows:
1H FVGs
4H FVGs
4H chart shows:
4H FVGs only
There is the function to auto close FVG when a future candle fully disrespected it.
You're welcome to:
🔧 Customize the appearance: adjust box colors, transparency, border style
🧪 Add alerts: e.g., when price enters or fills a gap
📅 Expand to Daily/Weekly: just copy the logic and plug in "D" or "W" as new layers
📈 Build confluence logic: combine this with order blocks, liquidity zones, or ICT concepts
🧠 Experiment with entry signals: e.g., candle confirmation on return to FVG
🚀 Improve performance: if you find a lighter way to track gaps, feel free to optimize!
Dual Bollinger BandsIndicator Name:
Double Bollinger Bands (2-9 & 2-20)
Description:
This indicator plots two sets of Bollinger Bands on a single chart for enhanced volatility and trend analysis:
Fast Bands (2-9 Length) – Voilet
More responsive to short-term price movements.
Useful for spotting quick reversals or scalping opportunities.
Slow Bands (2-20 Length) – Black
Smoother, trend-following bands for longer-term context.
Helps confirm broader market direction.
Both bands use the standard settings (2 deviations, SMA basis) for consistency. The transparent fills improve visual clarity while keeping the chart uncluttered.
Use Cases:
Trend Confirmation: When both bands expand together, it signals strong momentum.
Squeeze Alerts: A tight overlap suggests low volatility before potential breakouts.
Multi-Timeframe Analysis: Compare short-term vs. long-term volatility in one view.
How to Adjust:
Modify lengths (2-9 and 2-20) in the settings.
Change colors or transparency as needed.
Why Use This Script?
No Repainting – Uses standard Pine Script functions for reliability.
Customizable – Easy to tweak for different trading styles.
Clear Visuals – Color-coded bands with background fills for better readability.
Ideal For:
Swing traders, day traders, and volatility scalpers.
Combining short-term and long-term Bollinger Band strategies.
Beta Tracker [theUltimator5]This script calculates the Pearson correlation coefficient between the charted symbol and a dynamic composite of up to four other user-defined tickers. The goal is to track how closely the current asset’s normalized price behavior aligns with, or diverges from, the selected group (or basket)
How can this indicator be valuable?
You can compare the correlation of your current symbol against a basket of other tickers to see if it is moving independently, or being pulled with the basket.... or is it moving against the basket.
It can be used to help identify 'swap' baskets of stocks or other tickers that tend to generally move together and visually show when your current ticker diverges from the basket.
It can be used to track beta (or negative beta) with the market or with a specific ticker.
This is best used as a supplement to other trading signals to give a more complete picture of the external forces potentially pulling or pushing the price action of the ticker.
🛠️ How It Works
The current symbol and each selected comparison ticker are normalized over a custom lookback window, allowing fair pattern-based comparison regardless of price scale.
The normalized values from 1 to 4 selected tickers are averaged into a composite, which represents the group’s collective movement.
A Pearson correlation coefficient is computed over a separate correlation lookback period, measuring the relationship between the current asset and the composite.
The result is plotted as a dynamic line, with color gradients:
Blue = strongly correlated (near +1)
Orange = strongly inverse correlation (near –1)
Intermediate values fade proportionally
A highlighted background appears when the correlation drops below a user-defined threshold (e.g. –0.7), helping identify strong negative beta periods visually.
A toggleable info table displays which tickers are currently being compared, along with customizable screen positioning.
⚙️ User Inputs
Ticker 1–4: Symbols to compare the current asset against (blank = ignored)
Normalization Lookback: Period to normalize each series
Correlation Lookback: Period over which correlation is calculated
Negative Correlation Highlight: Toggle for background alert and threshold level
Comparison Table: Toggle and position controls for an on-screen summary of selected tickers
imgur.com
⚠️ Notes
The script uses request.security() to pull data from external symbols; these must be available for the selected chart timeframe.
A minimum of one valid ticker must be provided for the script to calculate a composite and render correlation.
15-Min ORB Strategy with TP/SL
🔧 How It Works
Opening Range Defined
At market open, it tracks the first 15-minute candle.
The high and low of that candle form the Opening Range.
Breakout Detection
A Buy Signal is triggered when price closes above the ORB high (with confirmation).
A Sell Signal is triggered when price closes below the ORB low.
Trade Management
On a confirmed breakout, the script:
Records the entry price.
Calculates Take Profit (TP) and Stop Loss (SL) using user-defined multipliers of the ORB range.
Positions are exited when either TP or SL is hit.
State Tracking
It tracks whether you're in a trade and whether it’s a long or short.
Once exited, the trade resets and waits for a new signal the next session.
📌 Visual Elements
Green line: ORB High
Red line: ORB Low
Blue line: Active Take Profit (if in trade)
Orange line: Active Stop Loss (if in trade)
Buy/Sell Labels: Signal markers below/above candles for clear entry visibility
⚙️ Customizable Inputs
Take Profit Multiplier (default 1.5× ORB range)
Stop Loss Multiplier (default 1.0× ORB range)
Session Start/End time for ORB definition
✅ Ideal For:
Traders who want clean, rule-based signals with no indicators
Quick intraday setups using price action only
Adaptation to almost any liquid market (just adjust session times)
Sniper SweepsPurpose
Detect when price sweeps above recent highs (buy-side liquidity) or below recent lows (sell-side liquidity), but closes back inside the range. This is often interpreted as a stop-hunt or liquidity grab by institutional traders.
Core Concepts
Liquidity Sweep: When price briefly breaks a recent swing high/low (potentially triggering stop losses), but then closes back within the previous range.
Buy-side Sweep: Price breaks a previous high, but closes below it.
Sell-side Sweep: Price breaks a previous low, but closes above it.
Summary
This indicator is useful for:
Identifying potential stop-hunts or liquidity grabs.
Recognizing SMC trade setups around swept highs/lows.
Getting alerted when significant liquidity levels are manipulated.
9 EMA 75% HA Crossover + EMA ReversalThis script identifies potential trend reversal points using Heikin-Ashi candles and the 9-period Exponential Moving Average (EMA). A signal is generated only when:
The 9 EMA reverses direction after a consistent trend (up or down).
The EMA crosses into at least 75% of the Heikin-Ashi candle body.
The highlighted candle must align with the reversal:
Green candle for bullish reversal
Red candle for bearish reversal
This setup helps filter out weak signals by combining price structure, trend behavior, and candle color confirmation.
Smash + Proba + BFThis script is designed to automatically display various levels that can be useful for trading.
These levels must be entered in the script as parameters in the form of lists separated by semicolons (";").
There are three groups of levels:
Smash: Levels provided in the Smashelito newsletter
Proba: Probability levels (50% and 70%) of reaching certain price points, calculated using options data
BF: Option-related levels provided by Krechendo Connect / BlackFlag
Example :
Double Top/Bottom DetectorDouble Top/Bottom Detector Indicator Description
Overview
The Double Top/Bottom Detector is a technical analysis tool designed to automatically identify and label potential double top and double bottom patterns on price charts. By combining pivot point detection with configurable height tolerance and pullback depth criteria, this indicator helps traders visually spot possible trend reversal zones without manual drawing or guesswork.
Key Features
• Pivot Point Identification
The indicator uses a symmetric window approach to find true highs and lows. A pivot high is confirmed only when a bar’s high exceeds the highs of a specified number of bars both before and after it. Likewise, a pivot low is established when a bar’s low is the lowest in its surrounding window.
• Double Top and Double Bottom Detection
– Height Tolerance: Ensures that the two pivot points forming the pattern are within a user-defined percentage of each other.
– Pullback Depth: Measures the drop (for a double top) or the rise (for a double bottom) between the two pivot points and confirms that it meets a minimum percentage threshold.
• Automatic Drawing and Labeling
When a valid double top is detected, a red line connects the two pivot highs and a “Double Top” label is centered above the line. For a double bottom, a green line connects the two pivot lows and a “Double Bottom” label appears below the midpoint.
• Pivot Visualization for Debugging
Small red and green triangles mark every detected pivot high and pivot low on the chart, making it easy to verify and fine-tune settings.
Parameters
Height Tolerance (%) – The maximum allowable percentage difference between the two pivot heights (default 2.0).
Pullback Minimum (%) – The minimum required percentage pullback (for tops) or rebound (for bottoms) between the two pivots (default 5.0).
Pivot Lookback – The number of bars to look back and forward for validating pivot points (default 5).
Window Length – The number of bars over which to compute pullback extrema, equal to twice the pivot lookback plus one (default derived from pivot lookback).
Usage Instructions
1. Copy the Pine Script code into TradingView’s editor and select version 6.
2. Adjust the parameters based on the asset’s volatility and timeframe. A larger lookback window yields fewer but more reliable pivots; tighter height tolerance produces more precise pattern matches.
3. Observe the chart for red and green triangles marking pivot highs and lows. When two qualifying pivots occur, the indicator draws a connecting line and displays a descriptive label.
4. To extend the number of visible historical lines and labels, increase the max\_lines\_count and max\_labels\_count settings in the indicator declaration.
Customization Ideas
• Add volume or moving average filters to reduce false signals.
• Encapsulate pivot logic into reusable functions for cleaner code.
• Incorporate alert conditions to receive notifications when new double top or bottom patterns form.
This indicator is well suited for medium- to long-term analysis and can be combined with risk management rules to enhance decision making.
Rollover Candles 23:00-00:00 UTC+1This indicator highlights the Forex Market Rollover candles during which the spreads get very high and some 'fake price action' occurs. By marking them orange you always know you are dealing with a rollover candle and these wicks/candles usually get taken out later on because there are no orders in these candles.
Optimal settings: The rollover takes only 1 hour, so put the visibility of the indicator on the 1 hour time frame and below (or just the 1h).
OHLC 0.5 @SplintsThis indicator provides a dynamic visualization of OHLC levels, allowing traders to analyze price action across multiple candles with enhanced clarity. It features customizable options for timeframe selection, candle count, and mid-level calculations (High/Low 50% and Open/Close 50%). The script utilizes gradient-based coloring for a clear distinction between levels and supports dynamic extension for better visibility.
Key Features:
Displays Open, High, Low, and Close levels with adjustable extension lengths
Supports mid-level calculations for enhanced trade decision-making
Gradient coloring for improved visual clarity across multiple candles
Configurable labels for quick reference to key price points
Efficient object management using arrays for optimized performance
Perfect for traders seeking structured insights into candle dynamics and session-based analysis.
Swing Highs and Lows Detector🔍 Swing Highs and Lows Detector
The Swing Highs and Lows Detector is a powerful tool for traders looking to identify meaningful structural shifts in price action, based on swing point logic and internal trend shifts.
📈 What It Does
This indicator automatically identifies and labels:
HH (Higher High) – Price broke above the previous swing high
LH (Lower High) – Price failed to break the previous high, signaling potential weakness
LL (Lower Low) – Price broke below the previous swing low
HL (Higher Low) – Price maintained a higher support level, indicating strength
The script distinguishes between bullish and bearish internal shifts and tracks the highest/lowest points between those shifts to determine the swing structure.
⚙️ How It Works
You can choose between two shift detection modes:
"Open": Compares closing price to the first open of the opposite streak
"High/Low": Uses the high of bearish or low of bullish candles
Once a shift is confirmed, the indicator scans the bars between shifts to find the most significant swing high or low
When a valid swing is detected, it’s labeled directly on the chart with color-coded markers
🛎️ Built-in Alerts
Set alerts for:
Higher High
Lower High
Lower Low
Higher Low
These alerts help you catch key structural shifts in real time — great for breakout traders, structure-based analysts, and smart money concepts (SMC) strategies.
✅ How to Use
Confirm Trend Strength or Reversals – Use HH/HL to confirm an uptrend, LL/LH to confirm a downtrend
Combine with Liquidity Sweeps or Zones – Ideal for SMC or Wyckoff-style setups
Entry/Exit Triggers – Use swing breaks to time entries or exits near key structural points
High Low Levels by JZCustom High Low Levels Indicator - features
Clearly plotted high and low levels for specific trading sessions. This indicator provides visual representations of key price levels during various trading periods. Below are the main features and benefits of this indicator:
1. Display high and low levels for each session
- previous day high/low: display the high and low from the previous day, giving you a better understanding of how the price moves compared to the prior day.
- asia, london, and custom sessions: track the high and low levels for the major trading sessions (asian and london) and two custom user-defined sessions.
2. Complete line and label customization
- custom line appearance: choose the color, line style (solid, dashed, dotted), and line thickness for each trading session. you can also decide if the lines should extend beyond the current price action.
- custom labels: define your own label texts for each custom session. this way, you can label the levels precisely and easily track price movements.
3. Define your own trading sessions
- add up to two custom sessions (custom and custom 2), which can be defined using precise start and end times (hour and minute).
- each custom session allows you to specify the label text for the high and low levels, enabling you to easily differentiate different parts of the day on the chart.
4. Clear and intuitive design
- grouped settings: all settings are grouped based on trading sessions, so you can easily customize every aspect of the visual representation.
- simple toggle on/off: you can easily enable or disable each line (previous day, asia, london, custom 1, custom 2). this allows you to keep your chart clean and focus only on the important levels you need at any moment.
5. Flexible time zones
- time zone settings: set the time zone (utc, europe/london, america/new_york, asia/tokyo) to properly align the timeframes for each level depending on the market you're focusing on.
6. Automatic cleanup of old lines and labels
- old levels removal: automatically remove old lines and labels to prevent clutter on your chart. this ensures that only current, relevant levels for each trading day or session are displayed.
7. Precise plotting and line extension
- accurate level markings: the indicator calculates the precise times when the high and low levels were reached and plots lines that visually represent these levels.
- line extension options: you have the option to extend the high/low lines beyond their point of calculation, which helps with identifying price action trends beyond the current period.
Dec 7, 2024
Release Notes
Changes and Improvements for Users:
1. Customizable Offset for Lines and Labels:
- A new input, `Line and Label Offset`, allows users to control how far the lines and their associated text labels extend. This ensures the labels and lines remain aligned and can be adjusted as needed.
2. Unified Offset Control:
- The same offset value is applied to all types of lines and labels (e.g., Previous Day High/Low, Asia High/Low, London High/Low, and custom sessions). Users can change this in one place to affect the entire script consistently.
3. Enhanced Flexibility:
- Users now have more control over the appearance and position of their lines and labels, making the indicator adaptable to different chart setups and personal preferences.
These updates aim to enhance user convenience and customization, ensuring a more tailored charting experience.