ICT-PF/W

ICT-PF/W (Weekly Profiles)

⚠️ WARNING / DISCLAIMER: This indicator is designed exclusively as an educational tool for studying, backtesting, and learning ICT Weekly Profiles. It should not be used for live forecasting or live trading with real funds. Because the engine dynamically tracks evolving price structures and absolute price extremes, the profile classifications will update and repaint during an active, unclosed weekly session.


1. Overview

The ICT-PF/W (Weekly Profiles) indicator is a comprehensive, advanced analytical tool designed to track, categorize, and record weekly price action into the 12 classic ICT (Inner Circle Trader) weekly profiles. By analyzing the structural points of the week—the Monday open, the specific days of the highest/lowest points, and dynamic volatility consolidation—the indicator plots an intelligent weekly swing path and automatically classifies the week's behavior. Paired with a robust statistical ranking table, it provides an all-in-one solution for studying weekly delivery cycles and algorithmic price signatures.


2. Logic

2.1. The 12 Classic ICT Profiles
The core logic anchors to the start of the week (Monday) and tracks the week's extreme points (High and Low) in real time. The indicator categorizes the week into one of 12 distinct ICT Weekly Profiles:
  • Classic Tuesday Low of the Week (Bullish)
  • Classic Tuesday High of the Week (Bearish)
  • Wednesday Low of Week (Bullish)
  • Wednesday High of Week (Bearish)
  • Consolidation Thursday Bullish Reversal
  • Consolidation Thursday Bearish Reversal
  • Consolidation Midweek Rally (Bullish)
  • Consolidation Midweek Decline (Bearish)
  • Seek & Destroy Bullish Friday
  • Seek & Destroy Bearish Friday
  • Wednesday Weekly Reversal (Bullish)
  • Wednesday Weekly Reversal (Bearish)

2.2. Advanced Profile Mapping Logic
To accurately differentiate between these 12 profiles, the script uses a sophisticated, hierarchical mapping engine:
  • Multi-Condition Parsing: It checks for complex structural signatures first (e.g., "Seek & Destroy" profiles require specific highs and lows on Thursday and Friday) to prevent misidentification.
  • Contextual Consolidation Analysis: To identify a true "Wednesday Weekly Reversal," the script actively measures the combined price range of Monday and Tuesday. It compares this range against the asset's Average True Range (ATR). If the early-week range is unusually tight (below the ATR threshold), it confirms the consolidation phase necessary for this specific reversal profile.
  • Fallback Extremes: If complex structural rules are not met, it defaults to the classic method of mapping profiles based strictly on the day the absolute high or low was formed.

2.3. Intelligent Swing Path Visualization
The indicator draws a dynamic path connecting the week's structural points, overlaying a bullish or bearish bounding box. For historical data, users can utilize the custom Volatility ZigZag Algorithm. Instead of arbitrary mathematical pivots, it uses the asset's ATR to filter out market noise and draw precise intra-week swing legs (Standard, Medium, or High detail) that beautifully mimic the classic ICT schematics.

2.4. Historical Ranking System
As the indicator processes historical weeks, it logs the identified profiles into an internal database. A Ranking Table is generated on the chart, dynamically sorting and displaying the frequency of each profile across the analyzed dataset, complete with percentages and the typical days for highs and lows.


3. Settings & Options

3.1. General Settings
  • History: Determines how many historical weekly boxes and swing paths are kept visible on the chart (0 to 4).
  • Time zone: Aligns the day-of-week calculations to your preferred regional time zone (London, New York, Tokyo).

3.2. Profile Fine-Tuning
  • Enable Wednesday Reversal Logic: Toggles the advanced Mon-Tue consolidation analysis.
  • Consolidation Multiplier (x ATR): Controls how "tight" the early-week range must be to qualify as consolidation. A lower number requires a tighter range; a higher number is more lenient.

3.3. Box Settings
  • Bullish / Bearish Box: Color customization for the profile bounding boxes based on market direction.

3.4. Weekly Profile Line
  • Line Detail: Choose the visual sensitivity of the swing path. "Standard" draws the basic 3-leg profile based on absolute extremes. "Medium" and "High" intelligently track extra intra-week swings based on ATR volatility thresholds.
  • Style, Thickness & Color: Full visual customization for the swing path lines.

3.5. Weekly Profile Label
  • Size & Style: Format the label text inside the box.
  • Position: Snap the label to any corner or center position inside the weekly bounding box.
  • Color: Custom text color.

3.6. Ranking Table
  • Show Ranking Table: Toggle the visibility of the historical statistics table.
  • Position: Snap the table to any corner or edge of the chart.
  • Formatting & Colors: Deep customization for table text, headers, and backgrounds.


4. Under the Hood: Engineered for Performance

This indicator is built from the ground up utilizing native, modern Pine Script v6 features to ensure maximum efficiency and visual stability on your charts:

  • Modern Object-Oriented Logic: Leverages Pine Script v6’s advanced data structures, mapping custom arrays to efficiently manage and track dynamic swing lines and bounding boxes without dragging down chart performance.
  • Deep Historical Rendering: Utilizes time-based coordinate drawing logic, allowing for deep, accurate historical mapping.
  • Performance-Optimized execution: Employs a bifurcated logic model. Historical weeks are processed using the more intensive Volatility ZigZag algorithms only once (when the week closes), while the current live week relies on lightweight, tick-by-tick extreme tracking to ensure the indicator remains responsive during fast market action.
  • Important Note on Real-Time Profiles (Live Repainting): As a week develops, the "LIVE" profile label and its associated swing lines will dynamically update (repaint) in real-time as new absolute highs or lows are formed. A profile's classification is only finally and definitively “locked in and confirmed” once the week officially closes on Friday.


5. Link to TradingView Publication

https://www.tradingview.com/script/xdJ0BZre-ICT-PF-W-Weekly-Profiles/