Pro Trading Signals - Trend + S/R + Risk// ============================================
// PROFESSIONAL TRADING STRATEGY NOTES
// ============================================
// === WHAT THIS STRATEGY DOES ===
// 1. TREND ANALYSIS: Uses multiple EMAs (9, 21, 50, 200) to identify trend direction
// 2. SUPPORT/RESISTANCE: Automatically detects key price levels
// 3. RISK MANAGEMENT: Calculates stop loss and take profit with 2:1+ R:R ratio
// 4. SIGNAL SCORING: Only trades high-quality setups (60/100+ score)
// 5. ENTRY TYPES: Pullbacks, support/resistance bounces, breakouts
// === KEY IMPROVEMENTS FROM BASIC SIGNALS ===
// ✓ Trend alignment required (no counter-trend trades)
// ✓ Support/resistance confirmation
// ✓ Volume and momentum filters
// ✓ Automatic stop loss and take profit levels
// ✓ Signal quality scoring (filters out weak signals)
// ✓ Risk:Reward ratio enforcement (minimum 2:1)
// ✓ Volatility filter (avoids choppy markets)
Chart patterns
Extreme Candle Pattern Visualizer🟠 OVERVIEW
This indicator compares the current candle's percentage change against historical data, then highlights past candles with equal or bigger magnitude of movement. Also, for all the highlighted past candles, it tracks how far price extends before recovering to its starting point. It also provides statistical context through percentile rankings.
IN SHORT: Quickly spot similar price movements in the past and understand how unusual the current candle is using percentile rankings.
🟠 CORE CONCEPT
The indicator operates on two fundamental principles:
1. Statistical Rarity Detection
The script calculates the percentage change (open to close) of every candle within a user-defined lookback period and determines where the current candle ranks in this distribution. A candle closing at -9% might fall in the bottom 5th percentile, indicating it's more extreme than 95% of recent candles. This percentile ranking helps traders identify statistically unusual moves that often precede reversals or extended trends.
2. Recovery Path Mapping
Once extreme candles are identified (those matching or exceeding the current candle's magnitude), the indicator tracks their subsequent price action. For bearish candles, it measures how far price dropped before recovering back to the candle's opening price. For bullish candles, it tracks how high price climbed before returning to the open. This reveals whether extreme moves typically extend further or reverse quickly.
🟠 PRACTICAL APPLICATIONS
Mean Reversion Trading:
Candles in extreme percentiles (below 10% or above 90%) often signal oversold/overbought conditions. The recovery lines show typical extension distances, helping traders set profit targets for counter-trend entries.
Momentum Continuation:
When extreme candles show small recovery percentages before price reverses back, it suggests strong directional momentum that may continue.
Stop Loss Placement:
Historical recovery data reveals typical extension ranges after extreme moves, informing more precise stop loss positioning beyond noise but before major reversals.
Pattern Recognition:
By visualizing how similar historical extremes resolved, traders gain context for current price action rather than trading in isolation.
🟠 VISUAL ELEMENTS
Orange Circles: Mark historical candles with similar or greater magnitude to current candle
Red Lines: Track downward extensions after bearish extreme candles
Green Lines: Track upward extensions after bullish extreme candles
Percentage Labels: Show exact extension distance from candle close to extreme point
Percentile Label: Color-coded box displaying current candle's statistical ranking
Hollow Candles: Background rendering for clean chart presentation
🟠 ORIGINALITY
This indicator uniquely combines statistical percentile analysis with forward-looking recovery tracking. While many indicators identify extreme moves, few show what happened next across multiple historical instances simultaneously. The dual approach provides both the "how rare is this?" question (percentile) and "what typically happens after?" answer (recovery paths) in a single visual framework.
SMC Structures and Multi-Timeframe FVG PYSMC Structures and Multi-Timeframe FVG Indicator
Tip: For optimal performance, adjust the number of FVGs displayed per timeframe in the settings. On high-performance devices, up to 8 FVGs per timeframe can be used without issues. If you experience slowdowns, reduce to 3 or 4 FVGs per timeframe. If the chart flashes, disable indicators one by one to identify conflicts, or try using the TradingView Mobile or Windows App for a smoother experience.
Overview
This Pine Script indicator enhances market analysis by integrating Smart Money Concepts (SMC) with Fair Value Gaps (FVG) across multiple timeframes. It identifies trend continuations (Break of Structure, BOS) and trend reversals (Change of Character, CHoCH) while highlighting liquidity zones through FVG detection. The indicator includes eight customizable Moving Average (MA) curve templates, disabled by default, to complement SMC and FVG analysis. Its originality lies in combining multi-timeframe FVG detection with SMC structure analysis, providing traders with a cohesive tool to visualize price action patterns and liquidity zones efficiently.
Features and Functionality
1. Fair Value Gaps (FVG)
The indicator detects and displays bullish, bearish, and mitigated FVGs, representing liquidity zones where price inefficiencies occur. These gaps are dynamically updated based on price action:
Bullish FVG: Displayed in green when unmitigated, indicating potential upward liquidity zones.
Bearish FVG: Displayed in red when unmitigated, signaling potential downward liquidity zones.
Mitigated FVG: Shown in gray once the gap is partially filled by price action.
Fully Mitigated FVG: Automatically removed from the chart when the gap is fully filled, reducing visual clutter.
Users can customize the number of historical FVGs displayed via the settings, allowing focus on recent liquidity zones for targeted analysis.
2. SMC Structures
The indicator identifies key SMC price action patterns:
Break of Structure (BOS): Marked with gray lines, indicating trend continuation when price breaks a significant high or low.
Change of Character (CHoCH): Highlighted with yellow lines, signaling potential trend reversals when price fails to maintain the current structure.
High/Low Values: Blue lines denote the highest high and lowest low of the current structure, providing reference points for market context.
3. Multi-Timeframe FVG Analysis
A standout feature is the ability to analyze FVGs across multiple timeframes simultaneously. This allows traders to align higher-timeframe liquidity zones with lower-timeframe entries, improving trade precision. The indicator fetches FVG data from user-selected timeframes, displaying them cohesively on the chart.
4. Moving Average (MA) Templates
The indicator includes eight customizable MA curve templates in the Settings > Template section, disabled by default. These templates allow users to overlay MAs (e.g., SMA, EMA, WMA) to complement SMC and FVG analysis. Each template is pre-configured with different periods and types, enabling quick adaptation to various trading strategies, such as trend confirmation or dynamic support/resistance.
How It Works
The script processes price action to detect FVGs by analyzing three-candle patterns where a gap forms between the high/low of the first and third candles. Multi-timeframe data is retrieved using Pine Script’s request.security() function, ensuring accurate FVG plotting across user-defined timeframes. BOS and CHoCH are identified by tracking swing highs and lows, with logic to differentiate trend continuation from reversals. The MA templates are computed using standard Pine Script TA functions, with user inputs controlling visibility and parameters.
How to Use
Add to Chart: Apply the indicator to any TradingView chart.
Configure Settings:
FVG Settings: Adjust the number of historical FVGs to display (default: 10). Enable/disable specific FVG types (bullish, bearish, mitigated).
Timeframe Selection: Choose up to three timeframes for FVG analysis (e.g., 1H, 4H, 1D) to align with your trading strategy.
Structure Settings: Toggle BOS (gray lines) and CHoCH (yellow lines) visibility. Adjust sensitivity for structure detection if needed.
MA Templates: Enable MA curves via the Template section. Select from eight pre-configured MA types and periods to suit your analysis.
Interpret Signals:
Use green/red FVGs for potential entry points targeting liquidity zones.
Monitor gray lines (BOS) for trend continuation and yellow lines (CHoCH) for reversal signals.
Align multi-timeframe FVGs with BOS/CHoCH for high-probability setups.
Optionally, use MA curves for trend confirmation or dynamic levels.
Clean Chart Usage: The indicator is designed to work standalone. Ensure no conflicting scripts are applied unless explicitly needed for your strategy.
Why This Indicator Is Unique
Unlike standalone FVG or SMC indicators, this script combines both concepts with multi-timeframe analysis, offering a comprehensive view of market structure and liquidity. The addition of customizable MA templates enhances flexibility, while the dynamic removal of mitigated FVGs keeps the chart clean. This mashup is purposeful, as it integrates complementary tools to streamline decision-making for traders using SMC strategies.
Credits
This indicator builds on foundational SMC and FVG concepts from the TradingView community. Some open-source code was reused, and do performance enhancement as you guys can read the code. This type of indicators has inspiration was drawn from public domain SMC methodologies. All code is partly original with manual work on performance optimization in Pine Script.
Notes
Ensure your chart is clean (no unnecessary drawings or indicators) to maximize clarity.
The indicator is open-source, and traders are encouraged to review the code for deeper understanding.
For optimal use, test the indicator on a demo account to familiarize yourself with its signals.
HammerThis indicator automatically detects powerful candlestick formations such as Hammer, Inverted Hammer, Bullish Engulfing, Hanging Man, Shooting Star, and Bearish Engulfing.
It visually marks potential reversal zones on the chart and provides instant Long / Short alerts.
By combining pattern recognition with swing levels, it helps you identify possible trend reversals more clearly.
A simple, fast, and price-action-focused tool for smarter trading decisions.
💡 Yellow dotted lines indicate possible reaction zones around swing points.
Multi-Timeframe FVG Detector v2 STEWNewest FVG with alerts and ability to show current TimeFrame Viewed
Santhosh ATR Buy/Sell with Consolidation OverlayUse this indicator to filter false signals, if you get signals within consolidation area , then wait for the market to break the consolidation zone to take the entry. Avoid entry within consolidation zones . For better performance use "lookback period:45", "Consolidation Length:2" for consolidation inputs. Feel free to use your inputs to match your strategy again any asset.
Liquidity Sweeps (Improved)this is improved version of liqudity sweep and alert thois is my third attempt
Luxy Momentum, Trend, Bias and Breakout Indicators V7
TABLE OF CONTENTS
This is Version 7 (V7) - the latest and most optimized release. If you are using any older versions (V6, V5, V4, V3, etc.), it is highly recommended to replace them with V7.
Why This Indicator is Different
Who Should Use This
Core Components Overview
The UT Bot Trading System
Understanding the Market Bias Table
Candlestick Pattern Recognition
Visual Tools and Features
How to Use the Indicator
Performance and Optimization
FAQ
---
### CREDITS & ATTRIBUTION
This indicator implements proven trading concepts using entirely original code developed specifically for this project.
### CONCEPTUAL FOUNDATIONS
• UT Bot ATR Trailing System
- Original concept by @QuantNomad: (search "UT-Bot-Strategy"
- Our version is a complete reimplementation with significant enhancements:
- Volume-weighted momentum adjustment
- Composite stop loss from multiple S/R layers
- Multi-filter confirmation system (swing, %, 2-bar, ZLSMA)
- Full integration with multi-timeframe bias table
- Visual audit trail with freeze-on-touch
- NOTE: No code was copied - this is a complete reimplementation with enhancements.
• Standard Technical Indicators (Public Domain Formulas):
- Supertrend: ATR-based trend calculation with custom gradient fills
- MACD: Gerald Appel's formula with separation filters
- RSI: J. Welles Wilder's formula with pullback zone logic
- ADX/DMI: Custom trend strength formula inspired by Wilder's directional movement concept, reimplemented with volume weighting and efficiency metrics
- ZLSMA: Zero-lag formula enhanced with Hull MA and momentum prediction
### Custom Implementations
- Trend Strength: Inspired by Wilder's ADX concept but using volume-weighted pressure calculation and efficiency metrics (not traditional +DI/-DI smoothing)
- All code implementations are original
### ORIGINAL FEATURES (70%+ of codebase)
- Multi-Timeframe Bias Table with live updates
- Risk Management System (R-multiple TPs, freeze-on-touch)
- Opening Range Breakout tracker with session management
- Composite Stop Loss calculator using 6+ S/R layers
- Performance optimization system (caching, conditional calcs)
- VIX Fear Index integration
- Previous Day High/Low auto-detection
- Candlestick pattern recognition with interactive tooltips
- Smart label and visual management
- All UI/UX design and table architecture
### DEVELOPMENT PROCESS
**AI Assistance:** This indicator was developed over 2+ months with AI assistance (ChatGPT/Claude) used for:
- Writing Pine Script code based on design specifications
- Optimizing performance and fixing bugs
- Ensuring Pine Script v6 compliance
- Generating documentation
**Author's Role:** All trading concepts, system design, feature selection, integration logic, and strategic decisions are original work by the author. The AI was a coding tool, not the system designer.
**Transparency:** We believe in full disclosure - this project demonstrates how AI can be used as a powerful development tool while maintaining creative and strategic ownership.
---
1. WHY THIS INDICATOR IS DIFFERENT
Most traders use multiple separate indicators on their charts, leading to cluttered screens, conflicting signals, and analysis paralysis. The Suite solves this by integrating proven technical tools into a single, cohesive system.
Key Advantages:
All-in-One Design: Instead of loading 5-10 separate indicators, you get everything in one optimized script. This reduces chart clutter and improves TradingView performance.
Multi-Timeframe Bias Table: Unlike standard indicators that only show the current timeframe, the Bias Table aggregates trend signals across multiple timeframes simultaneously. See at a glance whether 1m, 5m, 15m, 1h are aligned bullish or bearish - no more switching between charts.
Smart Confirmations: The indicator doesn't just give signals - it shows you WHY. Every entry has multiple layers of confirmation (MA cross, MACD momentum, ADX strength, RSI pullback, volume, etc.) that you can toggle on/off.
Dynamic Stop Loss System: Instead of static ATR stops, the SL is calculated from multiple support/resistance layers: UT trailing line, Supertrend, VWAP, swing structure, and MA levels. This creates more intelligent, price-action-aware stops.
R-Multiple Take Profits: Built-in TP system calculates targets based on your initial risk (1R, 1.5R, 2R, 3R). Lines freeze when touched with visual checkmarks, giving you a clean audit trail of partial exits.
Educational Tooltips Everywhere: Every single input has detailed tooltips explaining what it does, typical values, and how it impacts trading. You're not guessing - you're learning as you configure.
Performance Optimized: Smart caching, conditional calculations, and modular design mean the indicator runs fast despite having 15+ features. Turn off what you don't use for even better performance.
No Repainting: All signals respect bar close. Alerts fire correctly. What you see in history is what you would have gotten in real-time.
What Makes It Unique:
Integrated UT Bot + Bias Table: No other indicator combines UT Bot's ATR trailing system with a live multi-timeframe dashboard. You get precision entries with macro trend context.
Candlestick Pattern Recognition with Interactive Tooltips: Patterns aren't just marked - hover over any emoji for a full explanation of what the pattern means and how to trade it.
Opening Range Breakout Tracker: Built-in ORB system for intraday traders with customizable session times and real-time status updates in the Bias Table.
Previous Day High/Low Auto-Detection: Automatically plots PDH/PDL on intraday charts with theme-aware colors. Updates daily without manual input.
Dynamic Row Labels in Bias Table: The table shows your actual settings (e.g., "EMA 10 > SMA 20") not generic labels. You know exactly what's being evaluated.
Modular Filter System: Instead of forcing a fixed methodology, the indicator lets you build your own strategy. Start with just UT Bot, add filters one at a time, test what works for your style.
---
2. WHO WHOULD USE THIS
Designed For:
Intermediate to Advanced Traders: You understand basic technical analysis (MAs, RSI, MACD) and want to combine multiple confirmations efficiently. This isn't a "one-click profit" system - it's a professional toolkit.
Multi-Timeframe Traders: If you trade one asset but check multiple timeframes for confirmation (e.g., enter on 5m after checking 15m and 1h alignment), the Bias Table will save you hours every week.
Trend Followers: The indicator excels at identifying and following trends using UT Bot, Supertrend, and MA systems. If you trade breakouts and pullbacks in trending markets, this is built for you.
Intraday and Swing Traders: Works equally well on 5m-1h charts (day trading) and 4h-D charts (swing trading). Scalpers can use it too with appropriate settings adjustments.
Discretionary Traders: This isn't a black-box system. You see all the components, understand the logic, and make final decisions. Perfect for traders who want tools, not automation.
Works Across All Markets:
Stocks (US, international)
Cryptocurrency (24/7 markets supported)
Forex pairs
Indices (SPY, QQQ, etc.)
Commodities
NOT Ideal For :
Complete Beginners: If you don't know what a moving average or RSI is, start with basics first. This indicator assumes foundational knowledge.
Algo Traders Seeking Black Box: This is discretionary. Signals require context and confirmation. Not suitable for blind automated execution.
Mean-Reversion Only Traders: The indicator is trend-following at its core. While VWAP bands support mean-reversion, the primary methodology is trend continuation.
---
3. CORE COMPONENTS OVERVIEW
The indicator combines these proven systems:
Trend Analysis:
Moving Averages: Four customizable MAs (Fast, Medium, Medium-Long, Long) with six types to choose from (EMA, SMA, WMA, VWMA, RMA, HMA). Mix and match for your style.
Supertrend: ATR-based trend indicator with unique gradient fill showing trend strength. One-sided ribbon visualization makes it easier to see momentum building or fading.
ZLSMA : Zero-lag linear-regression smoothed moving average. Reduces lag compared to traditional MAs while maintaining smooth curves.
Momentum & Filters:
MACD: Standard MACD with separation filter to avoid weak crossovers.
RSI: Pullback zone detection - only enter longs when RSI is in your defined "buy zone" and shorts in "sell zone".
ADX/DMI: Trend strength measurement with directional filter. Ensures you only trade when there's actual momentum.
Volume Filter: Relative volume confirmation - require above-average volume for entries.
Donchian Breakout: Optional channel breakout requirement.
Signal Systems:
UT Bot: The primary signal generator. ATR trailing stop that adapts to volatility and gives clear entry/exit points.
Base Signals: MA cross system with all the above filters applied. More conservative than UT Bot alone.
Market Bias Table: Multi-timeframe dashboard showing trend alignment across 7 timeframes plus macro bias (3-day, weekly, monthly, quarterly, VIX).
Candlestick Patterns: Six major reversal patterns auto-detected with interactive tooltips.
ORB Tracker: Opening range high/low with breakout status (intraday only).
PDH/PDL: Previous day levels plotted automatically on intraday charts.
VWAP + Bands : Session-anchored VWAP with up to three standard deviation band pairs.
---
4. THE UT BOT TRADING SYSTEM
The UT Bot is the heart of the indicator's signal generation. It's an advanced ATR trailing stop that adapts to market volatility.
Why UT Bot is Superior to Fixed Stops:
Traditional ATR stops use a fixed multiplier (e.g., "stop = entry - 2×ATR"). UT Bot is smarter:
It TRAILS the stop as price moves in your favor
It WIDENS during high volatility to avoid premature stops
It TIGHTENS during consolidation to lock in profits
It FLIPS when price breaks the trailing line, signaling reversals
Visual Elements You'll See:
Orange Trailing Line: The actual UT stop level that adapts bar-by-bar
Buy/Sell Labels: Aqua triangle (long) or orange triangle (short) when the line flips
ENTRY Line: Horizontal line at your entry price (optional, can be turned off)
Suggested Stop Loss: A composite SL calculated from multiple support/resistance layers:
- UT trailing line
- Supertrend level
- VWAP
- Swing structure (recent lows/highs)
- Long-term MA (200)
- ATR-based floor
Take Profit Lines: TP1, TP1.5, TP2, TP3 based on R-multiples. When price touches a TP, it's marked with a checkmark and the line freezes for audit trail purposes.
Status Messages: "SL Touched ❌" or "SL Frozen" when the trade leg completes.
How UT Bot Differs from Other ATR Systems:
Multiple Filters Available: You can require 2-bar confirmation, minimum % price change, swing structure alignment, or ZLSMA directional filter. Most UT implementations have none of these.
Smart SL Calculation: Instead of just using the UT line as your stop, the indicator suggests a better SL based on actual support/resistance. This prevents getting stopped out by wicks while keeping risk controlled.
Visual Audit Trail: All SL/TP lines freeze when touched with clear markers. You can review your trades weeks later and see exactly where entries, stops, and targets were.
Performance Options: "Draw UT visuals only on bar close" lets you reduce rendering load without affecting logic or alerts - critical for slower machines or 1m charts.
Trading Logic:
UT Bot flips direction (Buy or Sell signal appears)
Check Bias Table for multi-timeframe confirmation
Optional: Wait for Base signal or candlestick pattern
Enter at signal bar close or next bar open
Place stop at "Suggested Stop Loss" line
Scale out at TP levels (TP1, TP2, TP3)
Exit remaining position on opposite UT signal or stop hit
---
5. UNDERSTANDING THE MARKET BIAS TABLE
This is the indicator's unique multi-timeframe intelligence layer. Instead of looking at one chart at a time, the table aggregates signals across seven timeframes plus macro trend bias.
Why Multi-Timeframe Analysis Matters:
Professional traders check higher and lower timeframes for context:
Is the 1h uptrend aligning with my 5m entry?
Are all short-term timeframes bullish or just one?
Is the daily trend supportive or fighting me?
Doing this manually means opening multiple charts, checking each indicator, and making mental notes. The Bias Table does it automatically in one glance.
Table Structure:
Header Row:
On intraday charts: 1m, 5m, 15m, 30m, 1h, 2h, 4h (toggle which ones you want)
On daily+ charts: D, W, M (automatic)
Green dot next to title = live updating
Headline Rows - Macro Bias:
These show broad market direction over longer periods:
3 Day Bias: Trend over last 3 trading sessions (uses 1h data)
Weekly Bias: Trend over last 5 trading sessions (uses 4h data)
Monthly Bias: Trend over last 30 daily bars
Quarterly Bias: Trend over last 13 weekly bars
VIX Fear Index: Market regime based on VIX level - bullish when low, bearish when high
Opening Range Breakout: Status of price vs. session open range (intraday only)
These rows show text: "BULLISH", "BEARISH", or "NEUTRAL"
Indicator Rows - Technical Signals:
These evaluate your configured indicators across all active timeframes:
Fast MA > Medium MA (shows your actual MA settings, e.g., "EMA 10 > SMA 20")
Price > Long MA (e.g., "Price > SMA 200")
Price > VWAP
MACD > Signal
Supertrend (up/down/neutral)
ZLSMA Rising
RSI In Zone
ADX ≥ Minimum
These rows show emojis: GREEB (bullish), RED (bearish), GRAY/YELLOW (neutral/NA)
AVG Column:
Shows percentage of active timeframes that are bullish for that row. This is the KEY metric:
AVG > 70% = strong multi-timeframe bullish alignment
AVG 40-60% = mixed/choppy, no clear trend
AVG < 30% = strong multi-timeframe bearish alignment
How to Use the Table:
For a long trade:
Check AVG column - want to see > 60% ideally
Check headline bias rows - want to see BULLISH, not BEARISH
Check VIX row - bullish market regime preferred
Check ORB row (intraday) - want ABOVE for longs
Scan indicator rows - more green = better confirmation
For a short trade:
Check AVG column - want to see < 40% ideally
Check headline bias rows - want to see BEARISH, not BULLISH
Check VIX row - bearish market regime preferred
Check ORB row (intraday) - want BELOW for shorts
Scan indicator rows - more red = better confirmation
When AVG is 40-60%:
Market is choppy, mixed signals. Either stay out or reduce position size significantly. These are low-probability environments.
Unique Features:
Dynamic Labels: Row names show your actual settings (e.g., "EMA 10 > SMA 20" not generic "Fast > Slow"). You know exactly what's being evaluated.
Customizable Rows: Turn off rows you don't care about. Only show what matters to your strategy.
Customizable Timeframes: On intraday charts, disable 1m or 4h if you don't trade them. Reduces calculation load by 20-40%.
Automatic HTF Handling: On Daily/Weekly/Monthly charts, the table automatically switches to D/W/M columns. No configuration needed.
Performance Smart: "Hide BIAS table on 1D or above" option completely skips all table calculations on higher timeframes if you only trade intraday.
---
6. CANDLESTICK PATTERN RECOGNITION
The indicator automatically detects six major reversal patterns and marks them with emojis at the relevant bars.
Why These Six Patterns:
These are the most statistically significant reversal patterns according to trading literature:
High win rate when appearing at support/resistance
Clear visual structure (not subjective)
Work across all timeframes and assets
Studied extensively by institutions
The Patterns:
Bullish Patterns (appear at bottoms):
Bullish Engulfing: Green candle completely engulfs prior red candle's body. Strong reversal signal.
Hammer: Small body with long lower wick (at least 2× body size). Shows rejection of lower prices by buyers.
Morning Star: Three-candle pattern (large red → small indecision → large green). Very strong bottom reversal.
Bearish Patterns (appear at tops):
Bearish Engulfing: Red candle completely engulfs prior green candle's body. Strong reversal signal.
Shooting Star: Small body with long upper wick (at least 2× body size). Shows rejection of higher prices by sellers.
Evening Star: Three-candle pattern (large green → small indecision → large red). Very strong top reversal.
Interactive Tooltips:
Unlike most pattern indicators that just draw shapes, this one is educational:
Hover your mouse over any pattern emoji
A tooltip appears explaining: what the pattern is, what it means, when it's most reliable, and how to trade it
No need to memorize - learn as you trade
Noise Filter:
"Min candle body % to filter noise" setting prevents false signals:
Patterns require minimum body size relative to price
Filters out tiny candles that don't represent real buying/selling pressure
Adjust based on asset volatility (higher % for crypto, lower for low-volatility stocks)
How to Trade Patterns:
Patterns are NOT standalone entry signals. Use them as:
Confirmation: UT Bot gives signal + pattern appears = stronger entry
Reversal Warning: In a trade, opposite pattern appears = consider tightening stop or taking profit
Support/Resistance Validation: Pattern at key level (PDH, VWAP, MA 200) = level is being respected
Best combined with:
UT Bot or Base signal in same direction
Bias Table alignment (AVG > 60% or < 40%)
Appearance at obvious support/resistance
---
7. VISUAL TOOLS AND FEATURES
VWAP (Volume Weighted Average Price):
Session-anchored VWAP with standard deviation bands. Shows institutional "fair value" for the trading session.
Anchor Options: Session, Day, Week, Month, Quarter, Year. Choose based on your trading timeframe.
Bands: Up to three pairs (X1, X2, X3) showing statistical deviation. Price at outer bands often reverses.
Auto-Hide on HTF: VWAP hides on Daily/Weekly/Monthly charts automatically unless you enable anchored mode.
Use VWAP as:
Directional bias (above = bullish, below = bearish)
Mean reversion levels (outer bands)
Support/resistance (the VWAP line itself)
Previous Day High/Low:
Automatically plots yesterday's high and low on intraday charts:
Updates at start of each new trading day
Theme-aware colors (dark text for light charts, light text for dark charts)
Hidden automatically on Daily/Weekly/Monthly charts
These levels are critical for intraday traders - institutions watch them closely as support/resistance.
Opening Range Breakout (ORB):
Tracks the high/low of the first 5, 15, 30, or 60 minutes of the trading session:
Customizable session times (preset for NYSE, LSE, TSE, or custom)
Shows current breakout status in Bias Table row (ABOVE, BELOW, INSIDE, BUILDING)
Intraday only - auto-disabled on Daily+ charts
ORB is a classic day trading strategy - breakout above opening range often leads to continuation.
Extra Labels:
Change from Open %: Shows how far price has moved from session open (intraday) or daily open (HTF). Green if positive, red if negative.
ADX Badge: Small label at bottom of last bar showing current ADX value. Green when above your minimum threshold, red when below.
RSI Badge: Small label at top of last bar showing current RSI value with zone status (buy zone, sell zone, or neutral).
These labels provide quick at-a-glance confirmation without needing separate indicator windows.
---
8. HOW TO USE THE INDICATOR
Step 1: Add to Chart
Load the indicator on your chosen asset and timeframe
First time: Everything is enabled by default - the chart will look busy
Don't panic - you'll turn off what you don't need
Step 2: Start Simple
Turn OFF everything except:
UT Bot labels (keep these ON)
Bias Table (keep this ON)
Moving Averages (Fast and Medium only)
Suggested Stop Loss and Take Profits
Hide everything else initially. Get comfortable with the basic UT Bot + Bias Table workflow first.
Step 3: Learn the Core Workflow
UT Bot gives a Buy or Sell signal
Check Bias Table AVG column - do you have multi-timeframe alignment?
If yes, enter the trade
Place stop at Suggested Stop Loss line
Scale out at TP levels
Exit on opposite UT signal
Trade this simple system for a week. Get a feel for signal frequency and win rate with your settings.
Step 4: Add Filters Gradually
If you're getting too many losing signals (whipsaws in choppy markets), add filters one at a time:
Try: "Require 2-Bar Trend Confirmation" - wait for 2 bars to confirm direction
Try: ADX filter with minimum threshold - only trade when trend strength is sufficient
Try: RSI pullback filter - only enter on pullbacks, not chasing
Try: Volume filter - require above-average volume
Add one filter, test for a week, evaluate. Repeat.
Step 5: Enable Advanced Features (Optional)
Once you're profitable with the core system, add:
Supertrend for additional trend confirmation
Candlestick patterns for reversal warnings
VWAP for institutional anchor reference
ORB for intraday breakout context
ZLSMA for low-lag trend following
Step 6: Optimize Settings
Every setting has a detailed tooltip explaining what it does and typical values. Hover over any input to read:
What the parameter controls
How it impacts trading
Suggested ranges for scalping, day trading, and swing trading
Start with defaults, then adjust based on your results and style.
Step 7: Set Up Alerts
Right-click chart → Add Alert → Condition: "Luxy Momentum v6" → Choose:
"UT Bot — Buy" for long entries
"UT Bot — Sell" for short entries
"Base Long/Short" for filtered MA cross signals
Optionally enable "Send real-time alert() on UT flip" in settings for immediate notifications.
Common Workflow Variations:
Conservative Trader:
UT signal + Base signal + Candlestick pattern + Bias AVG > 70%
Enter only at major support/resistance
Wider UT sensitivity, multiple filters
Aggressive Trader:
UT signal + Bias AVG > 60%
Enter immediately, no waiting
Tighter UT sensitivity, minimal filters
Swing Trader:
Focus on Daily/Weekly Bias alignment
Ignore intraday noise
Use ORB and PDH/PDL less (or not at all)
Wider stops, patient approach
---
9. PERFORMANCE AND OPTIMIZATION
The indicator is optimized for speed, but with 15+ features running simultaneously, chart load time can add up. Here's how to keep it fast:
Biggest Performance Gains:
Disable Unused Timeframes: In "Time Frames" settings, turn OFF any timeframe you don't actively trade. Each disabled TF saves 10-15% calculation time. If you only day trade 5m, 15m, 1h, disable 1m, 2h, 4h.
Hide Bias Table on Daily+: If you only trade intraday, enable "Hide BIAS table on 1D or above". This skips ALL table calculations on higher timeframes.
Draw UT Visuals Only on Bar Close: Reduces intrabar rendering of SL/TP/Entry lines. Has ZERO impact on logic or alerts - purely visual optimization.
Additional Optimizations:
Turn off VWAP bands if you don't use them
Disable candlestick patterns if you don't trade them
Turn off Supertrend fill if you find it distracting (keep the line)
Reduce "Limit to 10 bars" for SL/TP lines to minimize line objects
Performance Features Built-In:
Smart Caching: Higher timeframe data (3-day bias, weekly bias, etc.) updates once per day, not every bar
Conditional Calculations: Volume filter only calculates when enabled. Swing filter only runs when enabled. Nothing computes if turned off.
Modular Design: Every component is independent. Turn off what you don't need without breaking other features.
Typical Load Times:
5m chart, all features ON, 7 timeframes: ~2-3 seconds
5m chart, core features only, 3 timeframes: ~1 second
1m chart, all features: ~4-5 seconds (many bars to calculate)
If loading takes longer, you likely have too many indicators on the chart total (not just this one).
---
10. FAQ
Q: How is this different from standard UT Bot indicators?
A: Standard UT Bot (originally by @QuantNomad) is just the ATR trailing line and flip signals. This implementation adds:
- Volume weighting and momentum adjustment to the trailing calculation
- Multiple confirmation filters (swing, %, 2-bar, ZLSMA)
- Smart composite stop loss system from multiple S/R layers
- R-multiple take profit system with freeze-on-touch
- Integration with multi-timeframe Bias Table
- Visual audit trail with checkmarks
Q: Can I use this for automated trading?
A: The indicator is designed for discretionary trading. While it has clear signals and alerts, it's not a mechanical system. Context and judgment are required.
Q: Does it repaint?
A: No. All signals respect bar close. UT Bot logic runs intrabar but signals only trigger on confirmed bars. Alerts fire correctly with no lookahead.
Q: Do I need to use all the features?
A: Absolutely not. The indicator is modular. Many profitable traders use just UT Bot + Bias Table + Moving Averages. Start simple, add complexity only if needed.
Q: How do I know which settings to use?
A: Every single input has a detailed tooltip. Hover over any setting to see:
What it does
How it affects trading
Typical values for scalping, day trading, swing trading
Start with defaults, adjust gradually based on results.
Q: Can I use this on crypto 24/7 markets?
A: Yes. ORB will not work (no defined session), but everything else functions normally. Use "Day" anchor for VWAP instead of "Session".
Q: The Bias Table is blank or not showing.
A: Check:
"Show Table" is ON
Table position isn't overlapping another indicator's table (change position)
At least one row is enabled
"Hide BIAS table on 1D or above" is OFF (if on Daily+ chart)
Q: Why are candlestick patterns not appearing?
A: Patterns are relatively rare by design - they only appear at genuine reversal points. Check:
Pattern toggles are ON
"Min candle body %" isn't too high (try 0.05-0.10)
You're looking at a chart with actual reversals (not strong trending market)
Q: UT Bot is too sensitive/not sensitive enough.
A: Adjust "Sensitivity (Key×ATR)". Lower number = tighter stop, more signals. Higher number = wider stop, fewer signals. Read the tooltip for guidance.
Q: Can I get alerts for the Bias Table?
A: The Bias Table is a dashboard for visual analysis, not a signal generator. Set alerts on UT Bot or Base signals, then manually check Bias Table for confirmation.
Q: Does this work on stocks with low volume?
A: Yes, but turn OFF the volume filter. Low volume stocks will never meet relative volume requirements.
Q: How often should I check the Bias Table?
A: Before every entry. It takes 2 seconds to glance at the AVG column and headline rows. This one check can save you from fighting the trend.
Q: What if UT signal and Base signal disagree?
A: UT Bot is more aggressive (ATR trailing). Base signals are more conservative (MA cross + filters). If they disagree, either:
Wait for both to align (safest)
Take the UT signal but with smaller size (aggressive)
Skip the trade (conservative)
There's no "right" answer - depends on your risk tolerance.
---
FINAL NOTES
The indicator gives you an edge. How you use that edge determines results.
For questions, feedback, or support, comment on the indicator page or message the author.
Happy Trading!
Volume BubblesVolume Bubbles Indicator
Introduction
The Volume Bubbles indicator is a powerful tool designed to visually highlight significant volume spikes on your TradingView charts. It helps traders identify potential areas of whale accumulation (large buying activity) or dumping (large selling activity) by displaying colored bubbles on candles where volume exceeds a customizable threshold. Green bubbles indicate bullish (buy) volume on up candles, suggesting possible accumulation, while red bubbles signal bearish (sell) volume on down candles, indicating potential dumping. The bubble size scales with the volume magnitude, making it easy to spot major market moves at a glance.
This indicator is particularly useful for crypto, forex, and stock traders looking to gauge market sentiment and large player involvement without cluttering the chart. It's built in Pine Script v5 and overlays directly on your price action.
How It Works
The indicator calculates a moving average of volume (default: 20-period SMA) and detects spikes when current volume exceeds this average by a multiplier (default: 2x).
Buy Bubbles (Green): Appear on bullish candles (close >= open) at the low wick, representing potential whale buying or accumulation zones.
Sell Bubbles (Red): Appear on bearish candles (close < open) at the high wick, indicating potential whale selling or dumping zones.
Bubble Size: Dynamically sized based on volume thresholds – huge for >1M, large for 500K-1M, normal for <500K.
Transparency: Increases with volume ratio for better visibility on extreme spikes.
Tooltip:
Hover over a bubble to see detailed info like total volume, average volume, and ratio.
By focusing on these high-volume events, traders can spot key support/resistance levels where whales might be active.
How to Use for Whale Accumulation and Dumping
Whales (large holders) often move markets with high-volume trades. This indicator helps spot them:
Accumulation (Buying): Look for clusters of large green bubbles at price lows or during consolidations. This suggests whales are buying dips, potentially signaling a reversal or uptrend start. Combine with support levels for confirmation.
Dumping (Selling): Watch for big red bubbles at price highs or after rallies. This indicates whales unloading positions, which could lead to downtrends or corrections. Pair with resistance levels.
Tips:
Use on higher timeframes (e.g., 1H+) for reliable signals.
Confirm with other indicators like RSI or MACD to avoid false positives.
In trending markets, buy bubbles in uptrends confirm strength; sell bubbles in downtrends signal continuation.
Credits and Disclaimer
Inspired by volume analysis techniques. This is free to use; feedback welcome! Not financial advice – trade at your own risk.
Tamu2.0Testing Oct 2025. Indicator tries to identify short periods of volatility and market manipulation.
Auto SND Detector (RBR, DBR, RBD, DBD) - TitikSona🧠 Description
Auto SND Detector (RBR, DBR, RBD, DBD) – TitikSona
This indicator automatically detects Supply and Demand (SND) zones based on four classical price patterns:
🔵 RBR (Rally–Base–Rally) – Potential Demand Continuation
🟢 DBR (Drop–Base–Rally) – Potential Demand Reversal
🟠 RBD (Rally–Base–Drop) – Potential Supply Reversal
🔴 DBD (Drop–Base–Drop) – Potential Supply Continuation
The indicator identifies small base candles between two larger opposing candles, following the classical SND concept, and draws zone boxes automatically.
Box colors indicate the type of zone:
🟩 Light Green → RBR
🟦 Teal → DBR
🟧 Orange → RBD
🟥 Red → DBD
⚙️ How It Works
- Analyzes three consecutive candles (left, base, right) to detect structures like Rally–Base–Drop or Drop–Base–Rally.
- The middle candle (base) is considered valid if its size is smaller than a specified percentage (Base max % of avg range), indicating a consolidation area.
- Zones are drawn automatically and extended several bars to the right (Box extend).
- Optional labels and colors help quickly identify each pattern.
📈 Key Features
- Automatic detection of four main SND patterns
- Colored zones for quick visual identification
- Optional zone labels for easier reference
- Built-in alerts for detected patterns
- Adjustable parameters: base sensitivity, lookback, and zone length
💡 Usage Tips
- Best used on H1 or higher timeframes (H4/D1) for cleaner zone identification
- Combine with other analysis techniques, such as trend filters (EMA 50/200) or market structure, for context
- Zones can be used as a **visual reference** for potential areas of supply and demand, but should not be interpreted as guaranteed entry signals
🧩 Main Parameters
- Base max % of avg range → Sensitivity for base size
- Lookback bars → Number of candles analyzed backward
- Box extend → How far the zone extends to the right
- Show labels → Display pattern labels
📢 Notes
- This indicator is **informational and educational**
- Always use additional confirmation (price action, volume, trend indicators) before making any trading decisions
- Past patterns do not guarantee future price movements
EA M1 Signals with Persistent ATR TP/SL1 Minute scalper for XAU/USD - uses multiple integrated indicators to provide signals upon a breakout and pullback
HTF Live View - GSK-VIZAG-AP-INDIA📘 HTF Live View — GSK-VIZAG-AP-INDIA
🧩 Overview
The HTF Live View indicator provides a real-time visual representation of higher-timeframe (HTF) candle structures — such as 15min, 30min, 1H, 4H, and Daily — all derived directly from live 1-minute data.
This allows traders to see how higher timeframe candles are forming within the current session — without switching chart timeframes.
⚙️ Core Features
📊 Live Multi-Timeframe OHLC Tracking
Continuously calculates and displays Open, High, Low, and Close values for each key timeframe (15m, 30m, 1H, 4H, and Daily) based on the ongoing session.
⏱ Session-Aware Calculation
Automatically syncs with market hours defined by user-selected start and end times. Works across multiple timezones for global compatibility.
🕹 Visual Candle Representation
Draws mini-candles on the chart for each higher timeframe to represent their current body and wick — updated live.
Green body → bullish development
Red body → bearish development
📅 Informative Table Panel
Displays a summary table showing:
Timeframe label
Period (start–end time)
Live OHLC values
Color-coded close values
🌍 Timezone Support
Fully compatible with common regions such as Asia/Kolkata, New York, London, Tokyo, and Sydney.
🔧 User Inputs
Parameter Description
Market Start Hour/Minute Define session start time (default: 09:15)
Session End Hour/Minute Define market close (default: 15:30)
Timezone Select your preferred timezone for session alignment
💡 How It Works
The indicator uses a rolling OHLC calculation function that dynamically computes candle values based on elapsed session time.
Each timeframe (15m, 30m, 1H, 4H, and Daily) is built from 1-minute data to maintain precision even during intraday updates.
Both a visual representation (candles and wicks) and a data table (numeric summary) are displayed for clarity.
🧠 Use Cases
Monitor how HTF candles are forming live without switching chart intervals.
Understand intraday structure shifts (e.g., when 1H turns from red to green).
Confirm trend alignment across multiple timeframes visually.
Combine with your volume, delta, or liquidity tools for deeper confluence.
🪶 Signature
Developed by GSK-VIZAG-AP-INDIA
© prowelltraders — Educational and analytical use only.
⚠️ Disclaimer
This indicator is for educational and informational purposes only.
It does not provide financial advice or guaranteed trading results.
Always perform your own analysis before making investment decisions.
KP_EMA_Cross_signal KP_EMA_Cross_signal : This signal removes a lot of false signals and will help in day trading.
Weekly Breakout Screenermencari harga saham yang kuat breakout harga mingguan. potensi swing trading
FVG Strength Detector (1–5)shows you fair value gaps with a rating score of 5 strongest to 1 weakest so if u see a 4 thats a good area
BOS INDICATOR )Good for breaking structures. tells you where a break in structure occurs by outlining the break in structure in a red or green candle
Squeeze Weekday Frequency [CHE] Squeeze Weekday Frequency — Tracks historical frequency of low-volatility squeezes by weekday to inform timing of low-risk setups.
Summary
This indicator monitors periods of unusually low volatility, defined as when the average true range falls below a percentile threshold, and tallies their occurrences across each weekday. By aggregating these counts over the chart's history, it reveals patterns in squeeze frequency, helping traders avoid or target specific days for reduced noise. The approach uses persistent counters to ensure accurate daily tallies without duplicates, providing a robust view of weekday biases in volatility regimes.
Motivation: Why this design?
Traders often face inconsistent signal quality due to varying volatility patterns tied to the trading calendar, such as quieter mid-week sessions or busier Mondays. This indicator addresses that by binning low-volatility events into weekday buckets, allowing users to spot recurring low-activity days where trends may develop with less whipsaw. It focuses on historical aggregation rather than real-time alerts, emphasizing pattern recognition over prediction.
What’s different vs. standard approaches?
- Reference baseline: Traditional volatility trackers like simple moving averages of range or standalone Bollinger Band squeezes, which ignore temporal distribution.
- Architecture differences:
- Employs array-based persistent counters for each weekday to accumulate events without recounting.
- Includes duplicate prevention via day-key tracking to handle sparse data.
- Features on-demand sorting and conditional display modes for focused insights.
- Practical effect: Charts show a persistent table of ranked weekdays instead of transient plots, making it easier to glance at biases like higher squeezes on Fridays, which reduces the need for manual logging and highlights calendar-driven edges.
How it works (technical)
The indicator first computes the average true range over a specified lookback period to gauge recent volatility. It then ranks this value against its own history within a sliding window to identify squeezes when the rank drops below the threshold. Each bar's timestamp is resolved to a weekday using the selected timezone, and a unique day identifier is generated from the date components.
On detecting a squeeze and valid price data, it checks against a stored last-marked day for that weekday to avoid multiple counts per day. If it's a new occurrence, the corresponding weekday counter in an array increments. Total days and data-valid days are tracked separately for context.
At the chart's last bar, it sums all counters to compute shares, sorts weekdays by their squeeze proportions, and populates a table with the selected subset. The table alternates row colors and highlights the peak weekday. An info label above the final bar summarizes totals and the top day. Background shading applies a faint red to squeeze bars for visual confirmation. State persists via variable arrays initialized once, ensuring counts build incrementally without resets.
Parameter Guide
ATR Length — Sets the lookback for measuring average true range, influencing squeeze sensitivity to short-term swings. Default: 14. Trade-offs/Tips: Shorter values increase responsiveness but raise false positives in chop; longer smooths for stability, potentially missing early squeezes.
Percentile Window (bars) — Defines the history length for ranking the current ATR, balancing recent relevance with sample size. Default: 252. Trade-offs/Tips: Narrower windows adapt faster to regime shifts but amplify noise; wider ones stabilize ranks yet lag in fast markets—aim for 100-500 bars on daily charts.
Squeeze threshold (PR < x) — Determines the cutoff for low-volatility classification; lower values flag rarer, tighter squeezes. Default: 10.0. Trade-offs/Tips: Tighter thresholds (under 5) yield fewer but higher-quality signals, reducing clutter; looser (over 20) captures more events at the cost of relevance.
Timezone — Selects the reference for weekday assignment; exchange default aligns with asset's session. Default: Exchange. Trade-offs/Tips: Use custom for cross-market analysis, but verify alignment to avoid offset errors in global pairs.
Show — Toggles the results table visibility for quick on/off of the display. Default: true. Trade-offs/Tips: Disable in multi-indicator setups to save screen space; re-enable for periodic reviews.
Pos — Positions the table on the chart pane for optimal viewing. Default: Top Right. Trade-offs/Tips: Bottom options suit long-term charts; test placements to avoid overlapping price action.
Font — Adjusts text size in the table for readability at different zooms. Default: normal. Trade-offs/Tips: Smaller fonts fit more data but strain eyes on small screens; larger for presentations.
Dark — Applies a dark color scheme to the table for contrast against chart backgrounds. Default: true. Trade-offs/Tips: Toggle false for light themes; ensures legibility without manual recoloring.
Display — Filters table rows to show all, top three, or bottom three weekdays by squeeze share. Default: All. Trade-offs/Tips: Use "Top 3" for focus on high-frequency days in active trading; "All" for full audits.
Reading & Interpretation
Red-tinted backgrounds mark individual squeeze bars, indicating current low-volatility conditions. The table's summary row shows the highest squeeze count, its percentage of total events, and the associated weekday in teal. Detail rows list selected weekdays with their absolute counts, proportional shares, and a left arrow for the peak day—higher percentages signal days where squeezes cluster, suggesting potential for calmer trend development. The info label reports overall days observed, valid data days, and reiterates the top weekday with its count. Drifting counts toward zero on a weekday imply rarity, while elevated ones point to habitual low-activity sessions.
Practical Workflows & Combinations
- Trend following: Scan for squeezes on high-frequency weekdays as entry filters, confirming with higher highs or lower lows in the structure; pair with momentum oscillators to time breaks.
- Exits/Stops: On low-squeeze days, widen stops for breathing room, tightening them during peak squeeze periods to guard against false breaks—use the table's percentages as a regime proxy.
- Multi-asset/Multi-TF: Defaults work across forex and indices on hourly or daily frames; for stocks, adjust percentile window to 100 for shorter histories. Scale thresholds up by 5-10 points for high-vol assets like crypto to maintain signal sparsity.
Behavior, Constraints & Performance
- Repaint/confirmation: Counts update only on confirmed bars via day-key changes, with no future references—live bars may shade red tentatively but tallies finalize at session close.
- security()/HTF: Not used, so no higher-timeframe repaint risks; all computations stay in the chart's resolution.
- Resources: Relies on a fixed-size array of seven elements and small loops for sorting and table fills, capped at 5000 bars back—efficient for most charts but may slow on very long intraday histories.
- Known limits: Ignores weekends and holidays implicitly via data presence; early chart bars lack full percentile context, leading to initial undercounting; assumes continuous sessions, so gaps in data (e.g., news halts) skew totals.
Sensible Defaults & Quick Tuning
Start with the built-in values for broad-market daily charts: ATR at 14, window at 252, threshold at 10. For noisier environments, lower the threshold to 5 and shorten the window to 100 to prioritize rare squeezes. If too few events appear, raise the threshold to 15 and extend ATR to 20 for broader capture. To combat overcounting in sparse data, widen the window to 500 while keeping others stock—monitor the info label's data-days count before trusting patterns.
What this indicator is—and isn’t
This serves as a statistical overlay for spotting calendar-based volatility biases, aiding in session selection and filter design. It is not a standalone signal generator, predictive model, or risk manager—integrate it with price action, volume, and broader strategy rules for decisions.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
BATOOT//@version=5
indicator('BATOOT', overlay=true)
length = input.int(title='Length', minval=1, maxval=1000, defval=18)
upBound = ta.highest(high, length)
downBound = ta.lowest(low, length)
LONG = ta.cross(high, upBound)
SHORT = ta.cross(low, downBound)
switch_1 = 0
setA = 0
setB = 0
if LONG and switch_1 == 0
switch_1 := 1
setA := 1
setB := 0
setB
else
if SHORT and switch_1 == 1
switch_1 := 0
setA := 0
setB := 1
setB
else
switch_1 := nz(switch_1 , 0)
setA := 0
setB := 0
setB
plotshape(setA, title='LONG', style=shape.triangleup, text='BUY', color=color.new(color.green, 0), textcolor=color.new(color.green, 0), location=location.belowbar, size=size.small)
plotshape(setB, title='SHORT', style=shape.triangledown, text='SHORT', color=color.new(color.red, 0), textcolor=color.new(color.red, 0), location=location.abovebar, size=size.small)
alertcondition(setA, title='LONG', message='LONG!')
alertcondition(setB, title='SHORT', message='SHORT!')
//Support and Resistance
line_width = 3
sr_tf = input.timeframe('', title='S/R Timeframe')
//Legacy RSI calc
rsi_src = close
len = 9
up1 = ta.rma(math.max(ta.change(rsi_src), 0), len)
down1 = ta.rma(-math.min(ta.change(rsi_src), 0), len)
legacy_rsi = down1 == 0 ? 100 : up1 == 0 ? 0 : 100 - 100 / (1 + up1 / down1)
//CMO based on HMA
length1 = 1
src1 = ta.hma(open, 5) // legacy hma(5) calculation gives a resul with one candle shift, thus use hma()
src2 = ta.hma(close, 12)
momm1 = ta.change(src1)
momm2 = ta.change(src2)
f1(m, n) =>
m >= n ? m : 0.0
f2(m, n) =>
m >= n ? 0.0 : -m
m1 = f1(momm1, momm2)
m2 = f2(momm1, momm2)
sm1 = math.sum(m1, length1)
sm2 = math.sum(m2, length1)
percent(nom, div) =>
100 * nom / div
cmo_new = percent(sm1 - sm2, sm1 + sm2)
//Legacy Close Pivots calcs.
len5 = 2
h = ta.highest(len5)
h1 = ta.dev(h, len5) ? na : h
hpivot = fixnan(h1)
l = ta.lowest(len5)
l1 = ta.dev(l, len5) ? na : l
lpivot = fixnan(l1)
//Calc Values
rsi_new = ta.rsi(close, 9)
lpivot_new = lpivot
hpivot_new = hpivot
sup = rsi_new < 25 and cmo_new > 50 and lpivot_new
res = rsi_new > 75 and cmo_new < -50 and hpivot_new
calcXup() =>
var xup = 0.0
xup := sup ? low : xup
xup
calcXdown() =>
var xdown = 0.0
xdown := res ? high : xdown
xdown
//Lines drawing variables
tf1 = request.security(syminfo.tickerid, sr_tf, calcXup(), lookahead=barmerge.lookahead_on)
tf2 = request.security(syminfo.tickerid, sr_tf, calcXdown(), lookahead=barmerge.lookahead_on)
//SR Line plotting
var tf1_line = line.new(0, 0, 0, 0)
var tf1_bi_start = 0
var tf1_bi_end = 0
tf1_bi_start := ta.change(tf1) ? bar_index : tf1_bi_start
tf1_bi_end := ta.change(tf1) ? tf1_bi_start : bar_index
if ta.change(tf1)
tf1_line := line.new(tf1_bi_start, tf1, tf1_bi_end, tf1, color=color.green, width=line_width)
tf1_line
line.set_x2(tf1_line, tf1_bi_end)
var tf2_line = line.new(0, 0, 0, 0)
var tf2_bi_start = 0
var tf2_bi_end = 0
tf2_bi_start := ta.change(tf2) ? bar_index : tf2_bi_start
tf2_bi_end := ta.change(tf2) ? tf2_bi_start : bar_index
if ta.change(tf2)
tf2_line := line.new(tf2_bi_start, tf2, tf2_bi_end, tf2, color=color.orange, width=line_width)
tf2_line
line.set_x2(tf2_line, tf2_bi_end)
Volume Peak (2 before & 2 after) - With AlertVolume Peak (2 before & 2 after) - With Alert
There will be an alert for you when a signal appears.
If you find it useful, please give me a like