ICT - Range ProjectionThis script helps you to project future intra-day range or weekly range based on the Asia range.
It draws multiple horizontal lines on the standard deviation levels. (There is a limitation of around 50 vertical lines per script)
Cerca negli script per "ict"
ICT Killzone For Crypto Markets.Adjusted for Crypto 24/7 markets
Adjusted for UTC
i have hidden the asian open range and daily bars on my charts , you can choose to have them on
Less screen clutter
London Open 8:00 - 4:30 - Killzone 7:00 - 9:00
NewYork Open 9:30 - 4:00 Killzone 8:00 - 10:00
Shanghai open 9:15 Killzone 8:00 - 10:00
NOT MY ORIGINAL SCRIPT. JUST MODIFIED VERSION
HSM CandlesTenha a visão dos seus candles de timeframes maiores (HTF) mesmo operando em timeframes menores (LTF).
Isso potencializa a interpretação do Power of Three e facilita o acompanhamento de conceitos como o CRT.
Ajuste a configuração conforme seu estilo, utilizando o indicador baseado no Inner Circle Trader (ICT).
English:
Bring the perspective of higher-timeframe (HTF) candles into your lower-timeframe (LTF) trading.
This enhances your understanding of the Power of Three and supports the application of theories such as CRT.
Customize the settings to fit your style, using the Inner Circle Trader (ICT) indicator.
Trading Macro Windows by BW v2
Trading Macros by BW: Integrating ICT Concepts for Session Analysis
This indicator combines two key Inner Circle Trader (ICT) concepts—Change in State of Delivery (CISD) or Inverted Fair Value Gap (IFVG) signals with Macro Time Windows—to provide a unified tool for analyzing intraday price action, particularly during Pacific Time (PT) sessions. Rather than simply merging existing scripts, this integration creates a cohesive visual framework that highlights how macro consolidation periods interact with potential reversal or continuation signals like CISD or IFVG. By overlaying macro candle styling and borders on the chart alongside selectable signal lines, traders can better contextualize setups within ICT's macro narrative, where price often manipulates liquidity during these windows before displacing toward higher-timeframe objectives.
Core Components and How They Work Together:
Macro Time Windows (Inspired by ICT's Macro Periods):
ICT emphasizes "macro" as 30-minute windows (e.g., 06:45–07:15 PT, 07:45–08:15 PT, up to 11:45–12:15 PT) where price tends to consolidate, sweep liquidity, or form key structures like Fair Value Gaps (FVGs). These periods set the stage for the session's directional bias.
The indicator styles candles within these windows using a user-defined color for wicks, borders, and bodies (translucent for visibility). This visual emphasis helps traders focus on activity inside macros, where reversals or continuations often originate.
Borders are drawn as vertical lines at the start and end of each window (with a +5 minute buffer to capture related activity), using a dotted style by default. This creates a "study zone" that encapsulates macro events, allowing traders to assess if price is respecting or violating these zones in alignment with broader ICT models like the Power of 3 (AMD cycle).
Toggle: "Macro Candles Enabled" (default: true) – Turn off to disable styling and borders if focusing solely on signals.
CISD or IFVG Signals (Selectable Mode):
Mode Selection: Choose between "Change in the State of Delivery" (CISD) or "IFVG" (default: IFVG). Both detect shifts in market delivery during specific 30-minute slices (15–45 or 17–45 minutes past the hour in PT sessions).
CISD Mode: Based on ICT's definition of a sudden directional shift, this identifies aggressive displacements after sweeping recent highs/lows. It uses a rolling reference high/low over 6 bars, checks for sweeps (penetrating by at least 2 ticks in the last 2-3 bars), reclamation (closing beyond the reference with at least 50% body), and displacement (50% of prior range or an immediate FVG of 6+ ticks). Signals plot a horizontal line from the close, extending 24 bars right, labeled "CISD."
IFVG Mode: Focuses on Inverted Fair Value Gaps, where a bullish FVG (low > high by 13+ ticks) forms but is inverted (closed below) in the same slice, signaling bearish intent (or vice versa). This targets violations against opposing liquidity, often leading to raids on external ranges. Signals plot similarly, labeled "IFVG."
Shared Logic: Both modes enforce a 55-bar cooldown to prevent clustering, operate only during PT sessions (06:30–13:00), and use tick-based thresholds for precision across instruments. The integration with macros allows traders to see if signals occur within or at the edges of macro windows, enhancing confirmation—for example, a CISD inside a macro might indicate a manipulated reversal toward the session's true objective.
Toggle: "Signals Enabled" (default: true) – Turn off to hide all signal lines and labels, isolating the macro visualization.
How Components Interact:
Macro windows provide the "narrative context" (consolidation/manipulation), while CISD/IFVG signals detect the "delivery shift" (displacement). Together, they form a mashup that justifies publication: isolated signals can be noisy, but when filtered by macro periods, they align with ICT's session model. For instance, an IFVG inversion during a macro might confirm a liquidity sweep before targeting PD arrays or order blocks.
No external dependencies; all calculations are self-contained using Pine's built-in functions like ta.highest/lowest for references and time-based sessions for windows.
Usage Guidelines:
Apply to intraday charts (e.g., 1-5 min) or stocks during PT hours.
Look for confluence: A bull IFVG signal post-macro low sweep might target the next macro high or daily bias.
Customize colors/styles for signals (solid/dashed/dotted lines) and macros to suit your chart.
Backtest in replay mode to observe how macros frame signals—e.g., price often respects macro borders as S/R.
Limitations: Timezone-fixed to PT (America/Los_Angeles); signals are directional hints, not trade entries. Combine with ICT tools like order blocks or liquidity pools for full setups.
This script draws from community ICT implementations but refines them into a single, purpose-built tool for macro-driven trading, reducing chart clutter while emphasizing interconnected concepts. Feedback welcome!
Midnight Range Standard DeviationsCredit to Lex Fx for the basic framework of this script
This indicator is designed to assist traders in identifying potential trading opportunities based on the Intraday Concurrency Technique (ICT) concepts, specifically the midnight range deviations and their relationship to Fibonacci levels. It builds upon the work of Lex-FX, whom we gratefully acknowledge for the original concept and inspiration for this indicator.
Core Concept: ICT Midnight Range
The core of this indicator revolves around the concept of the midnight range. According to ICT, the high and low formed in a specific time window (typically the first 30 minutes after midnight, New York Time) can serve as a key reference point for intraday price action. The indicator identifies this range and projects potential support and resistance levels based on deviations from this range, combined with Fibonacci ratios.
How ICT Uses Midnight Range Deviations
ICT methodology often involves looking for price to move away from the initial midnight range, then return to it, or deviate beyond it, as key areas for potential entries.
Range Identification: The indicator automatically identifies the high and low of the midnight range (00:00 - 00:30 NY Time).
Deviation Levels: The indicator calculates and displays deviation levels based on multiples of the initial midnight range. These levels are often used to identify potential areas of support and resistance, as well as potential targets for price movement. These levels can be set in the additional fib levels section, which can be configured in increments of .5 deviations all the way up to 12 deviations.
Fibonacci Confluence: ICT often emphasizes the confluence of multiple factors. This indicator adds Fibonacci levels to the midnight range deviations. This allows traders to identify areas where Fibonacci retracements or extensions align with the deviation levels, potentially creating stronger areas of support or resistance.
Looking for Sweeps: ICT often uses these levels to look for times that the high and low are swept as potential areas of liquidity, indicating the start of potential continuations.
Time-Based Analysis: The time at which price interacts with these levels can also be significant in ICT. The indicator provides options to extend the range lines to specific times (e.g., 3 hours, 6 hours, 10 hours, 12 hours, or a custom defined time) after midnight, allowing traders to focus on specific periods of the trading day.
Indicator Settings Explained:
Time Zone (TZ): Defines the time zone used for calculating the midnight range. The default is "America/New_York".
Range High Color, Range Low Color, Range Mid Color: Customize the colors of the high, low, and mid-range lines.
Range Fill Color: Sets the fill color for the area between the range high and low.
Line Style: Choose the style of the range lines (solid, dashed, dotted).
Range Line Thickness: Adjust the thickness of the range lines for better visibility.
Show Fibonacci Levels: Enable or disable the display of Fibonacci deviation levels.
Fib Up Color, Fib Down Color: Customize the colors of the Fibonacci levels above (up) and below (down) the midnight range.
Show Trendline: Enables a trendline that plots the close price, colored according to whether the price is above the high, below the low, or within the midnight range.
Show Range Lines, Show Range Labels: Toggles the visibility of the range lines and their associated labels.
Label Size: Adjust the size of the labels for better readability.
Hide Prices: Option to display only the deviation values on labels, hiding price values.
Place Fibonacci Labels on Left Side: Option to switch label position from right side to left side.
Extend Range To (Hours from Midnight): This section gives you a wide variety of options on how far you want to extend the range to, you can do 3,6,10,12, and 23 hours. Alternatively, you can select the "Use Custom Length" and set a specific time in hours.
Additional Fib Levels: This section allows the trader to set additional deviation points in increments of .5 deviations from .5 all the way up to 12 deviations
TradingView Community Guidelines Compliance:
This indicator description adheres to the TradingView community guidelines by:
Being educational: It explains the ICT methodology and how the indicator can be used in trading.
Being transparent: It clearly describes all the indicator's settings and their purpose.
Providing credit: It acknowledges Lex-FX as the original author of the concept.
Avoiding misleading claims: It does not guarantee profits or imply that the indicator is a "holy grail."
Disclaimer: Usage of this indicator and the information provided is at your own risk. The author is not responsible for any losses incurred as a result of using this indicator.
Important Considerations:
This indicator is intended for educational purposes and to assist in applying the ICT methodology.
It should not be used as a standalone trading system.
Always combine this indicator with other forms of technical analysis and risk management techniques.
Backtest thoroughly on your chosen market and timeframe before using in live trading.
Trading involves risk. Only trade with capital you can afford to lose.
Sunmool's Next Day Model FVG AlertNY Killzone FVG Alert - ICT Fair Value Gap Detection Indicator
This comprehensive Pine Script indicator is specifically designed for traders following ICT (Inner Circle Trader) methodology and Smart Money Concepts. The indicator automatically detects Fair Value Gaps (FVG) that occur during the New York Killzone session, providing real-time alerts when these critical market imbalances are identified.
Key Features:
🎯 Fair Value Gap Detection
Automatically identifies bullish and bearish Fair Value Gaps using the classic 3-candle pattern
Filters gaps based on customizable minimum size thresholds to avoid insignificant imbalances
Provides visual representation through colored boxes and labels for easy identification
⏰ New York Killzone Focus
Specifically monitors the NY Killzone session (default: 7:00 AM - 10:00 AM EST)
Fully customizable session times to accommodate different trading preferences
Only detects FVGs when all three candles forming the gap occur within the killzone timeframe
📅 ICT Next Day Model Compliance
Automatically excludes Mondays from FVG detection as per ICT Next Day Model principles
Optional Monday exclusion can be toggled on/off based on trading strategy
Ensures alignment with professional ICT trading methodologies
🔔 Advanced Alert System
Three distinct alert conditions: Bullish FVG, Bearish FVG, and Combined alerts
Customizable alert messages for different notification preferences
Compatible with TradingView's full alert system including email, SMS, and webhook notifications
🎨 Visual Customization
Adjustable colors for bullish and bearish FVG boxes
Configurable box extension length for better visualization
Optional background highlighting during killzone sessions
Clean, professional chart presentation that doesn't clutter your analysis
📊 Technical Specifications
Works on all timeframes, though most effective on intraday charts (1m, 5m, 15m)
Timezone-aware calculations ensure accurate session detection globally
Efficient code structure minimizes processing load and chart lag
Compatible with other indicators and doesn't interfere with existing chart setups
🎯 Ideal For:
ICT methodology traders seeking automated FVG detection
Smart Money Concepts practitioners
Scalpers and day traders focusing on NY session
Traders looking to identify high-probability entry zones
Anyone interested in market structure and liquidity concepts
📈 Trading Applications:
Fair Value Gaps often serve as areas where price may return to "fill" the imbalance, making them excellent zones for:
Potential reversal areas
Take profit targets
Stop loss placement reference points
Market structure analysis
Confluence with other ICT concepts
⚙️ Customizable Parameters:
FVG minimum size filter
Killzone session start/end times
Visual display options
Alert preferences
Color schemes and styling options
This indicator brings institutional trading concepts to retail traders, helping identify the same market inefficiencies that smart money targets. By focusing specifically on the New York Killzone - one of the most liquid and volatile trading sessions - it provides high-quality signals during optimal market conditions.
Whether you're new to ICT concepts or an experienced trader looking to automate your FVG detection, this indicator provides the precision and reliability needed for professional trading analysis.
IME's Community First Presented FVGsIME's Community First Presented FVGs v1.5 - Advanced Implementation
ORIGINALITY & INNOVATION
This indicator advances beyond basic Fair Value Gap detection by implementing a sophisticated 24-hour FVG lifecycle management system aligned with institutional trading patterns. While many FVG indicators simply detect gaps and extend them indefinitely, this implementation introduces temporal intelligence that mirrors how institutional algorithms actually manage these inefficiencies.
Key Innovations that set this apart:
- 24-Hour Lifecycle Management: FVGs extend dynamically until 16:59, then freeze until removal at 17:00 next day
- Institutional Day Alignment: Recognizes 18:00-16:59 trading cycles vs standard calendar days
- Multi-Session Detection: Simultaneous monitoring of Midnight, London, NY AM, and NY PM sessions
- Advanced Classification System: A.FVG detection with volume imbalance analysis vs classic FVG patterns
- Volatility Settlement Logic: Blocks contamination from opening mechanics (3:01+, 0:01+, 13:31+ rules)
- Visual Enhancement System: C.E. lines, contamination warnings, dark mode support with proper transparency handling
BASED ON ICT CONCEPTS
This indicator implements First Presented Fair Value Gap methodology taught by ICT (Inner Circle Trader). The original F.P. FVG concepts, timing rules, and session-based detection are credited to ICT's educational material. This implementation extends those foundational concepts with advanced lifecycle management and institutional alignment features.
ICT's Core F.P. FVG Rules Implemented:
- First clean FVG after session opening (avoids opening contamination)
- 3-candle pattern requirement for valid detection
- Session-specific timing windows and volatility settlement
- Consequent Encroachment level identification
IME's Advanced Enhancements:
- Automated lifecycle management with institutional day recognition
- Multi-session simultaneous monitoring with proper isolation
- Advanced visual system with transparency states for aged FVGs
- A.FVG classification with volume imbalance detection algorithms
HOW IT WORKS
Core Detection Engine
The indicator monitors four key institutional sessions using precise timing windows:
- Midnight Session: 00:01-00:30 (blocks 00:00 contamination)
- London Session: 03:01-03:30 (blocks 03:00 contamination)
- NY AM Session: 09:30-10:00 (configurable 9:30 detection)
- NY PM Session: 13:31-14:00 (blocks 13:30 contamination)
During each session window, the algorithm scans for the first valid FVG pattern using ICT's 3-candle rule while applying volatility settlement principles to avoid false signals from opening mechanics.
Advanced Classification System
Classic FVG Detection:
Standard 3-candle wick-to-wick gap where candle 1 and 3 don't overlap, creating an inefficiency that institutions must eventually fill.
A.FVG (Advanced FVG) Detection:
Enhanced pattern recognition that includes volume imbalance analysis (deadpool detection) to identify more significant institutional inefficiencies. A.FVGs incorporate both the basic gap plus additional price imbalances between candle bodies, creating larger, more significant levels.
24-Hour Lifecycle Management
Phase 1 - Dynamic Extension (Creation Day):
From detection until 16:59 of creation day, FVGs extend in real-time as new bars form, maintaining their relevance as potential support/resistance levels.
Phase 2 - Freeze Period (Next Day):
At 16:59, FVGs stop extending and "freeze" at their final size, remaining visible as reference levels but no longer growing. This prevents outdated levels from contaminating fresh analysis.
Phase 3 - Cleanup (17:00 Next Day):
Exactly 24+ hours after creation, FVGs are automatically removed to maintain chart clarity. This timing aligns with institutional trading cycle completion.
Institutional Day Logic
The algorithm recognizes that institutional trading days run from 18:00-16:59 (not midnight-midnight). This alignment ensures FVGs are managed according to institutional timeframes rather than arbitrary calendar boundaries.
Contamination Avoidance System
Volatility Settlement Principle:
Opening mechanics create artificial volatility that can produce false FVG signals. The indicator automatically blocks detection during exact session opening times (X:00) and requires settlement time (X:01+) before identifying clean institutional inefficiencies.
Special NY AM Handling:
Provides configurable 9:30 detection for advanced users who want to capture potential opening range FVGs, with clear visual warnings about contamination risk.
VISUAL SYSTEM
Color Intelligence
- Current Day FVGs: Full opacity with session-specific colors
- Previous Day FVGs: 70% transparency for historical reference
- Special Timing (9:30): Dedicated warning color with alert labels
- Dark Mode Support: Automatic text/line color adaptation
Enhanced Visual Elements
C.E. (Consequent Encroachment) Lines:
Automatically calculated 50% levels within each FVG, representing the most likely fill point based on institutional behavior patterns. These levels extend and freeze with their parent FVG.
Contamination Warnings:
Visual alerts when FVGs are detected during potentially contaminated timing, helping traders understand signal quality.
Session Identification:
Clear labeling system showing FVG type (FVG/A.FVG), session origin (NY AM, London, etc.), and creation date for easy reference.
HOW TO USE
Basic Setup
1. Session Selection: Enable/disable specific sessions based on your trading strategy
2. FVG Type: Choose between Classic FVGs or A.FVGs depending on your analysis preference
3. Visual Preferences: Adjust colors, text size, and enable dark mode if needed
Trading Applications
Intraday Reference Levels:
Use current day FVGs as potential support/resistance for price action analysis. The dynamic extension ensures levels remain relevant throughout the trading session.
Multi-Session Analysis:
Monitor how price interacts with FVGs from different sessions to understand institutional flow and market structure.
C.E. Level Trading:
Focus on the 50% consequent encroachment levels for high-probability entry points when price approaches FVG zones.
Historical Context:
Previous day FVGs (shown with transparency) provide context for understanding market structure evolution across multiple trading days.
Advanced Features
9:30 Special Detection:
For experienced traders, enable 9:30 FVG detection to capture opening range inefficiencies, but understand the contamination risks indicated by warning labels.
A.FVG vs Classic Toggle:
Switch between detection modes based on market conditions - A.FVGs for trending environments, Classic FVGs for ranging conditions.
Best Practices
- Use on 1-minute to 15-minute timeframes for optimal session detection
- Combine with other institutional concepts (order blocks, liquidity levels) for comprehensive analysis
- Pay attention to transparency states - current day FVGs are more actionable than previous day references
- Consider C.E. levels as primary targets rather than full FVG fills
TECHNICAL SPECIFICATIONS
Platform: Pine Script v6 for optimal performance and reliability
Timeframe Compatibility: All timeframes (optimized for 1M-15M)
Market Compatibility: 24-hour markets (Forex, Crypto, Futures)
Session Management: Automatic trading day detection with weekend handling
Memory Management: Intelligent capacity limits with automatic cleanup
Performance: Optimized algorithms for smooth real-time operation
CLOSED SOURCE JUSTIFICATION
This indicator is published as closed source to protect the proprietary algorithms that enable:
- Precise 24-hour lifecycle timing calculations with institutional day alignment
- Advanced A.FVG classification with sophisticated volume imbalance detection
- Complex multi-session coordination with contamination filtering
- Optimized memory management preventing performance degradation
- Specialized visual state management for transparency and extension logic
The combination of these advanced systems creates a unique implementation that goes far beyond basic FVG detection, warranting protection of the underlying computational methods while providing full transparency about functionality and usage.
PERFORMANCE CHARACTERISTICS
Real-Time Operation: Smooth performance with minimal resource usage
Accuracy: Precise session detection with timezone consistency
Reliability: Robust error handling and edge case management
Scalability: Supports multiple simultaneous FVGs without performance impact
This advanced implementation represents significant evolution beyond basic FVG indicators, providing institutional-grade analysis tools for serious traders while maintaining the clean visual presentation essential for effective technical analysis.
IMPORTANT DISCLAIMERS
Past performance does not guarantee future results. This indicator is an educational tool based on ICT's Fair Value Gap concepts and should be used as part of a comprehensive trading strategy. Users should understand the risks involved in trading and consider their risk tolerance before making trading decisions. The indicator identifies potential support/resistance levels but does not predict market direction with certainty.
2 days ago
Release Notes
IME's Community First Presented FVGs v1.5.2 - Critical Bug Fixes
Bug Fixes:
v1.5.1 - Fixed 9:30 Contamination Blocking:
Issue: When 9:30 detection toggle was OFF, script still detected 9:30 candles as F.P. FVGs
Fix: Added proper contamination blocking logic that prevents 9:30 middle candle detection when toggle is OFF
Result: Toggle OFF now correctly shows clean F.P. FVGs at 9:31+ (proper ICT volatility settlement)
v1.5.2 - Fixed A.FVG Box Calculation Accuracy:
Issue: A.FVG boxes incorrectly included ALL body levels even when no actual deadpool existed between specific candles
Fix: Implemented selective body level inclusion - only adds body prices where actual volume imbalances exist
Result: A.FVG boxes now accurately represent only areas with real institutional volume imbalances
Impact:
More Accurate Detection: 9:30 contamination properly blocked when disabled
Precise A.FVG Zones: Boxes only include levels with actual deadpools/volume imbalances
Institutional Accuracy: Both fixes align detection with true institutional trading principles
Technical Details:
Enhanced contamination blocking checks middle candle timing in normal mode
A.FVG calculation now selectively includes body levels based on individual deadpool existence
Maintains backward compatibility with all existing features and settings
These fixes ensure the indicator provides institutionally accurate FVG detection and sizing for professional trading analysis.
Custom V2 KillZone US / FVG / EMAThis indicator is designed for traders looking to analyze liquidity levels, opportunity zones, and the underlying trend across different trading sessions. Inspired by the ICT methodology, this tool combines analysis of Exponential Moving Averages (EMA), session management, and Fair Value Gap (FVG) detection to provide a structured and disciplined approach to trading effectively.
Indicator Features
Identifying the Underlying Trend with Two EMAs
The indicator uses two EMAs on different, customizable timeframes to define the underlying trend:
EMA1 (default set to a daily timeframe): Represents the primary underlying trend.
EMA2 (default set to a 4-hour timeframe): Helps identify secondary corrections or impulses within the main trend.
These two EMAs allow traders to stay aligned with the market trend by prioritizing trades in the direction of the moving averages. For example, if prices are above both EMAs, the trend is bullish, and long trades are favored.
Analysis of Market Sessions
The indicator divides the day into key trading sessions:
Asian Session
London Session
US Pre-Open Session
Liquidity Kill Session
US Kill Zone Session
Each session is represented by high and low zones as well as mid-lines, allowing traders to visualize liquidity levels reached during these periods. Tracking the price levels in different sessions helps determine whether liquidity levels have been "swept" (taken) or not, which is essential for ICT methodology.
Liquidity Signal ("OK" or "STOP")
A specific signal appears at the end of the "Liquidity Kill" session (just before the "US Kill Zone" session):
"OK" Signal: Indicates that liquidity conditions are favorable for trading the "US Kill Zone" session. This means that liquidity levels have been swept in previous sessions (Asian, London, US Pre-Open), and the market is ready for an opportunity.
"STOP" Signal: Indicates that it is not favorable to trade the "US Kill Zone" session, as certain liquidity conditions have not been met.
The "OK" or "STOP" signal is based on an analysis of the high and low levels from previous sessions, allowing traders to ensure that significant liquidity zones have been reached before considering positions in the "Kill Zone".
Detection of Fair Value Gaps (FVG) in the US Kill Zone Session
When an "OK" signal is displayed, the indicator identifies Fair Value Gaps (FVG) during the "US Kill Zone" session. These FVGs are areas where price may return to fill an "imbalance" in the market, making them potential entry points.
Bullish FVG: Detected when there is a bullish imbalance, providing a buying opportunity if conditions align with the underlying trend.
Bearish FVG: Detected when there is a bearish imbalance, providing a selling opportunity in the trend direction.
FVG detection aligns with the ICT Silver Bullet methodology, where these imbalance zones serve as probable entry points during the "US Kill Zone".
How to Use This Indicator
Check the Underlying Trend
Before trading, observe the two EMAs (daily and 4-hour) to understand the general market trend. Trades will be prioritized in the direction indicated by these EMAs.
Monitor Liquidity Signals After the Asian, London, and US Pre-Open Sessions
The high and low levels of each session help determine if liquidity has already been swept in these areas. At the end of the "Liquidity Kill" session, an "OK" or "STOP" label will appear:
"OK" means you can look for trading opportunities in the "US Kill Zone" session.
"STOP" means it is preferable not to take trades in the "US Kill Zone" session.
Look for Opportunities in the US Kill Zone if the Signal is "OK"
When the "OK" label is present, focus on the "US Kill Zone" session. Use the Fair Value Gaps (FVG) as potential entry points for trades based on the ICT methodology. The identified FVGs will appear as colored boxes (bullish or bearish) during this session.
Use ICT Methodology to Manage Your Trades
Follow the FVGs as potential reversal zones in the direction of the trend, and manage your positions according to your personal strategy and the rules of the ICT Silver Bullet method.
Customizable Settings
The indicator includes several customization options to suit the trader's preferences:
EMA: Length, source (close, open, etc.), and timeframe.
Market Sessions: Ability to enable or disable each session, with color and line width settings.
Liquidity Signals: Customization of colors for the "OK" and "STOP" labels.
FVG: Option to display FVGs or not, with customizable colors for bullish and bearish FVGs, and the number of bars for FVG extension.
-------------------------------------------------------------------------------------------------------------
Cet indicateur est conçu pour les traders souhaitant analyser les niveaux de liquidité, les zones d’opportunité, et la tendance de fond à travers différentes sessions de trading. Inspiré de la méthodologie ICT, cet outil combine l'analyse des moyennes mobiles exponentielles (EMA), la gestion des sessions de marché, et la détection des Fair Value Gaps (FVG), afin de fournir une approche structurée et disciplinée pour trader efficacement.
Killzones High/Low [FD] - ITADESCRIPTION ENGLISH - ITALIAN
Killzones High/Low - ITA - Indicator Description
Advanced Pine Script v5 indicator designed for ICT (Inner Circle Trader) strategies that identifies trading killzones, key support/resistance levels and midnight prices with granular controls for every element.
SETTINGS
General controls that affect all indicator elements:
Session Drawings Limit (1): Determines how many historical sessions to keep on chart for each element type. Higher values show more history but may slow performance
Timeframe Limit (30): Drawings disappear on timeframes equal or higher to avoid visual overload
Time Zone: Select reference timezone for sessions. America/New_York automatically adjusts for daylight saving, GMT options are fixed
Label Size: Controls global size of all labels (from Tiny to Huge)
Drawings Cutoff Time: Stops extension of all pivots at specified time (useful for end of trading day)
KILLZONES
Manages critical trading sessions with colored boxes and pivot lines:
General Controls
Show Boxes/Text: Enables visualization and texts in session boxes
Transparency: Controls opacity of boxes and text (0=opaque, 100=transparent)
Available Sessions
Five configurable sessions with individual controls for enabling, custom text, times and colors:
Asia (18:00-00:00): Blue by default
London (02:30-05:30): Red by default
N.Y. AM (07:00-11:30): Green by default
Lunch (11:30-13:00): Golden yellow, enabled by default
N.Y. PM (13:00-16:00): Purple by default
PDH / PDL
Manages Previous Day High and Previous Day Low levels:
Show PDH/PDL: Enables previous day's maximum/minimum
Extension: "Until Mitigation" (stops when broken) or "Most Recent Candle" (continues always)
Colors/Thickness: Visual customization of lines (dark purple by default, 1px thickness)
Labels: Shows "PDH"/"PDL" texts with customizable color (white by default)
PWH / PWL
Manages Previous Week High and Previous Week Low levels:
Show PWH/PWL: Enables previous week's maximum/minimum
Extension: Independent control of line extension
Colors/Thickness: Orange by default for both, 2px thickness
Labels: Configurable "PWH"/"PWL" texts
PMH / PML
Manages Previous Month High and Previous Month Low levels:
Show PMH/PML: Enables previous month's maximum/minimum using security()
Extension: Independent control like other systems
Colors/Thickness: Blue by default for both, 1px thickness
Labels: Customizable "PMH"/"PML" texts
MIDNIGHT PRICE LEVEL
Advanced system for multiple midnight prices:
Base Controls
Show Midnight Price: Enables line at pre-00:00 closing price (ICT strategy)
Midnight -2/-3 Days: Extends system to 2 and 3 days prior
Extension/Mitigation: "Until Mitigation" or "Most Recent Candle" with "Once" or "Multiple" mode
Customization
Separate Colors: D-1, D-2, D-3 with progressive transparency (gold by default)
Style/Thickness: Customizable lines (Solid, Dotted, Dashed)
Labels: Configurable texts (🌙1, 🌙2, 🌙3) with customizable background/text colors
Alerts: Alerts when mitigated during active killzones
KILLZONE LEVEL
Controls pivot lines and killzone labels:
Line Controls
Show Lines: Enables horizontal lines on killzone highs/lows
Break Alerts: Alerts when pivots are exceeded
Midpoints: Dashed lines at range center with stop option after mitigation
Label Offset: Moves labels ahead by 5 candles (0-20 configurable), rejoining when mitigated
Label Controls
Text Customization: Configurable labels for each session (Asia_H/L, London_H/L, etc.)
Background/Colors: Transparent or visible labels with customizable colors
Broken Labels: Additional text (❌ by default) and special colors when pivots mitigated
Extension: "Until Mitigation" or "Beyond Mitigation" with session filter ("Most Recent" or "All")
LABEL STYLES
Four dedicated sections to customize label graphic shapes:
Killzone Line Label Styles: Separate controls for killzone High/Low
PDH/PDL Label Styles: Customizable shapes for Previous Day levels
PWH/PWL Label Styles: Customizable shapes for Previous Week levels
PMH/PML Label Styles: Customizable shapes for Previous Month levels
Each section offers 15+ shape options (Arrows, Center, Circle, Square, Diamond, Triangles, Crosses, Flags, etc.)
MIDNIGHT LINES
System for vertical lines at 00:00:
Show Lines/Labels: Vertical lines with upward arrow labels
Customization: Color (gray by default), style, thickness of vertical lines
Labels: Configurable text ("00:00" by default) with customizable text color (black by default)
Label Offset: Percentage control (-10000% to +10000%) for vertical positioning
Extension: Configurable directions (None, Above, Below, Both)
Limit: Maximum number of lines maintained (4 by default, max 50)
The indicator offers granular control over every visual and functional aspect, making it possible to adapt it to any ICT trading strategy or personal setup.
---ITALIANO---
Killzones High/L ow - ITA
Indicatore avanzato per Pine Script v5 progettato per strategie ICT (Inner Circle Trader) che identifica killzones di trading, livelli chiave di supporto/resistenza e prezzi di mezzanotte con controlli granulari per ogni elemento.
IMPOSTAZIONI
Controlli generali che influenzano tutti gli elementi dell'indicatore:
-Limite Disegni Sessione (1): Determina quante sessioni storiche mantenere sul grafico per ogni tipo di elemento. Valori più alti mostrano più cronologia ma possono rallentare le prestazioni
-Limite Timeframe (30): I disegni scompaiono su timeframe uguali o superiori per evitare sovraccarico visivo
-Fuso Orario: Seleziona il fuso di riferimento per le sessioni. America/New_York si regola automaticamente per l'ora legale, le opzioni GMT sono fisse
-Dimensione Etichette: Controlla la dimensione globale di tutte le etichette (da Minuscola a Enorme)
-Orario Limite Disegni: Ferma l'estensione di tutti i pivot all'orario specificato (utile per fine giornata di trading)
KILLZONES
Gestisce le sessioni di trading critiche con riquadri colorati e linee pivot:
Controlli Generali
-Mostra Riquadri/Testo: Abilita visualizzazione e testi nei riquadri delle sessioni
-Trasparenza: Controlla opacità di riquadri e testo (0=opaco, 100=trasparente)
Sessioni Disponibili
Cinque sessioni configurabili con controlli individuali per abilitazione, testo personalizzato, orari e colori:
Asia (18:00-00:00): Blu di default
London (02:30-05:30): Rosso di default
N.Y. AM (07:00-11:30): Verde di default
Lunch (11:30-13:00): Giallo dorato, abilitata di default
N.Y. PM (13:00-16:00): Viola di default
PDH / PDL
Gestisce i livelli Previous Day High e Previous Day Low:
-Mostra PDH/PDL: Abilita massimo/minimo del giorno precedente
-Estensione: "Fino a Mitigazione" (si ferma quando rotto) o "Candela Più Recente" (continua sempre)
-Colori/Spessore: Personalizzazione visiva delle linee (viola scuro di default, spessore 1px)
-Etichette: Mostra testi "PDH"/"PDL" con colore personalizzabile (bianco di default)
PWH / PWL
Gestisce i livelli Previous Week High e Previous Week Low:
-Mostra PWH/PWL: Abilita massimo/minimo della settimana precedente
-Estensione: Controllo indipendente dell'estensione delle linee
-Colori/Spessore: Arancione di default per entrambi, spessore 2px
-Etichette: Testi "PWH"/"PWL" configurabili
PMH / PML
Gestisce i livelli Previous Month High e Previous Month Low:
-Mostra PMH/PML: Abilita massimo/minimo del mese precedente utilizzando security()
-Estensione: Controllo indipendente come gli altri sistemi
-Colori/Spessore: Blu di default per entrambi, spessore 1px
-Etichette: Testi "PMH"/"PML" personalizzabili
MIDNIGHT PRICE LEVEL
Sistema avanzato per prezzi di mezzanotte multipli:
Controlli Base
-Mostra Midnight Price: Abilita linea al prezzo di chiusura pre-00:00 (strategia ICT)
-Midnight -2/-3 Giorni: Estende il sistema a 2 e 3 giorni precedenti
-Estensione/Mitigazione: "Fino a Mitigazione" o "Candela Più Recente" con modalità "Una Volta" o "Multipla"
Personalizzazione
-Colori separati: D-1, D-2, D-3 con trasparenza progressiva (giallo oro di default)
-Stile/Spessore: Linee personalizzabili (Solida, Punteggiata, Tratteggiata)
-Etichette: Testi configurabili (🌙1, 🌙2, 🌙3) con colori sfondo/testo personalizzabili
-Avvisi: Alert quando mitigati durante killzones attive
KILLZONE LEVEL
Controlla linee pivot e etichette delle killzones:
Controlli Linee
-Mostra Linee: Abilita linee orizzontali sui massimi/minimi delle killzones
-Avvisi Rottura: Alert quando pivot vengono superati
-Punti Medi: Linee tratteggiate al centro del range con opzione di stop dopo mitigazione
-Offset Etichette: Sposta etichette avanti di 5 candele (0-20 configurabile), ricongiungendole quando mitigate
Controlli Etichette
-Personalizzazione Testi: Etichette configurabili per ogni sessione (Asia_H/L, London_H/L, ecc.)
-Sfondo/Colori: Etichette trasparenti o visibili con colori personalizzabili
-Etichette Rotte: Testo aggiuntivo (❌ di default) e colori speciali quando pivot mitigati
-Estensione: "Fino a Mitigazione" o "Oltre Mitigazione" con filtro sessioni ("Più Recente" o "Tutte")
STILI ETICHETTE
Tre sezioni dedicate per personalizzare la forma grafica delle etichette:
-Stili Etichette Linee Killzones: Controlli separati per High/Low delle killzones
-Stili Etichette PDH/PDL: Forme personalizzabili per Previous Day levels
-Stili Etichette PWH/PWL: Forme personalizzabili per Previous Week levels
-Stili Etichette PMH/PML: Forme personalizzabili per Previous Month levels
Ogni sezione offre 15+ opzioni di forma (Frecce, Centro, Cerchio, Quadrato, Diamante, Triangoli, Croci, Bandiere, ecc.)
LINEE MEZZANOTTE
Sistema per linee verticali alle ore 00:00:
-Mostra Linee/Etichette: Linee verticali con etichette freccia verso l'alto
-Personalizzazione: Colore (grigio di default), stile, spessore delle linee verticali
-Etichette: Testo configurabile ("00:00" di default) con colore testo personalizzabile (nero di default)
-Offset Etichette: Controllo percentuale (-10000% a +10000%) per posizionamento verticale
-Estensione: Direzioni configurabili (Nessuna, Sopra, Sotto, Entrambe)
-Limite: Numero massimo linee mantenute (4 di default, max 50)
L'indicatore offre controllo granulare su ogni aspetto visivo e funzionale, rendendo possibile adattarlo a qualsiasi strategia di trading ICT o setup personale.
[TA] Breaker BlocksDescription:
The Breaker Blocks Finder is a sophisticated tool designed for traders who seek to identify key market structures algorithmically. This indicator meticulously scans for both bullish and bearish breaker blocks, visually delineating them on the chart for easy identification.
Exploring ICT Breaker Blocks: Enhancing Your Trading with Precision
Understanding ICT Breaker Blocks: ICT Breaker Blocks are a nuanced trading concept that leverages market liquidity and manipulation to identify potential breakout points. This strategy is particularly effective in pinpointing moments where the market is poised for a significant directional move.
Mechanics of ICT Breaker Blocks: The essence of this strategy lies in detecting manipulation phases where liquidity is being accumulated, typically around critical market highs or lows. This setup leads to a Stop Hunt, a tactical move to trigger stop orders and fuel a breakout in the opposite direction.
Detailed Breakdown of Breaker Block Types:
Bullish Breaker Blocks:
• Bullish Order Block: The precursor to a bullish breakout, setting the stage for a potential upward move.
• Bullish Breaker Candle: An upward-closing candle that forms just before breaking past an old low, signaling a bullish reversal.
• Confirmation: Achieved when the price dips below the prior low and subsequently rises above the high of the swing, solidifying the bullish breakout.
• Identification: Look for a failed bearish order block, indicated by an initial drop in prices that ultimately reverses, hinting at a bullish shift.
• Key Elements: Monitor the pattern of lows and highs (low, high, lower low, higher high), which suggests an emerging bullish trend.
Bearish Breaker Blocks:
• Bearish Breaker Candle: A downward-closing candle that appears right before an old high is surpassed, indicating a bearish reversal.
• Confirmation: Occurs when prices climb above the previous high and then descend below the swing's low, confirming the bearish move.
• Identification: Initiate by identifying a failed bullish order block, where initial upward price momentum falters and reverses, signaling bearish potential.
• Key Elements: Focus on the sequence of highs and lows (high, low, higher high, lower low), which may denote a looming bearish trend.
Spotting High Probability Breaker Blocks: To enhance the reliability of breaker block identification, incorporate patterns that exhibit a Fair Value Gap (FVG), which typically indicates a stronger likelihood of a successful breakout.
Leveraging ICT Breaker Blocks in Trading: Our Inner Circle Trading mentorship delves into these concepts and more, providing you with comprehensive education and weekly market insights.
By mastering ICT Breaker Blocks, you're equipped with a powerful tool to navigate the intricacies of the market, making informed and strategic trading decisions.
This channel provides you with comprehensive education and weekly market insights. If you enjoyed this thread, like, share, and follow. Join us for an in-depth exploration of advanced trading strategies, and elevate your trading proficiency.
Still confused about Breaker Blocks?
Follow these steps for Bullish Breaker Blocks and reverse them for Bearish Breaker Blocks.
Think:
Bullish BB = Low, High, Lower Low, then Higher High
Bearish BB = High, Low, Higher High, then Lower Low
While this tool is a powerful addition to your trading strategy, it's important to note that it is not an autotrader. Traders should use this indicator as part of a comprehensive trading plan, considering other market factors and personal risk tolerance.
Risk Disclaimer:
Trading financial markets involves significant risk and can result in the loss of your invested capital. You should not invest more than you can afford to lose and should ensure that you fully understand the risks involved. Before trading, please take into consideration your level of experience, investment objectives, and seek independent financial advice if necessary. This indicator is provided as-is without any guarantees or warranty. Use of this indicator is at your own risk, and the creator is not responsible for any financial losses or damages.
Gold AI Smart Liquidity structure Signal SMC MA Title: Gold AI Smart Liquidity Signal SMC hull protected
Description:
Indicator Philosophy and Originality:
This indicator is not merely a collection of separate tools, but an integrated trading framework designed to improve decision-making by ensuring signal confluence. The core philosophy is that high-probability trading signals occur when multiple, distinct analysis methodologies align.
The originality of this script lies in how it systematically combines a leading signal (the Liquidity Breakout) with lagging confirmation tools (the Classic Filters and the Hull MA). A user can see a primary breakout signal and immediately validate its strength against the broader trend defined by the Hull MA and the specific conditions of the classic filters. This synergy, where different components work together to validate a single event, is the primary value and reason for this mashup. It provides a structured, multi-layered confirmation process within a single tool, which is not achievable by adding these indicators separately to the chart.
This indicator is a comprehensive technical analysis tool designed to identify potential trading opportunities and provide supplemental trend analysis. It features a primary signal engine based on pivot trendline breakouts, a sophisticated confirmation layer using classic technical indicators, and two separate modules for discretionary analysis: an ICT-based structure plotter and a highly customizable Hull Moving Average (HMA). This document provides a detailed, transparent explanation of all underlying logic.
1. Core Engine: Pivot-Based Liquidity Trendline Signals
The indicator's foundational signal is generated from a custom method we call "Liquidity Trendlines," which aims to identify potential shifts in momentum.
How It Works:
The script first identifies significant swing points in the price using the ta.pivothigh() and ta.pivotlow() functions.
It then draws a trendline connecting consecutive pivot points.
A "Liquidity Breakout" signal (liquidity_plup for buy, liquidity_pldn for sell) is generated when the price closes decisively across this trendline, forming the basis for a potential trade.
2. The Signal Confirmation Process: Multi-Layered Filtering System
A raw Liquidity Breakout signal is only a starting point. To enhance reliability, the signal must pass through a series of user-enabled filters. A final Buy or Sell signal is only plotted if all active filter conditions are met simultaneously.
General & Smart Trend Filters: Use a combination of EMAs, DMI (ADX), and market structure to define the trend. Signals must align with the trend to be valid.
RSI & MACD Filters: Used for momentum confirmation (e.g., MACD line must be above its signal line for a buy).
ATR (Volatility) Filter: Ensures trades are considered only when market volatility is sufficient.
Support & Resistance (S&R) Filter: Blocks signals forming too close to key S&R zones.
Higher Timeframe (HTF) Filter: Provides confluence by checking that the trend on higher timeframes aligns with the signal.
3. Visual Aid 1: ICT-Based Structure & Premium/Discount Zones
This module is for visual and discretionary analysis only and does not directly influence the automated Buy/Sell signals.
ICT Market Structure: Plots labels for Change of Character (CHoCH), Shift in Market Structure (SMS), and Break of Market Structure (BMS). This is based on a Donchian-channel-like logic that tracks the highest and lowest price over a user-defined period (ict_prd) to identify structural shifts.
ICT Premium & Discount Zones: When enabled, it draws colored zones on the chart corresponding to Premium, Discount, and Equilibrium levels, calculated from the range over the defined ICT period.
4. Visual Aid 2: Hull Moving Average (HMA) Integration
This is another independent tool for trend analysis, offering significant customization. It does not affect the primary Buy/Sell signals but has its own alerts and serves as a powerful visual confirmation layer.
Hull Variations: Users can choose between three types of Hull-style moving averages: HMA (Hull Moving Average), THMA (Triple Hull Moving Average), and EHMA (Exponential Hull Moving Average).
Customization: The length, source, and a length multiplier are fully adjustable. It can also be configured to display the Hull MA from a higher timeframe.
Visuals: The Hull MA can be displayed as a simple line or a colored band. The color can be set to change based on the Hull's slope, providing an at-a-glance view of the trend. This color can also be applied to the chart's candles.
Alerts: Separate alerts can be configured for when the Hull MA crosses over or under its delayed version (ta.crossover(MHULL, SHULL)), signaling a change in its momentum.
5. Risk Management & Additional Features
TP/SL Calculations: Automatically calculates Take Profit (TP) and Stop Loss (SL) levels for every valid signal based on the Average True Range (ATR).
Multi-Timeframe (MTF) Scanner: A dashboard that monitors and displays the final Buy/Sell signal status across multiple timeframes.
Session Filter & Alerts: Allows for restricting trades to specific market sessions and configuring alerts for any valid signal.
By combining breakout detection with a rigorous confirmation process and supplemental analysis tools, this indicator provides a structured and transparent approach to trading.
Separators & Liquidity [K]Separators & Liquidity
This indicator offers a unified visual framework for institutional price behaviour, combining calendar-based levels, intraday session liquidity, and opening price anchors. It is specifically designed for ICT-inspired traders who rely on time-of-day context, prior high/low sweeps, and mitigation dynamics to structure their trading decisions.
Previous Day, Week, and Month Highs/Lows
These levels are dynamically updated and optionally stop projecting forward once mitigated. Mitigation is defined as a confirmed price interaction (touch or break), and labels visually adjust upon confirmation.
Intraday Session Liquidity Zones
Includes:
Asia Session (18:00–02:30 EST)
London Session (02:00–07:00 EST)
New York AM Session (07:00–11:30 EST)
New York Lunch Session (11:30–13:00 EST)
Each session tracks its own high/low with mitigation logic and duplicate filtering to avoid plotting overlapping levels when values are identical to previous session or daily levels.
Opening Price Anchors
Plots key opens:
Midnight (00:00 EST) (Customizable)
New York Open (09:30 EST) (Customizable)
PM Session Open (13:30 EST) (Customizable)
Weekly Open
Monthly Open
These levels serve as orientation for daily range expansion/contraction and premium/discount analysis.
Time Labels
Includes weekday markers and mid-month labels for better visual navigation on intraday and higher timeframes.
All components feature user-defined controls for visibility, line extension, color, label size, and plotting style. Filtering logic prevents redundant lines and maintains chart clarity.
Originality and Justification
While elements such as daily highs/lows and session ranges exist in other indicators, this script combines them under a fully mitigation-aware, duplicate-filtering, and session-synchronized logic model. Each level is tracked and managed independently, but drawn cooperatively using a shared visual and behavioral control system.
This script is not a mashup but an integrated tool designed to support precise execution timing, market structure analysis, and liquidity-based interpretation within ICT-style trading frameworks.
This version does not reuse any code from open-source scripts, and no built-in indicators are merged. The logic is independently constructed for real-time tracking and multi-session visualization.
Inspiration
This tool is inspired by core ICT concepts and time-based session structures commonly discussed in educational content and the broader ICT community.
It also draws conceptual influence from the TFO Killzones & Pivots script by tradeforopp, particularly in the spirit of time-based liquidity tracking and institutional session segmentation. This script was developed independently but aligns in purpose. Full credit is given to TFO as an inspiration source, especially for traders using similar timing models.
Intended Audience
Designed for traders studying or applying:
ICT’s core market structure principles
Power of Three (PO3) setups
Session bias models (e.g., AM reversals, London continuations)
Liquidity sweep and mitigation analysis
Time-of-day-based confluence planning
The script provides structural levels—not signals—and is intended for visual scaffolding around discretionary execution strategies.
Price Action Analyst [OmegaTools]Price Action Analyst (PAA) is an advanced trading tool designed to assist traders in identifying key price action structures such as order blocks, market structure shifts, liquidity grabs, and imbalances. With its fully customizable settings, the script offers both novice and experienced traders insights into potential market movements by visually highlighting premium/discount zones, breakout signals, and significant price levels.
This script utilizes complex logic to determine significant price action patterns and provides dynamic tools to spot strong market trends, liquidity pools, and imbalances across different timeframes. It also integrates an internal backtesting function to evaluate win rates based on price interactions with supply and demand zones.
The script combines multiple analysis techniques, including market structure shifts, order block detection, fair value gaps (FVG), and ICT bias detection, to provide a comprehensive and holistic market view.
Key Features:
Order Block Detection: Automatically detects order blocks based on price action and strength analysis, highlighting potential support/resistance zones.
Market Structure Analysis: Tracks internal and external market structure changes with gradient color-coded visuals.
Liquidity Grabs & Breakouts: Detects potential liquidity grab and breakout areas with volume confirmation.
Fair Value Gaps (FVG): Identifies bullish and bearish FVGs based on historical price action and threshold calculations.
ICT Bias: Integrates ICT bias analysis, dynamically adjusting based on higher-timeframe analysis.
Supply and Demand Zones: Highlights supply and demand zones using customizable colors and thresholds, adjusting dynamically based on market conditions.
Trend Lines: Automatically draws trend lines based on significant price pivots, extending them dynamically over time.
Backtesting: Internal backtesting engine to calculate the win rate of signals generated within supply and demand zones.
Percentile-Based Pricing: Plots key percentile price levels to visualize premium, fair, and discount pricing zones.
High Customizability: Offers extensive user input options for adjusting zone detection, color schemes, and structure analysis.
User Guide:
Order Blocks: Order blocks are significant support or resistance zones where strong buyers or sellers previously entered the market. These zones are detected based on pivot points and engulfing price action. The strength of each block is determined by momentum, volume, and liquidity confirmations.
Demand Zones: Displayed in shades of blue based on their strength. The darker the color, the stronger the zone.
Supply Zones: Displayed in shades of red based on their strength. These zones highlight potential resistance areas.
The zones will dynamically extend as long as they remain valid. Users can set a maximum number of order blocks to be displayed.
Market Structure: Market structure is classified into internal and external shifts. A bullish or bearish market structure break (MSB) occurs when the price moves past a previous high or low. This script tracks these breaks and plots them using a gradient color scheme:
Internal Structure: Short-term market structure, highlighting smaller movements.
External Structure: Long-term market shifts, typically more significant.
Users can choose how they want the structure to be visualized through the "Market Structure" setting, choosing from different visual methods.
Liquidity Grabs: The script identifies liquidity grabs (false breakouts designed to trap traders) by monitoring price action around highs and lows of previous bars. These are represented by diamond shapes:
Liquidity Buy: Displayed below bars when a liquidity grab occurs near a low.
Liquidity Sell: Displayed above bars when a liquidity grab occurs near a high.
Breakouts: Breakouts are detected based on strong price momentum beyond key levels:
Breakout Buy: Triggered when the price closes above the highest point of the past 20 bars with confirmation from volume and range expansion.
Breakout Sell: Triggered when the price closes below the lowest point of the past 20 bars, again with volume and range confirmation.
Fair Value Gaps (FVG): Fair value gaps (FVGs) are periods where the price moves too quickly, leaving an unbalanced market condition. The script identifies these gaps:
Bullish FVG: When there is a gap between the low of two previous bars and the high of a recent bar.
Bearish FVG: When a gap occurs between the high of two previous bars and the low of the recent bar.
FVGs are color-coded and can be filtered by their size to focus on more significant gaps.
ICT Bias: The script integrates the ICT methodology by offering an auto-calculated higher-timeframe bias:
Long Bias: Suggests the market is in an uptrend based on higher timeframe analysis.
Short Bias: Indicates a downtrend.
Neutral Bias: Suggests no clear directional bias.
Trend Lines: Automatic trend lines are drawn based on significant pivot highs and lows. These lines will dynamically adjust based on price movement. Users can control the number of trend lines displayed and extend them over time to track developing trends.
Percentile Pricing: The script also plots the 25th percentile (discount zone), 75th percentile (premium zone), and a fair value price. This helps identify whether the current price is overbought (premium) or oversold (discount).
Customization:
Zone Strength Filter: Users can set a minimum strength threshold for order blocks to be displayed.
Color Customization: Users can choose colors for demand and supply zones, market structure, breakouts, and FVGs.
Dynamic Zone Management: The script allows zones to be deleted after a certain number of bars or dynamically adjusts zones based on recent price action.
Max Zone Count: Limits the number of supply and demand zones shown on the chart to maintain clarity.
Backtesting & Win Rate: The script includes a backtesting engine to calculate the percentage of respect on the interaction between price and demand/supply zones. Results are displayed in a table at the bottom of the chart, showing the percentage rating for both long and short zones. Please note that this is not a win rate of a simulated strategy, it simply is a measure to understand if the current assets tends to respect more supply or demand zones.
How to Use:
Load the script onto your chart. The default settings are optimized for identifying key price action zones and structure on intraday charts of liquid assets.
Customize the settings according to your strategy. For example, adjust the "Max Orderblocks" and "Strength Filter" to focus on more significant price action areas.
Monitor the liquidity grabs, breakouts, and FVGs for potential trade opportunities.
Use the bias and market structure analysis to align your trades with the prevailing market trend.
Refer to the backtesting win rates to evaluate the effectiveness of the zones in your trading.
Terms & Conditions:
By using this script, you agree to the following terms:
Educational Purposes Only: This script is provided for informational and educational purposes and does not constitute financial advice. Use at your own risk.
No Warranty: The script is provided "as-is" without any guarantees or warranties regarding its accuracy or completeness. The creator is not responsible for any losses incurred from the use of this tool.
Open-Source License: This script is open-source and may be modified or redistributed in accordance with the TradingView open-source license. Proper credit to the original creator, OmegaTools, must be maintained in any derivative works.
OSOK [AMERICANA] x [TakingProphets]Overview
OSOK is an ICT-inspired execution tool that sequences a Higher-Timeframe CRT → Order Block → Current-Timeframe CRT workflow, then overlays IPDA 20 context.
The script updates in real time and can optionally mark Daily/Weekly CRT sweeps to align intraday decisions with HTF intent.
Designed for clarity on when a sweep (CRT) forms, where the qualifying Order Block sits, and how the current timeframe confirms with a follow-up CRT — all while plotting the IPDA 20 equilibrium. 🧭
Core Concepts (ICT)
-CRT (Sweep) Logic
-Bullish CRT: candle-2 runs below candle-1 low and closes back inside candle-1’s range.
-Bearish CRT: candle-2 runs above candle-1 high and closes back inside candle-1’s range.
-HTF → CTF Alignment
-Detect a valid HTF CRT (Daily from H4; Weekly from Daily), then scan for an Order Block formed inside HTF candle-2.
-Wait for the CTF CRT (modified check) to confirm direction before considering execution.
IPDA 20
Daily highest/lowest of the last 20 periods; the midpoint is plotted as IPDA 20 equilibrium to frame premium/discount. ⚖️
How It Works (Pipeline)
Step 1 — HTF CRT Check
-On each new HTF candle, the script checks for a clean CRT on the higher aggregation (H4→D or D→W).
-If found, it tags C1/C2/C3 (candle blocks) and can shade their backgrounds for fast visual parsing.
Step 2 — HTF OB Search
-Locates a qualifying Order Block inside HTF candle-2 using a compact pattern filter.
-Draws a persistent OB line with label.
Step 3 — CTF Confirmation (Modified CRT)
-Monitors your current chart timeframe for a modified CRT in the direction of the HTF setup.
-If bullish setup: expects a bullish modified CRT and close back above the C1 high zone; opposite for bearish.
Step 4 — Live Maintenance
-All lines/labels/boxes update intrabar. If a setup invalidates (e.g., TP implied is exceeded before entry), the script clears the layout and waits for the next valid sequence. 🔄
What You Get
HTF CRT Visualization
-Optional “×” markers on Daily/Weekly charts at the CRT sweep bar (candle-2).
-Clear C1/C2/C3 background shading (toggle each independently).
-Order Block & Open Price
-OB level derived from candle-2 logic; C3 Open (DOP) plotted to add context to HTF intent.
CTF CRT Execution Cue
-When conditions are met, a CTF CRT plots with live updates to help time entries with the HTF narrative.
IPDA 20 Line + Label
-Daily 20-period H/L midpoint with optional label for premium/discount context.
-Clean, Lightweight Drawing Engine
Efficient use of line, label, and box objects; elements are created once and updated each bar for performance. 🚀
Inputs (Quick Guide)
-Higher Timeframe
-Mark Higher Timeframe Sweeps: show an “×” on the sweep bar (candle-2) on Daily/Weekly.
-Candle 1/2/3 Background: toggle and color the C1–C3 spans for quick visual segmentation.
-IPDA Display / Style
-Show IPDA 20, Show Label, color/width/style (kept tidy by default).
-Sweep Style / OB Style / Open Price Style
-Per-element color, dash, and width controls (hidden by default to keep the panel minimal).
Best Practices
Start on H4/D to see whether a clean HTF CRT formed; confirm an OB within C2; then drop to your execution timeframe to wait for the modified CTF CRT.
Context + Confluence
Use IPDA 20 to judge premium/discount while price interacts with OB + CRT levels.
Sessions & Timing
Combine with your session bias (ICT) and calendar awareness; the script gives structure, you bring the execution plan. 🧠
Notes
The “setup detected” and “took long/short” messages are informational logs (not trade automation).
Objects are automatically deleted/reset when a new HTF candle is processed or when a setup invalidates.
Works on any symbol/timeframe; HTF mapping is H4 → D and D → W by default.
Short Description (TradingView card)
ICT-inspired OSOK : maps a complete HTF CRT → OB → CTF CRT execution flow with optional Daily/Weekly CRT markers and IPDA 20 equilibrium. Real-time updating lines, labels, and background spans for clean, actionable structure. ✨
TTC PRO candle Beta 1/1This indicator combines the T Trader strategy with my unique cycle methodology to provide deeper insights. (You may refer to the T Trader video for details.)
The theoretical aspects I have developed require additional education, so feel free to contact me for guidance.
(Since this is a beta version, it is available only to testers. If you DM me, a survey will be sent out. Based on the responses, we will determine suitable candidates and provide access accordingly)
On the right side of the chart, a virtual candle called HTF is displayed, along with lines such as Sweep and Close Above/Below. A Low Sweep indicates a bullish intraday bias, while a High Sweep suggests a bearish intraday bias. Close Above/Below also plays an important role in shaping the narrative.
These virtual candle lines can also be projected onto the real chart, allowing traders to visually identify entry points more efficiently. Additionally, the previous equilibrium value (EQ) is shown, serving as the final defense level.
When multiple C4s appear consecutively, it usually signifies consolidation. XC2 acts as a cancellation signal, while C2 functions as a pivot point. Once C2 is labeled, it automatically escalates to C4, providing directional bias, and an alert will be triggered. Furthermore, CSD can also be utilized, with the projected CSD levels displayed as dotted lines. These levels can be regarded as protected lows or highs that must be defended.
All of these features are based on ICT concepts and serve as derivative strategy tools, making them highly valuable for traders who are familiar with ICT ideas. However, I do not recommend their use for beginners.
ps: The script is still in its beta stage, and I have more features developed that will be gradually updated in the future.
It also includes an auto-frame function. By default, it works automatically, but if you want to adjust the timeframe, for example, changing “5 minutes” to “30 minutes” in option 1, you can then use the 3m–30m range.
이 인디케이터는 T 트레이더 전략과 저만의 사이클 기법을 결합하여 통찰력을 제공합니다. (T 트레이더 영상을 참고해 보세요.)
제가 개발한 이론적인 부분은 추가적인 교육이 필요하므로, 문의를 주시면 안내해 드리겠습니다.
(beta 버전이므로 테스터 분들만 사용 가능 합니다 DM을 주시면 설문지가 나가게됩니다 .적합자 를 판단
하여 지급해 드립니다.)
차트의 오른쪽에는 가상 캔들인 HTF가 플로팅되며, 스윕(Sweep), Close Above/Below 등의 라인이 표시됩니다. 여기서 Low Sweep은 불리시 일중 편향을, High Sweep은 베어리시 일중 편향을 제시합니다. 또한 Close Above/Below 역시 네러티브를 형성하는 중요한 요소입니다.
실제 차트에도 가상 캔들에서 나온 라인을 그대로 표시할 수 있도록 하여, 트레이더가 시각적으로 진입 구간을 빠르게 포착할 수 있게 설계되었습니다. 그리고 이전 중심값인 EQ 또한 표시되며, 이는 최종 방어선의 역할을 합니다.
C4가 연속적으로 등장하면 대부분 콘솔리데이션을 의미하며, XC2는 취소 신호, C2는 피벗 포인트로 작동합니다. C2가 라벨링되면 자동으로 C4까지 에스컬레이터처럼 이어지며 편향을 제공하고, 이때 알림이 울립니다. 또한 CSD도 활용할 수 있으며, 예상 CSD 지점은 점선으로 표시됩니다. 이 구간은 반드시 보호되어야 할 저점 혹은 고점으로 간주할 수 있습니다.
이 모든 기능은 ICT 개념을 바탕으로 만들어진 파생 전략 도구이므로, ICT 아이디어에 익숙한 트레이더에게 유용합니다. 다만, 초보자에게는 사용을 권장하지 않습니다.
ps: 아직 베타 단계라 추가로 준비해둔 스크립트들이 있으며, 앞으로 순차적으로 업데이트할 계획입니다.
또한 오토 프레임 기능이 있어서, 기본값을 원하면 그대로 두면 되고, 다른 타임프레임을 원할 경우 예를 들어 1번에서 5분을 30분으로 변경하면 3m–30m 구간을 사용할 수 있습니다
Unicorn Model[Pro++]by TriummWhat is the Unicorn Model?
The Unicorn Model is an intraday trading setup taught by ICT that combines:
Liquidity raids (stop hunts)
Market structure shift (BOS/CHOCH)
Fair Value Gap (FVG) entry
Key time & session context
It’s called the “Unicorn” because it’s a rare but high-probability model that delivers very clean moves when it sets up correctly.
🔹 Core Components of the Unicorn Model
Liquidity Grab (Sweep)
Market first raids a key level (previous day’s high/low, session high/low, Asian range).
This removes liquidity and traps traders.
Market Structure Shift (MSS / CHoCH)
After the sweep, price breaks structure in the opposite direction.
This signals a shift in order flow.
Fair Value Gap (FVG) or Order Block Entry
Wait for price to retrace into the imbalance (FVG) or OB formed by the move.
Entry is taken here in line with the new direction.
Time & Session Context
Usually forms around London or New York Killzones (ICT emphasizes time of day).
Often tied to daily bias (using daily open, previous day high/low, etc.).
Target
Opposite liquidity pool (e.g., if raid was above → target below).
Often uses ADR levels, previous session lows, or equal lows/highs.
🔹 Example Flow (Bearish Unicorn)
Price trades above Asia High (liquidity sweep).
Then forms a market structure shift (BOS to downside).
A bearish FVG is left behind.
Price retraces into that FVG.
Entry short → target Asia Low or previous day low.
🔹 Why It’s Powerful
Filters fake breakouts → wait for liquidity + structure shift.
Adds precision → entry only on FVG retracement.
Works best when aligned with daily bias (discount/premium model).
🔹 Key Confluences for Unicorn
Session killzones (London Open, NY AM/PM).
Daily bias (above/below daily open).
Liquidity sweep (old highs/lows).
Fair Value Gap retracement.
Targets = liquidity pools.
✅ In short:
The ICT Unicorn Model = A “liquidity sweep + market structure shift + FVG retracement” setup, best taken in London/NY sessions, targeting opposite liquidity. It’s one of ICT’s cleanest intraday models for precision entries.
Triumm algo v2 with Signal Quality1. Core Buy/Sell Logic
Uses two EMAs (9 & 21 by default).
Buy Signal = when fast EMA crosses above slow EMA and RSI < 70 (not overbought).
Sell Signal = when fast EMA crosses below slow EMA and RSI > 30 (not oversold).
At a signal:
It sets an Entry price (current close).
It calculates 3 Take Profit (TP1, TP2, TP3) based on ATR multiples.
It sets a Stop Loss (SL) also based on ATR.
🔹 2. Signal Confidence & Potential
The script doesn’t just give a raw buy/sell, it adds “AI-inspired” grading:
Confidence (0–100%)
Based on:
EMA crossover strength (big gap = higher confidence).
RSI position (closer to 30/70 = more decisive).
Volume trend (if volume > average).
Whether you’re in an ICT Killzone (London, NY, Asia sessions).
Potential (0–100%)
Based on:
How far TP1 is from entry (relative to price).
Trend strength (fast EMA above/below slow EMA).
ATR vs average ATR (volatility score).
✅ Then it gives a Signal Quality Label:
Very Good
Good
Simple
Bad
Very Bad
This helps you filter only strong trades.
🔹 3. Dashboard
On the chart, a dashboard table shows:
Trend direction (Uptrend/Downtrend).
RSI value.
ATR value.
Current Killzone (London, NY, Asia, or OFF).
Suggested timeframe (based on volatility).
🔹 4. Fair Value Gaps (FVGs)
The script also includes FVG detection:
Finds bullish/bearish FVGs (price gaps between candles).
Can show unmitigated/mitigated levels.
Optionally plots them with boxes or dashed lines.
Keeps count of FVGs and shows stats in a dashboard.
🔹 5. CISD (Change in State of Delivery)
Another ICT concept:
Detects when market structure shifts.
Marks +CISD (bullish) or -CISD (bearish) levels with lines/labels.
Deletes or keeps old levels (configurable).
Can send alerts when CISD levels are broken.
🔹 6. AI Multi-Timeframe Trend Check
The script scans 1m, 5m, 15m, 30m:
Each TF gives a score based on EMA, RSI, and Volume.
Picks the best timeframe with strongest setup.
Displays reasoning in a mini “🧠 Triumm AI” table.
🔹 7. Range Filter (Extra Buy/Sell)
At the bottom, there’s a Range Filter system:
Smooths price with EMA-based range filter.
Generates independent Buy/Sell signals when price breaks above/below the filter.
Plots signals with arrows (“Buy” below bars, “Sell” above bars).
Can also be turned into a strategy with TP/SL.
⚡ Summary in Simple Words
This indicator is like an all-in-one trading toolkit:
📈 Entry/Exit with ATR-based TP/SL.
🎯 Confidence & Potential scoring (quality check).
🕰️ ICT Killzones & dashboard.
📊 AI Multi-timeframe trend filter.
🌀 Fair Value Gaps (ICT concept).
🔄 CISD structure shift detection.
📉 Range Filter Buy/Sell signals.
AI Gold Liquidity Breakout CatcherTitle: Gold AI Liquidity Breakout Catcher
Description:
Indicator Philosophy and Originality:
This indicator is not merely a collection of separate tools, but an integrated trading framework designed to improve decision-making by ensuring signal confluence. The core philosophy is that high-probability trading signals occur when multiple, distinct analysis methodologies align.
The originality of this script lies in how it systematically combines a leading signal (the Liquidity Breakout) with multiple, independent lagging confirmation tools (the Classic Filters, the Hull MA, and the Range Filter). A user can see a primary breakout signal and immediately validate its strength against the broader trend defined by the Hull MA, the intermediate trend from the Range Filter, and the specific conditions of the classic filters.
This synergy, where different components work together to validate a single event, is the primary value and reason for this mashup. It provides a structured, multi-layered confirmation process within a single tool, which is not achievable by adding these indicators separately to the chart.
This indicator is a comprehensive technical analysis tool designed to identify potential trading opportunities and provide supplemental trend analysis. It features a primary signal engine based on pivot trendline breakouts, a sophisticated confirmation layer using classic technical indicators, and three separate modules for discretionary analysis: an ICT-based structure plotter, a highly customizable Hull Moving Average (HMA), and a volatility-adaptive Range Filter. This document provides a detailed, transparent explanation of all underlying logic.
1. Core Engine: Pivot-Based Liquidity Trendline Signals
The indicator's foundational signal is generated from a custom method we call "Liquidity Trendlines," which aims to identify potential shifts in momentum.
How It Works:
The script first identifies significant swing points in the price using ta.pivothigh() and ta.pivotlow().
It then draws a trendline connecting consecutive pivot points.
A "Liquidity Breakout" signal (liquidity_plup for buy, liquidity_pldn for sell) is generated when the price closes decisively across this trendline, forming the basis for a potential trade.
2. The Signal Confirmation Process: Multi-Layered Filtering System
A raw Liquidity Breakout signal is only a starting point. To enhance reliability, the signal must pass through a series of user-enabled filters. A final Buy or Sell signal is only plotted if all active filter conditions are met simultaneously.
General & Smart Trend Filters: Use a combination of EMAs, DMI (ADX), and market structure to define the trend.
RSI & MACD Filters: Used for momentum confirmation.
Directional Body Strength Filter: A custom filter that validates the signal based on the strength and direction of the signal candle's body (bodyUpOK / bodyDownOK).
Support & Resistance (S&R) Filter: Blocks signals forming too close to key S&R zones.
Higher Timeframe (HTF) Filter: Provides confluence by checking the trend on higher timeframes.
3. Visual Aid 1: ICT-Based Structure & Premium/Discount Zones
This module is for visual and discretionary analysis only and does not directly influence the automated Buy/Sell signals.
ICT Market Structure: Plots labels for CHoCH, SMS, and BMS based on a Donchian-channel-like logic.
ICT Premium & Discount Zones: When enabled, it draws colored zones corresponding to Premium, Discount, and Equilibrium levels.
4. Visual Aid 2: Hull Moving Average (HMA) Integration
This is another independent tool for trend analysis. It does not affect the primary signals but has its own alerts and serves as a powerful visual confirmation layer.
Functionality: Includes multiple Hull variations (HMA, THMA, EHMA), customizable colors based on trend, and the ability to pull data from a higher timeframe.
5. Visual Aid 3: Range Filter Integration
This module is a volatility-adaptive trend filter that provides its own set of signals and visuals. It is designed to be a standalone trend analysis tool integrated within the indicator for additional confluence.
How It Works: The Range Filter calculates a dynamic volatility threshold based on the average range of the price. A central filter line moves up or down only when the price exceeds this threshold, effectively filtering out market noise.
Visuals: It plots the central filter line and upper/lower bands that create a volatility channel. It can also color the price bars based on the trend.
Signals & Alerts: The Range Filter generates its own "Manual Buy" and "Manual Sell" signals when the price crosses the filter line after a change in trend direction. These signals have their own dedicated alerts.
6. Risk Management & Additional Features
TP/SL Calculations: Automatically calculates Take Profit and Stop Loss levels for the primary signals based on the ATR.
Multi-Timeframe (MTF) Scanner: A dashboard that monitors the final Buy/Sell signal status across multiple timeframes.
Session Filter & Alerts: Allows for restricting trades to specific market sessions and configuring alerts for any valid signal.
By combining breakout detection with a rigorous confirmation process and multiple supplemental analysis tools, this indicator provides a structured and transparent approach to trading.
Scalp Sense AI# Scalp Sense AI (No Repaint)
**Adaptive trend & reversal detector with an AI-driven score, multi-timeframe confirmations, robust volume filters, and a purpose-built Scalping Mode.**
Signals are generated **only on bar close** (no repaint), include structured alert payloads for webhooks, and come with optional ATR-based TP/SL visualization for study and validation.
---
## What it is (in one paragraph)
**Scalp Sense AI** combines classic market structure (DI/ADX, EMA, SMA, Keltner, ATR) with a continuous **AI Score** that fuses RSI normalization, EMA distance (in ATR units), and DI edge into a single, volatility-aware signal. It adaptively gates **trend** and **reversal** entries, applies **HTF confirmation** without lookahead, and enforces **guard rails** (e.g., strong-trend reversal blocking) unless a high-confidence AI override and volume confirmation are present. **Scalping Mode** compresses reaction times and adds micro price-action cues (wick rejections, micro-EMA crosses, small engulfing) to surface more—but disciplined—opportunities.
---
## Non-Repainting Design
* All signals, markers, state, and alerts are computed **after bar close** using `barstate.isconfirmed`.
* HTF data are requested with `lookahead_off`.
* No “future-peeking” constructs are used.
* Result: signals do **not** change after the candle closes.
---
## How the engine works (pipeline overview)
1. **Base metrics**
* **RSI**, **EMA**, **ATR** (+ ATR SMA for regime/volatility), **SMA long & short**, **Keltner** (EMA ± ATR×mult).
* **Manual DI/ADX** for fine control (DM+, DM−, true range smoothing).
2. **Volatility regime**
* Compares ATR to its SMA and scales thresholds by √(ATR/ATR\_SMA) → robust “high\_vol” gating.
3. **Volume & flow**
* **Volume Z-score**, **OBV slope**, and **MFI** (all computed manually) to confirm impulses and filter weak reversals.
4. **Higher-Timeframe confirmation (optional)**
* Imports HTF **PDI/MDI/ADX** and **SMA** (no lookahead) to require alignment when enabled.
5. **AI Score**
* Weighted fusion of **RSI (normalized around 0)**, **EMA distance (in ATR)**, and **DI edge**.
* Smoothed; then its **mean (μ)** and **volatility (σ)** are estimated to form **adaptive bands** (hi/lo), with optional **hysteresis**.
* **Debounce** (M in N bars) avoids flicker; **bias state** persists until truly invalidated.
6. **Signal logic**
* **Trend entries** require AI bias + trend confirmations (DI/ADX/SMA, HTF if enabled), volatility OK, and **anti-breakout** filter.
* **Reversal entries** come in **core**, **early**, and **scalp** flavors (progressively more frequent), guarded by strong-trend blocks that an **AI+volume+ADX-cooling override** can bypass.
7. **Scalping Mode**
* Adaptive parameter contraction (shorter lengths), gentler guards, micro-patterns (wick/engulf/micro-EMA cross), and reduced cooldown to increase high-quality opportunities.
8. **Cooldown & state**
* One signal per side after a configurable spacing in bars; internal “last direction” avoids clustering.
9. **Visualization & alerts**
* **Triangles** for trend, **circles** for reversals (offset by ATR to avoid overlap).
* **Single-line alert payload** (BUY/SELL, reason, AI, volZ, ADX) ready for webhooks.
---
## Signals & visualization
* **Trend Long/Short** → triangle markers (above/below) when:
* AI bias aligns with trend confirmations (DI edge, ADX above threshold, price vs long SMA, optional HTF alignment).
* Volatility regime agrees; **anti-breakout** prevents entries exactly at lookback highs/lows.
* **Reversal Long/Short** → circular markers when:
* **Core**: AI near “loose” band, OBV/MFI/volZ supportive, ADX cooling, DI spread relaxed, PA confirms (crosses/div).
* **Early**: anticipatory patterns (Keltner exhaustion, simple RSI “quasi-divergence”).
* **Scalp**: micro-EMA cross, wick rejection, mini-engulfing, with relaxed guards but AI/volume still in the loop.
* **Markers appear only on the bar that actually emitted the signal** (no repaint); offsets use ATR so shapes don’t overlap.
---
## Alerts (ready for webhooks)
Enable “**Any alert() function call**” and you’ll receive compact, single-line payloads once per bar:
```
action=BUY;reason=reversal-early;ai=0.1375;volZ=0.82;adx=27.5
action=SELL;reason=trend;ai=-0.2210;volZ=0.43;adx=31.9
```
* `action`: BUY / SELL
* `reason`: `trend` | `reversal-core` | `reversal-early` | `reversal-scalp`
* `ai`: current smoothed AI Score at signal bar
* `volZ`: volume Z-score
* `adx`: current ADX
---
## Inputs (exhaustive)
### 1) Core Inputs
* **RSI Length (Base)** (`rsi_length_base`, int)
Base RSI lookback. Shorter = more reactive; longer = smoother.
* **RSI Overbought Threshold** (`rsi_overbought`, int)
Informational for context; RSI is used normalized in the AI fusion.
* **RSI Oversold Threshold** (`rsi_oversold`, int)
Informational; complements visual context.
* **EMA Length (Base)** (`ema_length_base`, int)
Primary adaptive mean; also used for Keltner mid and distance metric.
* **ATR Length (Base)** (`atr_length_base`, int)
Volatility unit for Keltner, SL/TP (debug), and regime detection.
* **ATR SMA Length** (`atr_sma_len`, int)
Smooth baseline for ATR regime; supports “high\_vol” logic.
* **ATR Multiplier Base** (`atr_mult_base`, float)
Scales volatility gating (sqrt-scaled); higher = tighter high-vol requirement.
* **Disable Volatility Filter** (`disable_volatility_check`, bool)
Bypass volatility gating if true.
* **Price Change Period (bars)** (`price_change_period_base`, int)
Simple momentum check (+/−% over N bars) used in trend validation.
* **Base Cooldown Bars Between Signals** (`signal_cooldown_base`, int ≥ 0)
Minimum bars to wait between signals (per side).
* **Trend Confirmation Bars** (`trend_confirm_bars`, int ≥ 1)
Require persistence above/below long SMA for this many bars.
* **Use Higher Timeframe Confirmation** (`use_higher_tf`, bool)
Turn on/off HTF alignment (no repaint).
* **Higher Timeframe for Confirmation** (`higher_tf`, timeframe)
E.g., “60” to confirm M15 with H1; used for HTF PDI/MDI/ADX and SMA.
* **TP as ATR Multiple** (`tp_atr_mult`, float)
For **visual debug** only (drawn after entries); not an order manager.
* **SL as ATR Multiple** (`sl_atr_mult`, float)
For visual debug only.
* **Enable Scalping Mode** (`scalping_mode`, bool)
Compresses lengths/thresholds, unlocks micro-PA modules, reduces cooldown.
* **Show Debug Lines** (`show_debug`, bool)
Plots AI bands, DI/ADX, EMA/SMA, Keltner, vol metrics, and TP/SL (debug).
### 2) AI Score & Thresholds
* **AI Score Smooth Len** (`ai_len`, int)
EMA smoothing over the raw fusion.
* **AI Volatility Window** (`ai_sigma_len`, int)
Window to estimate AI mean (μ) and standard deviation (σ).
* **K High (sigma)** (`ai_k_hi`, float)
Upper band width (σ multiplier) for strong threshold.
* **K Low (sigma)** (`ai_k_lo`, float)
Lower band width (σ multiplier) for loose threshold.
* **Debounce Window (bars)** (`ai_debounce_m`, int ≥ 1)
Rolling window length used by the confirm counter.
* **Min Bars>Thr in Window** (`ai_debounce_n`, int ≥ 1)
Minimum confirmations inside the debounce window to validate a state.
* **Use Hysteresis Thresholds** (`ai_hysteresis`, bool)
Requires crossing back past a looser band to exit bias → fewer whipsaws.
* **Weight DI Edge (0–1)** (`ai_weight_di`, float)
Importance of DI edge within the fusion.
* **Weight EMA Dist (0–1)** (`ai_weight_ema`, float)
Importance of EMA distance (in ATR units).
* **Weight RSI Norm (0–1)** (`ai_weight_rsi`, float)
Importance of normalized RSI.
* **Sensitivity (0–1)** (`sensitivity`, float)
Contracts/expands bands (higher = more sensitive).
### 3) Volume Filters
* **Volume MA Length** (`vol_ma_len`, int)
Baseline for volume Z-score.
* **Volume Z-Score Window** (`vol_z_len`, int)
Std-dev window for Z-score; larger = fewer volume “spikes”.
* **Reversal: Min Volume Z for confirm** (`vol_rev_min_z`, float)
Minimum Z required to validate reversals (adaptively relaxed in scalping).
* **OBV Slope Lookback** (`obv_slope_len`, int)
Rising/falling OBV over this window supports bull/bear confirmations.
* **MFI Length** (`mfi_len`, int)
Money Flow Index lookback (manual calculation).
### 4) Filters (Breakout / ADX / Reversal)
* **Enable Breakout Filter** (`enable_breakout_fil`, bool)
Avoid trend entries at lookback highs/lows.
* **Breakout Lookback Bars** (`breakout_lookback`, int ≥ 1)
Window for the anti-breakout guard.
* **Base ADX Length** (`adx_length_base`, int)
Lookback for DI/ADX smoothing (also adapted in Scalping Mode).
* **Base ADX Threshold** (`adx_threshold_base`, float)
Minimum ADX to validate trend context (scaled in Scalping Mode).
* **Enable Reversal Filter** (`enable_rev_filter`, bool)
Master switch for reversal logic.
* **Max ADX for Reversal** (`rev_adx_max`, float)
Hard cap: above this ADX, reversals are blocked (unless overridden by AI if allowed in Guards).
### 5) Reversal Guard (regime protection & overrides)
* **Strong Trend: ADX add-above Thr** (`guard_adx_add`, float)
Extra ADX above `adx_threshold` to mark “strong” trend.
* **Strong Trend: min DI spread** (`guard_spread_min`, float)
Minimum DI separation to consider a trend “dominant”.
* **Require ADX drop from window max (%)** (`guard_adx_drop_min_pct`, float 0–1)
ADX must drop at least this fraction from its window maximum to consider “cooling”.
* **Regime Window (bars)** (`guard_regime_len`, int ≥ 10)
Window over which ADX max is measured for the “cooling” check.
* **EMA Slope Lookback** (`guard_slope_len`, int ≥ 2)
EMA slope horizon used alongside Keltner for strong-trend identification.
* **Keltner Mult (ATR)** (`guard_kc_mult`, float)
Keltner width for strong trend bands and exhaustion checks.
* **HTF Reversal Block Mode** (`htf_block_mode`, string: `Off` | `On` | `AI-controlled`)
* `Off`: never block by HTF.
* `On`: block reversals whenever HTF is strong.
* `AI-controlled`: block **unless** AI+volume+ADX-cooling override criteria are met.
* **AI-controlled: allow AI override** (`ai_htf_override`, bool)
Enables the override mechanism in `AI-controlled` mode.
* **AI override multiplier (vs band\_hi)** (`ai_override_mult`, float)
Strength needed beyond the high band to count as “strong AI”.
* **AI override: min bars beyond strong thr** (`ai_override_min_bars`, int ≥ 1)
Debounce on the override itself.
### 6) Markers
* **Reversal Circle ATR Offset** (`rev_marker_offset_atr`, float ≥ 0)
Vertical offset for reversal circles; trend triangles use a separate (internal) offset.
### 7) Scalping Mode Tuning
* **Reversal aggressiveness (0–1)** (`scalp_rev_aggr`, float)
Higher = looser guards and stronger AI sensitivity.
* **Wick: body multiple (bull/bear)** (`scalp_wick_body_mult`, float)
Wick must be at least this multiple of body to count as rejection.
* **Wick: ATR multiple (min)** (`scalp_wick_atr_mult`, float)
Minimal wick length in ATR units.
* **Micro EMA factor (vs EMA base)** (`scalp_ema_fast_factor`, float 0.2–0.9)
Fast EMA length = base EMA × factor (rounded/int).
* **Relax breakout filter in scalping** (`scalp_breakout_relax`, bool)
Lets more trend entries through in scalping context.
### 8) ICT-style SMA (bases)
* **ICT SMA Long Length (Base)** (`sma_long_len_base`, int)
Long-term baseline for regime/trend.
* **ICT SMA Short1 Length (Base)** (`sma_short1_len_base`, int)
Short baseline for price-action crosses.
* **ICT SMA Short2 Length (Base)** (`sma_short2_len_base`, int)
Companion short baseline used in PA cross checks.
> **Adaptive “effective” values:** When **Scalping Mode** is ON, the script internally shortens multiple lengths (RSI/EMA/ATR/ADX/μσ windows, SMAs) and gently relaxes guards (ADX drop %, DI spread, volume Z, override thresholds), reduces cooldown/confirm bars, and optionally relaxes the breakout filter—so you get **more frequent but still curated** signals.
---
## Plots & debug (optional)
* DI+/DI−, ADX (curr + HTF), EMA, long SMA, Keltner up/down (when strong), AI Score, AI mean, AI bands (hi/lo; low plots only when hysteresis is on), Volume MA and Z-score, and ATR-based TP/SL guide (after entries).
* These are **study aids**; the indicator does not manage trades.
---
## Recommended use
* **Timeframes**:
* Scalping Mode: M1–M15.
* Standard Mode: M15–H1 (or higher).
* **Markets**: Designed for liquid FX, indices, metals, and large-cap crypto.
* **Chart type**: Standard candles recommended (Heikin-Ashi alters inputs and hence signals).
* **Alerts**: Use “Any alert() function call”. Parse the key/value payloads server-side.
---
## Good to know
* **Why some alerts don’t draw shapes retroactively**: markers are drawn **only on** the bar that emitted the signal (no repaint by design).
* **Why a reversal didn’t fire**: strong-trend guards + HTF block may have been active; check ADX, DI spread, Keltner position, EMA slope, and whether AI override criteria were met.
* **Too many / too few signals**: tune **Scalping Mode**, `signal_cooldown_base`, AI bands (`ai_k_hi/lo`, `sensitivity`), volume Z (`vol_rev_min_z`), and guards (`rev_adx_max`, `guard_*`).
---
## Disclaimer
This is an **indicator**, not a strategy or an execution system. It does not place, modify, or manage orders. Markets carry risk—validate on historical data and demo before any live decisions. No performance claims are made.
---
### Version
**Scalp Sense AI v11.5** — Adaptive AI bands with hysteresis/debounce, HTF no-lookahead confirmations, guarded reversal logic with AI override, full volume suite (Z, OBV slope, MFI), anti-breakout filter, and a dedicated Scalping Mode with micro-PA cues.
AI Strat ATR Dinamico + ADX + Trend Adaptivo (No Repaint)Below is a fully self-contained, English-language description of every input, function, and logical block inside the “AI Strat ATR Dinamico + ADX + Trend Adaptivo (No Repaint)” indicator. You can copy and paste this into TradingView’s “Description” field when you publish, without exposing any Pine code.
---
## Indicator Name and Purpose
**Name (Short Title):**
AI Strat Adaptive v3 (NoRepaint)
**Overview:**
This indicator combines multiple technical tools—RSI, EMA, ATR (with a dynamic multiplier), ADX/DI, and an “AI‐style” scoring mechanism—to generate trend-filtered and reversal signals. It also optionally confirms signals on a higher timeframe, dynamically adjusts its sensitivity based on volatility, and plots intrabar stop‐loss (SL) and take‐profit (TP) levels derived from ATR. Special care has been taken to ensure that no signals “repaint” (i.e., once drawn on a closed bar, they never disappear or shift).
---
## 1. Main Inputs
All of the inputs appear in the Settings dialog for the published indicator. Below is a detailed explanation of each input, grouped by logical category.
### A. RSI & EMA Base Parameters
1. **RSI Length (Base)**
* **Input type:** Integer (default 14)
* **Description:** Number of bars used to calculate the Relative Strength Index (RSI). A shorter RSI reacts more quickly to price changes; a longer RSI is smoother.
2. **RSI Overbought Threshold**
* **Input type:** Integer (default 60)
* **Description:** If the RSI value rises above this level, it contributes a “sell” signal component. You can adjust this (e.g., 70) to make your system more conservative.
3. **RSI Oversold Threshold**
* **Input type:** Integer (default 40)
* **Description:** If the RSI falls below this level, it contributes a “buy” signal component. Raising this threshold (e.g., 50) makes the strategy more aggressive in seeking reversals.
4. **EMA Length (Base)**
* **Input type:** Integer (default 20)
* **Description:** Number of bars for the Exponential Moving Average (EMA). A shorter EMA will produce more frequent crossovers, a longer EMA is smoother.
### B. ATR & Volatility Filter Parameters
5. **ATR Length (Base)**
* **Input type:** Integer (default 14)
* **Description:** Number of bars to calculate Average True Range (ATR). The ATR is used both for measuring volatility and for dynamic SL/TP levels.
6. **ATR SMA Length**
* **Input type:** Integer (default 50)
* **Description:** Number of bars to compute a Simple Moving Average of the ATR itself. This gives a baseline of “normal” volatility. If ATR rises significantly above this SMA, the indicator treats the market as “high volatility.”
7. **ATR Multiplier Base**
* **Input type:** Float (default 1.2, step 0.1)
* **Description:** Base multiplier for ATR when filtering for volatility. The actual threshold is computed as `ATR_SMA × (ATR_Multiplier Base) × sqrt(current_ATR / ATR_SMA)`. In other words, the multiplier becomes larger if volatility is rising, and smaller if volatility is falling.
8. **Disable Volatility Filter**
* **Input type:** Boolean (default false)
* **Description:** If enabled (true), the indicator will ignore any volatility‐based filtering, using signals regardless of ATR behavior. If disabled (false), signals only fire when ATR > (ATR\_SMA × dynamic multiplier).
### C. Price-Change & “AI Score” Parameters
9. **Price Change Period (bars)**
* **Input type:** Integer (default 3)
* **Description:** The number of bars back to measure percentage price change. Used to ensure that a “trend” signal is accompanied by a sufficiently positive (for longs) or negative (for shorts) price movement over this many bars.
10. **Base AI Score Threshold**
* **Input type:** Float (default 0.1)
* **Description:** The indicator computes a composite “AI-style” score by combining the RSI signal (overbought/oversold) and an EMA crossover signal. Only if the absolute value of that composite score exceeds this threshold will a trend signal be eligible. Raising it makes signals rarer but (potentially) higher-conviction.
### D. SMA “ICT” Trend Filter Parameters
11. **ICT SMA Long Length (Base)**
* **Input type:** Integer (default 50)
* **Description:** Number of bars for the “long” Simple Moving Average (SMA) used in the internal trend filter. Typically, price must be above this SMA (and ADX must be strong) to confirm an uptrend, or below it (and ADX strong) to confirm a downtrend.
12. **ICT SMA Short1 Length (Base)**
* **Input type:** Integer (default 10)
* **Description:** Secondary “fast” SMA used both for reversal logic (e.g., price crossing above it can count as a bullish reversal) and part of the internal trend confirmation.
13. **ICT SMA Short2 Length (Base)**
* **Input type:** Integer (default 20)
* **Description:** A second “medium” SMA used for reversal triggers (e.g., crossovers or crossunders alongside RSI conditions).
### E. ADX & DI Parameters
14. **Base ADX Length**
* **Input type:** Integer (default 14)
* **Description:** Number of bars for the ADX (Average Directional Index) moving averages, which measure trend strength. The same length is used for +DI and –DI smoothing.
15. **Base ADX Threshold**
* **Input type:** Float (default 25.0, step 0.5)
* **Description:** If ADX > this threshold and +DI > –DI, we consider an uptrend; if ADX > this threshold and –DI > +DI, we consider a downtrend. Raising this value demands stronger trends to qualify.
### F. Sensitivity & Cooldown
16. **Sensitivity (0–1)**
* **Input type:** Float between 0.0 and 1.0 (default 0.5)
* **Description:** A general “mixture” parameter used internally to weight how aggressively the indicator leans into trend versus reversal. In practice, the code uses it to fine-tune exact thresholds for switching between trend and reversal conditions. You can leave it at 0.5 unless you want to bias more heavily toward either regime.
17. **Base Cooldown Bars Between Signals**
* **Input type:** Integer (default 5, min 0)
* **Description:** Once a long or short signal fires, the indicator will wait at least this many bars before allowing a new signal in the same direction. Prevents “signal flipping” on each bar. A higher number forces fewer, more spaced-out entries.
18. **Trend Confirmation Bars**
* **Input type:** Integer (default 3, min 1)
* **Description:** After the directional filters (+DI/–DI cross, price vs. SMA), the indicator still requires that price remains on the same side of the long SMA for at least this many consecutive bars before confirming “trend up” or “trend down.” Larger values smooth out false breakouts but may lag signals.
### G. Higher Timeframe Confirmation
19. **Use Higher Timeframe Confirmation**
* **Input type:** Boolean (default true)
* **Description:** If true, the indicator will request a block of values (SMA, +DI, –DI, ADX) from a higher timeframe (default 60 minutes) and require that the higher timeframe is also in agreement (strong uptrend or strong downtrend) before confirming your current-timeframe trend. This helps filter out lower-timeframe noise.
20. **Higher Timeframe (TF) for Confirmation**
* **Input type:** Timeframe (default “60”)
* **Description:** The chart timeframe (e.g., 5, 15, 60 minutes) whose trend conditions must also be true. It’s sent through a `request.security(..., lookahead=barmerge.lookahead_off)` call so that it never “paints ahead.”
### H. Dynamic TP/SL Parameters
21. **TP as ATR Multiple**
* **Input type:** Float (default 2.0, step 0.1)
* **Description:** When a trade is open, the “take-profit” price is determined by looking at the highest high (for longs) or lowest low (for shorts) observed since entry, and then plotting a cross (“X”) at that level when the trend finally flips. This is purely for display. However, separate from that, this parameter can be adapted if you want a strictly ATR–based TP. In the “Minimal” version, TP is ≈ (highest high) once trend inverts, but you could rewrite it to use `entry_price + ATR×TP_Multiplier`.
22. **SL as ATR Multiple**
* **Input type:** Float (default 1.0, step 0.1)
* **Description:** While in a trade, a trailing SL line is plotted each bar. Its value is always `entry_price ± (ATR × SL_Multiplier)`. When the trend inverts, the SL no longer updates, and you see it on the chart.
### I. Display and Mode Options
23. **Show Debug Lines**
* **Input type:** Boolean (default true)
* **Description:** When enabled, the indicator will plot all intermediate lines—ATR SMA, ATR Threshold, +DI, –DI, ADX (current and HTF), HTF SMA, etc.—so that you can diagnose exactly what’s happening. Turn this off to hide all debug information and only see entry/exit shapes.
24. **Enable Scalping Mode**
* **Input type:** Boolean (default false)
* **Description:** If true, many of the “base” parameters are halved (e.g., RSI length becomes 7 instead of 14, ATR length becomes 7 instead of 14, ADX length becomes 7, etc.), and the ADX threshold is multiplied by 0.8. This makes all oscillators and moving averages more reactive, suited for very short-term (scalping) setups.
---
## 2. Core Calculation Blocks
Below is a high-level description of each logical block (in code order), translated from Pine into conceptual steps.
### A. Adjust Inputs if “Scalping Mode” Is On
If **Scalping Mode** = true, then:
* `RSI_Length` becomes `max(1, round(Base_RSI_Length / 2))`
* `EMA_Length` becomes `max(1, round(Base_EMA_Length / 2))`
* `ATR_Length` becomes `max(1, round(Base_ATR_Length / 2))`
* `Price_Change_Period` becomes `max(1, round(Base_Price_Change_Period / 2))`
* `SMA_Long_Length`, `SMA_Short1_Length`, and `SMA_Short2_Length` are each halved (minimum 1).
* `ADX_Length` = `max(1, round(Base_ADX_Length / 2))`
* `ADX_Threshold` = `Base_ADX_Threshold × 0.8`
* `Cooldown_Bars` = `max(0, round(Base_Cooldown_Bars / 2))`
Otherwise, all adjusted lengths = their base values.
### B. RSI, EMA & “AI Score” on Current Timeframe
1. **Compute RSI:**
* Uses the (possibly adjusted) `RSI_Length`.
* Denote this as `RSI_Value`.
2. **Compute ATR & Its SMA:**
* `ATR_Value` = `ta.atr(ATR_Length)`.
* `ATR_SMA` = `ta.sma(ATR_Value, ATR_SMA_Length)`.
* Then define `Volatility_Increase` = (`ATR_Value > ATR_SMA`).
* If the volatility has increased, the weighting of RSI vs. EMA changes.
3. **Compute Weights:**
* If `Volatility_Increase == true`, then:
* `RSI_Weight = 0.7`
* `EMA_Weight = 0.3`
* Otherwise:
* `RSI_Weight = 0.3`
* `EMA_Weight = 0.7`
4. **RSI Signal Component (`RSI_Sig`):**
* If `RSI_Value > RSI_Overbought`, then `RSI_Sig = –1`.
* Else if `RSI_Value < RSI_Oversold`, then `RSI_Sig = +1`.
* Otherwise, `RSI_Sig = 0`.
5. **EMA Value & Signal Component (`EMA_Sig`):**
* `EMA_Value` = `ta.ema(close, EMA_Length)`.
* `EMA_Sig = +1` if the current close crosses **above** the EMA; `EMA_Sig = –1` if the current close crosses **below** the EMA; else `0`.
6. **Compute Raw “AI Score”:**
$$
Raw\_AI = (RSI\_Sig \times RSI\_Weight)\;+\;(EMA\_Sig \times EMA\_Weight)
$$
Then,
$$
AI\_Score = \frac{Raw\_AI}{(RSI\_Weight + EMA\_Weight)}
$$
(This normalization ensures the score always ranges between –1 and +1 if both weights sum to 1.)
### C. Dynamic ATR Multiplier & Volatility Filter
1. **Volatility Factor:**
$$
Volatility\_Factor = \frac{ATR\_Value}{ATR\_SMA}
$$
2. **Dynamic ATR Multiplier:**
$$
ATR\_Multiplier = ATR\_Multiplier\_Base \times \sqrt{Volatility\_Factor}
$$
3. **High Volatility Condition (`High_Volatility`):**
* If `Disable_Volatility_Filter == true`, then treat `High_Volatility = true` always.
* Else, `High_Volatility = (ATR_Value > ATR_SMA × ATR_Multiplier)`.
### D. Price Change Percentage
* **Compute Price Change:**
$$
Price\_Change = \frac{(Close - Close )}{Close } \times 100
$$
* This is the percent return from `Price_Change_Period` bars ago to now.
* For a valid long‐trend signal, we require `Price_Change > 0`; for a short trend, `Price_Change < 0`.
### E. Local SMAs for Trend/Reversal Filters
* `SMA_Close_Long` = `ta.sma(close, SMA_Long_Length)`.
* `SMA_Close_Short1` = `ta.sma(close, SMA_Short1_Length)`.
* `SMA_Close_Short2` = `ta.sma(close, SMA_Short2_Length)`.
These three SMAs help define the “local trend” and reversal breakout points:
* **Primary Trend Filter:**
* Price must be above `SMA_Close_Long` for an uptrend filter, or below `SMA_Close_Long` for a downtrend filter.
* **Reversal Filter:**
* A bullish reversal is detected if **(RSI < Oversold AND close crosses above EMA)** OR **(RSI < Oversold AND close crosses above SMA\_Close\_Short1)**.
* A bearish reversal is detected if **(RSI > Overbought AND close crosses below EMA)** OR **(RSI > Overbought AND close crosses below SMA\_Close\_Short1)**.
### F. Manual +DI, –DI & ADX on Current Timeframe
Instead of relying on the built-in `ta.adx`, the script calculates DI and ADX manually. This makes it easier to replicate the exact logic on a higher timeframe via `request.security`. The steps are:
1. **Directional Movement (DM) Components:**
* `Up_Move` = `high – high `
* `Down_Move` = `low – low`
* `Plus_DM` = `Up_Move` if (`Up_Move > Down_Move` AND `Up_Move > 0`), else `0`
* `Minus_DM` = `Down_Move` if (`Down_Move > Up_Move` AND `Down_Move > 0`), else `0`
2. **True Range (TR) Components:**
* `TR1` = `high – low`
* `TR2` = `abs(high – close )`
* `TR3` = `abs(low – close )`
* `True_Range` = `max(TR1, TR2, TR3)`
3. **Smoothed Averages (RMA):**
* `Sm_TR` = `ta.rma(True_Range, ADX_Length)`
* `Sm_Plus` = `ta.rma(Plus_DM, ADX_Length)`
* `Sm_Minus`= `ta.rma(Minus_DM, ADX_Length)`
4. **Compute DI%:**
$$
Plus\_DI = \frac{Sm\_Plus}{Sm\_TR} \times 100,\quad
Minus\_DI = \frac{Sm\_Minus}{Sm\_TR} \times 100
$$
5. **DX and ADX:**
$$
DX = \frac{|Plus\_DI - Minus\_DI|}{Plus\_DI + Minus\_DI} \times 100,\quad
ADX = ta.rma(DX, ADX_Length)
$$
These values are referred to as `(plus_di, minus_di, adx_val)` for the current timeframe.
---
## 3. Higher Timeframe (HTF) Confirmation Function
If **Use Higher Timeframe Confirmation** is enabled, the script calls a single helper (Pine) function `f_htf` with two parameters: the ADX length and the SMA length (both taken from the “base” or “scaled” values). Internally, `f_htf` simply reruns the manual DI/ADX logic (same as above) on the higher timeframe’s bar data, and also includes that timeframe’s closing price and its SMA for trend comparison.
* **Request.Security Call:**
```
= request.security(
syminfo.tickerid,
higher_tf,
f_htf(adx_length, sma_long_len),
lookahead=barmerge.lookahead_off
)
```
* `lookahead=barmerge.lookahead_off` ensures that no HTF value “paints” early; you always see only confirmed HTF bars.
* The returned tuple provides:
1. `ht_close` = HTF closing price
2. `ht_sma` = HTF SMA of length `sma_long_len`
3. `ht_pdi` = HTF +DI percentage
4. `ht_mdi` = HTF –DI percentage
5. `ht_adx` = HTF ADX value
---
## 4. Trend & Reversal Filters (Current & HTF)
### A. Current-Timeframe Trend Filter
1. **Uptrend\_Basic (Current TF)**
$$
(plus\_di > minus\_di)\;\land\;(adx\_val > ADX\_Threshold)\;\land\;(close > SMA\_Close\_Long)
$$
2. **Downtrend\_Basic (Current TF)**
$$
(minus\_di > plus\_di)\;\land\;(adx\_val > ADX\_Threshold)\;\land\;(close < SMA\_Close\_Long)
$$
3. **Trend Confirmation by Bars:**
* `Bars_Since_Below` = number of bars since `close <= SMA_Close_Long`.
* `Bars_Since_Above` = number of bars since `close >= SMA_Close_Long`.
* If `Uptrend_Basic == true` AND `Bars_Since_Below ≥ Trend_Confirmation_Bars` → mark `Uptrend_Confirm = true`.
* If `Downtrend_Basic == true` AND `Bars_Since_Above ≥ Trend_Confirmation_Bars` → mark `Downtrend_Confirm = true`.
### B. Reversal Filters (Current TF)
1. **Bullish Reversal (`Rev_Bullish`):**
* If `(RSI < RSI_Oversold AND close crosses above EMA_Value)` OR
`(RSI < RSI_Oversold AND close crosses above SMA_Close_Short1)`
→ then `Rev_Bullish = true`.
2. **Bearish Reversal (`Rev_Bearish`):**
* If `(RSI > RSI_Overbought AND close crosses below EMA_Value)` OR
`(RSI > RSI_Overbought AND close crosses below SMA_Close_Short1)`
→ then `Rev_Bearish = true`.
### C. Higher-Timeframe Trend Filter (HTF)
1. **HTF Uptrend (`HT_Uptrend`):**
$$
(ht\_pdi > ht\_mdi)\;\land\;(ht\_adx > ADX\_Threshold)\;\land\;(ht\_close > ht\_sma)
$$
2. **HTF Downtrend (`HT_Downtrend`):**
$$
(ht\_mdi > ht\_pdi)\;\land\;(ht\_adx > ADX\_Threshold)\;\land\;(ht\_close < ht\_sma)
$$
3. **Combine Current & HTF:**
* If **Use\_HTF\_Confirmation == true**, then:
* `Uptrend_Confirm := Uptrend_Confirm AND HT_Uptrend`
* `Downtrend_Confirm := Downtrend_Confirm AND HT_Downtrend`
* Otherwise, just use the current timeframe’s `Uptrend_Confirm` and `Downtrend_Confirm`.
4. **Define `CurrentTrend` (Integer):**
* `CurrentTrend = +1` if `Uptrend_Confirm == true`.
* `CurrentTrend = –1` if `Downtrend_Confirm == true`.
* Otherwise, `CurrentTrend = 0`.
5. **Reset “One Trade Per Trend”:**
* There is a persistent variable `LastTradeTrend`.
* Every time `CurrentTrend` flips (i.e., `CurrentTrend != CurrentTrend `), the code sets `LastTradeTrend := 0`.
* That allows one new entry once the detected trend has changed.
---
## 5. One‐Time “Cooldown” Logic
* **`LastSignalBar`**
* A persistent integer (initially undefined).
* After each confirmed long or short entry, `LastSignalBar` is set to the bar index where that signal fired.
* **`Bars_Since_Signal`**
* If `LastSignalBar` is undefined, treat as a very large number (so that initial signals are always allowed).
* Otherwise, `Bars_Since_Signal = bar_index – LastSignalBar`.
* **Cooldown Check:**
* A new long (or short) can only be generated if `(Bars_Since_Signal > Signal_Cooldown)`.
* This prevents multiple signals in rapid succession.
---
## 6. Entry Conditions (No Repaint)
All of the conditions below are calculated “intrabar,” but the script only actually registers a **signal** on **bar close** (`barstate.isconfirmed`) so that signals never repaint.
### A. Trend‐Based “Raw” Conditions
1. **Trend\_Long\_Raw:**
$$
(AI\_Score > AI\_Score\_Threshold)\;\land\;Uptrend\_Confirm\;\land\;High\_Volatility\;\land\;(Price\_Change > 0)
$$
2. **Trend\_Short\_Raw:**
$$
(AI\_Score < -AI\_Score\_Threshold)\;\land\;Downtrend\_Confirm\;\land\;High\_Volatility\;\land\;(Price\_Change < 0)
$$
### B. Reversal “Raw” Conditions
1. **Rev\_Long\_Raw:**
$$
Rev\_Bullish\;\land\;(CurrentTrend \neq +1)
$$
2. **Rev\_Short\_Raw:**
$$
Rev\_Bearish\;\land\;(CurrentTrend \neq -1)
$$
### C. Combine Raw Signals
* `Raw_Long = Trend_Long_Raw OR Rev_Long_Raw`.
* `Raw_Short = Trend_Short_Raw OR Rev_Short_Raw`.
### D. Confirmed Long/Short Signal Flags
On each new bar **close** (`barstate.isconfirmed == true`):
* **Long\_Signal\_Confirmed** can fire if:
1. `Raw_Long == true`
2. `LastTradeTrend != +1` (we haven’t already taken a long in this same trend)
3. `Bars_Since_Signal > Signal_Cooldown`
If all three hold, then on this bar close the code sets:
* `Long_Signal = true`
* `LastTradeTrend := +1`
* `LastSignalBar := bar_index`
Otherwise, `Long_Signal := false` on this bar.
* **Short\_Signal\_Confirmed** works the same way but with `Raw_Short`, `LastTradeTrend != -1`, etc.
If triggered, it sets `Short_Signal = true`, `LastTradeTrend := -1`, and `LastSignalBar := bar_index`. Otherwise `Short_Signal := false`.
* **Important:** If the bar is still forming (`else` branch of `barstate.isconfirmed`), then both `Long_Signal` and `Short_Signal` are forced to `false`. This guarantees that no shape or alert appears until the bar actually closes.
---
## 7. Plotting Entry/Exit Shapes
1. **Trend Long Signal (Triangle Up)**
* Condition: `Long_Signal == true` **AND** `Trend_Long_Raw == true`.
* Appearance: A small, semi-transparent lime green triangle drawn **below** the bar.
2. **Trend Short Signal (Triangle Down)**
* Condition: `Short_Signal == true` **AND** `Trend_Short_Raw == true`.
* Appearance: A small, semi-transparent maroon triangle drawn **above** the bar.
3. **Reversal Long Signal (Circle)**
* Condition: `Long_Signal == true` **AND** `Rev_Long_Raw == true`.
* Appearance: A tiny, more transparent green circle drawn **below** the bar.
4. **Reversal Short Signal (Circle)**
* Condition: `Short_Signal == true` **AND** `Rev_Short_Raw == true`.
* Appearance: A tiny, more transparent red circle drawn **above** the bar.
Since `Long_Signal` and `Short_Signal` only ever become true at bar close, these shapes are never repainted or removed once drawn.
---
## 8. Unified Alert Message
* As soon as a new bar closes with either `Long_Signal` or `Short_Signal == true`, an alert message is sent:
* If `Long_Signal`, then `alert_msg = "action=BUY"`.
* If `Short_Signal`, then `alert_msg = "action=SELL"`.
* If neither, `alert_msg = ""` (no alert).
* The code calls `alert(alert_msg, freq=alert.freq_once_per_bar)` only if `barstate.isconfirmed` and `alert_msg` is non‐empty. This ensures exactly one alert per confirmed bar, no intrabar pops.
---
## 9. Dynamic TP/SL Logic (Minimal Implementation)
Once a long or short position is “open,” the script tracks these variables:
1. **Persistent Flags and Prices** (all persist between bars until reset):
* `InLong` (Boolean)
* `InShort` (Boolean)
* `Long_Max` (Float)
* `Short_Min` (Float)
* `Entry_Price` (Float)
2. **On Bar Close:**
* If `Long_Signal == true` →
* Set `InLong := true`,
* `Entry_Price := close` of that bar,
* `Long_Max := high ` (last bar’s high, so that we’re not using “future” data).
* If `Short_Signal == true` →
* Set `InShort := true`,
* `Entry_Price := close`,
* `Short_Min := low `.
3. **While `InLong == true`:**
* Continuously update `Long_Max = max(Long_Max, current high)` on each bar (intrabar, but finalized each close).
* Compute a dynamic SL:
$$
SL_{Long} = Entry\_Price - (ATR \times SL\_ATR\_Multiplier).
$$
* If **current trend** flips to non-uptrend (`CurrentTrend != +1`), mark `ExitLong = true`.
* Then the routine plots `TP_Long = Long_Max` as a cross (“X”) at that level.
* Set `InLong := false` so that no further changes to `Long_Max` or `Entry_Price` happen on future bars.
4. **While `InShort == true`:**
* Continuously update `Short_Min = min(Short_Min, current low)`.
* Compute a dynamic SL:
$$
SL_{Short} = Entry\_Price + (ATR \times SL\_ATR\_Multiplier).
$$
* If trend flips to non-downtrend (`CurrentTrend != –1`), mark `ExitShort = true`.
* Then the routine plots `TP_Short = Short_Min`.
* Set `InShort := false` to freeze those values.
5. **Plotting TP/SL if “Show Debug” is On:**
* **TP Shapes:**
* When `ExitLong == true`, plot a solid lime “X” at `TP_Long` (highest high).
* When `ExitShort == true`, plot a solid maroon “X” at `TP_Short` (lowest low).
* **SL Lines:**
* If still `InLong`, draw a thin red line at `SL_Long` on each bar.
* If still `InShort`, draw a thin green line at `SL_Short`.
Thus, your charts visually show the highest‐high take-profit cross for longs, the lowest-low take-profit cross for shorts, and a continuously updating trailing SL until the trend flips. Because all of this is triggered on confirmed bars, nothing “jumps around” after the fact.
---
## 10. Debug‐Only Plot Lines (When Enabled)
When **Show Debug Lines** = true, the indicator will also plot:
1. **ATR SMA (Orange):**
* The simple moving average of ATR over `ATR_SMA_Length`.
2. **ATR Threshold (Yellow):**
* `ATR_SMA × ATR_Multiplier` (the dynamically scaled threshold).
3. **+DI & –DI (Current TF):**
* +DI plotted as a green line, –DI plotted as a red line (opacity \~70%).
4. **ADX (Current TF, Blue):**
* A blue line for the present timeframe’s ADX.
5. **ADX Threshold (Gray):**
* A horizontal gray line showing `ADX_Threshold`.
6. **+DI & –DI (HTF, Darker Colors):**
* If HTF confirmation is on, “HTF +DI” is a greener but more transparent line; “HTF –DI” is a redder but more transparent line.
7. **ADX (HTF, Blue but Transparent):**
* HTF ADX plotted in blue (high transparency).
8. **HTF SMA (Orange, Transparent):**
* The higher timeframe’s SMA (same length as `SMA_Long_Length`), drawn in fainter orange.
9. **Volatility Zone Fill (Yellow Tinted Area):**
* Fills the area between `ATR_SMA` and `ATR_SMA × ATR_Multiplier`.
* Indicates “normal” versus “high‐volatility” regimes.
These debug lines are purely visual aids. Disable them if you want a cleaner chart.
---
## 11. Putting It All Together — Step-By-Step Flow
1. **Read Inputs** (RSI lengths, EMA length, ATR settings, etc.).
2. **Optionally Halve All Lengths** if “Scalping Mode” is checked.
3. **Calculate Current TF Indicators:**
* RSI, ATR, ATR\_SMA, EMA, price change, various SMAs, DI/ADX.
4. **Compute “AI Score”** (weighted sum of RSI and EMA signals).
5. **Compute Dynamic ATR Multiplier** and decide if “High Volatility” is true.
6. **Compute Raw Trend/Reversal Conditions** on the current timeframe (without triggering yet).
7. **Fetch HTF Values** in one `request.security` call (SMAs, DI/ADX).
8. **Combine Current & HTF Trend Filters** to confirm `Uptrend_Confirm` or `Downtrend_Confirm`.
9. **Check Reversal Conditions** (price crossing EMA or SMA short, in overbought/oversold zones).
10. **Enforce “One Trade Per Trend”** (clear `LastTradeTrend` whenever `CurrentTrend` flips).
11. **Enforce Cooldown** (must wait at least `Signal_Cooldown` bars since the prior signal).
12. **On Bar Close:**
* If `Raw_Long` AND not already in a long trend AND cooldown met, then fire `Long_Signal`.
* Else if `Raw_Short` AND not already in a short trend AND cooldown met, then fire `Short_Signal`.
* Otherwise, no new signal on this bar.
13. **Plot Long/Short Entry Shapes** according to whether it was a Trend signal or a Reversal signal.
14. **Send Alert** (“action=BUY” or “action=SELL”) exactly once per confirmed bar.
15. **If New Long/Short Signal, Set `InLong`/`InShort`, Record Entry Price, Initialize `Long_Max`/`Short_Min`.**
16. **While `InLong` is true:** Update `Long_Max = max(previous Long_Max, current high)`. Compute `SL_Long`. If the current trend flips (no longer uptrend), set `ExitLong = true`, plot a “TP X,” and close the position logic.
17. **While `InShort` is true:** Similarly update `Short_Min`, compute `SL_Short`, and if trend flips, set `ExitShort = true`, plot a “TP X,” and close the position logic.
18. **Optionally Display Debug Lines** (ATR SMA, ATR threshold, DI/ADX, HTF DI/ADX, etc.).
---
## 12. How to Use in TradingView Community
When you publish this indicator to the TradingView community—choosing “Protected” or “Invite-only” visibility—you can paste the above description into the “Description” field. Users will see exactly what each input does, how signals are generated, and what the various plotted lines represent, **without ever seeing the script source**. In this way, the code itself remains hidden but the logic is fully documented.
1. **Go to “Create New Indicator”** on TradingView.
2. **Paste Your Pine Code** (the full indicator script) in the Pine editor and save it.
3. **Set Visibility = Protected** (or Invite-only).
4. **In the “Description” Text Box, paste the entirety of this document** (steps 1–11).
5. **Click “Publish Script.”**
Users who view your indicator will see its name (“AI Strat Adaptive v3 (NoRepaint)”), a list of all inputs (with default values), and the detailed English description above. They can then load it on any chart, adjust inputs, and see the plotted signals, TP/SL lines, and optional debug overlays—without accessing the underlying Pine code.
---
### Summary of Key Points
* **RSI, EMA, ATR, DI/ADX, and “AI Score”** work together to define “trend vs. reversal.”
* **Dynamic volatility filter** uses ATR and ATR\_SMA to adapt the weighting of RSI vs. EMA and decide whether “volatility is high enough” to permit a trend trade.
* **One trade per detected trend** and a **cooldown period** prevent over‐trading.
* **Higher timeframe confirmation** (optional) further filters out noise.
* **No-repaint logic**:
* All signals only appear at bar close (`barstate.isconfirmed`).
* HTF values are fetched with `lookahead=barmerge.lookahead_off`.
* **Entry shapes** (triangles and circles) clearly mark trend vs. reversal entries.
* **Dynamic TP/SL**: highest‐high (or lowest‐low) since entry is used as TP, ATR×multiplier as SL.
* **Debug mode** (optional) shows every intermediate line for full transparency.
Use this description verbatim (or adapt it slightly for your personal style) when publishing. That way, your community sees exactly how each component works—inputs, functions, filters—while the Pine source code remains private.
CandelaCharts - Turtle Soup Model📝 Overview
The ICT Turtle Soup Model indicator is a precision-engineered tool designed to identify high-probability reversal setups based on ICT’s renowned Turtle Soup strategy.
The Turtle Soup Model is a classic reversal setup that exploits false breakouts beyond previous swing highs or lows. It targets areas where retail traders are trapped into breakout trades, only for the price to reverse sharply in the opposite direction.
Price briefly breaks a previous high (for short setups) or low (for long setups), triggering stop orders and pulling in breakout traders. Once that liquidity is taken, smart money reverses price back inside the range, creating a high-probability fade setup.
📦 Features
Liquidity Levels: Projects forward-looking liquidity levels after a Turtle Soup model is formed, highlighting potential price targets. These projected zones act as magnet levels—areas where price is likely to reach based on the liquidity draw narrative. This allows traders to manage exits and partials with more precision.
Market Structure Shift (MSS): Confirms reversal strength by detecting a bullish or bearish MSS after a sweep. Acts as a secondary confirmation to filter out weak setups.
Custom TF Pairing: Choose your own combination of entry timeframe and context timeframe. For example, trade 5m setups inside a 1h HTF bias — perfect for aligning microstructure with macro intent.
HTF & LTF PD Arrays: Displays HTF PD Arrays (e.g., Fair Value Gaps, Inversion Fair Value Gaps) to serve as confluence zones.
History: Review and backtest past Turtle Soup setups directly on the chart. Toggle historical models on/off to study model behavior across different market conditions.
Killzone Filter: Limit signals to specific trading sessions or time blocks (e.g., New York AM, London, Asia, etc). Avoid signals in low-liquidity or choppy environments.
Standard Deviation: Calculates and projects four levels of standard deviation from the point of model confirmation. These zones help identify overextended moves, mean-reversion opportunities, and confluence with liquidity or PD arrays.
Dashboard: The dashboard displays the active model type, remaining time of the HTF candle, current bias, asset name, and date—providing real-time context and signal clarity at a glance.
⚙️ Settings
Core
Status: Filter models based on status
Bias: Controls what model type will be displayed, bullish or bearish
Fractal: Controls the timeframe pairing that will be used
High Probability Models: Detects and plots only the high-probability models
Sweeps
Sweep: Shows the sweep that forms a model
I-sweep: Controls the visibility of invalidated sweeps
D-purge: Plots the double purge sweeps
S-area: Highlights the sweep area
Liquidity
Liquidity: Displays the liquidity levels that belong to the model
MSS
MSS: Displays the Market Structure Shift for a model
History
History: Controls the number of past models displayed on the chart
Filters
Asia: Filter models based on Asia Killzone hours
London: Filter models based on London Killzone hours
NY AM: Filter models based on NY AM Killzone hours
NY Launch: Filter models based on NY Launch Killzone hours
NY PM: Filter models based on NY PM Killzone hours
Custom: Filter models based on user Custom hours
HTF
Candles: Controls the number of HTF candles that will be visible on the chart
Candles T: Displays the model’s third timeframe candle, which serves as a confirmation of directional bias
NY Open: Display True Day Open line
Offset: Controls the distance of HTF from the current chart
Space: Controls the space between HTF candles
Size: Controls the size of HTF candles
PD Array: Displays ICT PD Arrays
CE Line: Style the equilibrium line of PD Array
Border: Style the border of the PD Array
LTF
H/L Line: Displays on the LTF chart the High and Low of each HTF candle
O/C Line: Displays on the LTF chart the Open and Close of each HTF candle
PD Array: Displays ICT PD Arrays
CE Line: Style the equilibrium line of PD Array
Border: Style the border of the PD Array
Standard Deviation
StDev: Controls standard deviation of available levels
Labels: Controls the size of standard deviation levels
Lines: Controls the line widths and color of standard deviation levels
Dashboard
Panel: Display information about the current model
💡 Framework
The Turtle Soup Model is designed to detect and interpret false breakout patterns by analyzing key price action components, each playing a vital role in identifying liquidity traps and generating actionable reversal signals.
The model incorporates the following timeframe pairing:
15s - 5m - 15m
1m - 5m - 1H
2m - 15m - 2H
3m - 30m - 3H
5m - 60m - 4H
15m - 1H - 8H
30m - 3H - 12H
1H - 4H - 1D
4H - 1D - 1W
1D - 1W - 1M
1W - 1M - 6M
1M - 6M - 12M
Below are the key components that make up the model:
Sweep
D-purge
MSS
Liquidity
Standard Deviation
HTF & LTF PD Arrays
The Turtle Soup Model operates through a defined lifecycle that identifies its current state and determines the validity of a trade opportunity.
The model's lifecycle includes the following statuses:
Formation (grey)
Invalidation (red)
Pre-Invalidation (purple)
Success (green)
By incorporating the phases of Formation, Invalidation, and Success, traders can effectively manage risk, optimize position handling, and capitalize on the high-probability opportunities presented by the Turtle Soup Model.
⚡️ Showcase
Introducing the Turtle Soup Model — a powerful trading tool engineered to detect high-probability false breakout reversals. This indicator helps you pinpoint liquidity sweeps, confirm market structure shifts, and identify precise entry and exit points, enabling more confident, informed, and timely trading decisions.
LTF PD Array
LTF PD Arrays are essential for model formation—a valid Turtle Soup setup will only trigger if a qualifying LTF PD Array is present near the sweep zone.
HTF PD Array
HTF PD Arrays provide macro-level context and are used to validate the direction and strength of the potential reversal.
Timeframe Alignment
In the Turtle Soup trading model, timeframe alignment is an essential structural component. The model relies on multi-timeframe context to identify high-probability reversal setups based on failed breakouts.
High-Probability Model
A high-probability setup forms when key elements align: a Sweep, Market Structure Shift (MSS), LTF and HTF PD Arrays.
Killzone Filters
Filter Turtle Soup Models based on key market sessions: Asia, London, New York AM, New York Launch, and New York PM . This allows you to focus on high-liquidity periods where smart money activity is most likely to occur, improving both the quality and timing of your trade setups.
Unlock your trading edge with the Turtle Soup Model — your go-to tool for sharper insights, smarter decisions, and more confident execution in the markets.
🚨 Alerts
This script offers alert options for all model types. The alerts need to be set up manually from TradingView.
Bearish Model
A bearish model alert is triggered when a model forms, signaling a high sweep, MS,S and LTF PD Array.
Bullish Model
A bullish model alert is triggered when a model forms, signaling a low sweep, MSS and LTF PD Array.
⚠️ Disclaimer
These tools are exclusively available on the TradingView platform.
Our charting tools are intended solely for informational and educational purposes and should not be regarded as financial, investment, or trading advice. They are not designed to predict market movements or offer specific recommendations. Users should be aware that past performance is not indicative of future results and should not rely on these tools for financial decisions. By using these charting tools, the purchaser agrees that the seller and creator hold no responsibility for any decisions made based on information provided by the tools. The purchaser assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses or investment outcomes that may result from the use of these products.
By purchasing, the customer acknowledges and accepts that neither the seller nor the creator is liable for any undesired outcomes stemming from the development, sale, or use of these products. Additionally, the purchaser agrees to indemnify the seller from any liability. If invited through the Friends and Family Program, the purchaser understands that any provided discount code applies only to the initial purchase of Candela's subscription. The purchaser is responsible for canceling or requesting cancellation of their subscription if they choose not to continue at the full retail price. In the event the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable.
We do not offer reimbursements, refunds, or chargebacks. Once these Terms are accepted at the time of purchase, no reimbursements, refunds, or chargebacks will be issued under any circumstances.
By continuing to use these charting tools, the user confirms their understanding and acceptance of these Terms as outlined in this disclaimer.