OPEN-SOURCE SCRIPT
Aktualisiert

Hourly Opening Price

4 159
The Inner Circle Trader has noted that the Opening Price of every Hourly candle can be used in a Power Of 3 (PO3) context.

  • If Bullish, buy BELOW the hourly open.

  • If Bearish, sell ABOVE the hourly open.


The Power of 3 ICT model also know as "AMD" is a transformative trading strategy, ingeniously designed to streamline your time analyzing charts by focusing on three pivotal phases in market behavior: accumulation, manipulation, and distribution.

The ICT Power of Three Model dissects the market maker’s algorithm for price delivery into three pivotal actions: Accumulation, Manipulation, and Distribution. Accumulation involves smart money gathering positions before a price surge, while manipulation sees the market creating deceptive movements to trigger stops. Finally, distribution occurs as smart money offloads positions, often catching less informed traders off-guard. This strategy is a critical tool for traders to understand market makers’ maneuvers and to strategically position themselves in the market.


This indicator plots a line at the opening price of each hour and extends it on the chart for the duration of the hour. Each hour starts a new line.

You also have the option of extending the midnight opening price line across the entire trading day.



Versionshinweise
*Added Midnight Price Label option and extended Midnight open line through entire calendar day.
Versionshinweise
*Minor tweak to label
Versionshinweise
*Minor Fix
Versionshinweise
Updated Timezone function to accommodate different exchanges.
Versionshinweise
Bug Fix
Versionshinweise
** Updated to work on seconds time frame.
Versionshinweise
Changed behavior of Midnight Open line and label.
Versionshinweise
Accurate Hourly Range Tracking
Added dedicated arrays for storing historical range data for each hour
Implemented high/low tracking for precise range calculation
Added detection of hour transitions to properly record completed hours

Range Statistics
Added calculation of average ranges based on historical data
Implemented percentage tracking to show how much of average range has been used
Added identification of hours with highest and lowest average ranges

Enhanced Display Options
Created a table display for range statistics
Added formatted range values with appropriate decimal places
Added color coding to highlight the current hour


Versionshinweise
Changed table to better reflect actual hourly statistics.
Versionshinweise
Label fix
Versionshinweise
Shows actual lookback when it is less than the user defined lookback.
Versionshinweise
Range calculations rounded to symbol minimum tick value.
Versionshinweise
Added Average/Median Option: New dropdown to choose between "Average" or "Median" for all range statistics calculations and displays
Statistics now calculate for all hours even when labels are disabled, ensuring the table always shows complete 24-hour data
Versionshinweise
Range Statistics
The indicator tracks the high-low range for each hour over a configurable lookback period (default 10 days) and calculates either the average or median range for each hour. This helps traders understand:

How much movement to expect during specific hours
Which hours tend to have the largest/smallest ranges
What percentage of the typical range has been "used up" in the current hour

Skew Function - Detailed Explanation
The skew function analyzes the distribution of historical range values to determine if the data is balanced or skewed in one direction.
How It Works:
1. Data Collection:
For the current hour, the indicator looks at the last N days (e.g., 10 days) of range data. Using your example:

Data points: 26.75, 35, 42, 45, 48, 55, 62, 95, 150, 242.5
Average (mean): 92.75
Median: 48

2. Distance-Based Calculation:
Instead of simply counting how many values are above vs. below the mean, the skew function calculates the total distance of values from the mean:

Above the mean:

95 is 2.25 away (95 - 92.75)
150 is 57.25 away (150 - 92.75)
242.5 is 149.75 away (242.5 - 92.75)
Total above distance: 209.25


Below the mean:

26.75 is 66 away (92.75 - 26.75)
35 is 57.75 away
42 is 50.75 away
45 is 47.75 away
48 is 44.75 away
55 is 37.75 away
62 is 30.75 away
Total below distance: 335.5



3. Skew Percentage:
The skew is calculated as:
Skew % = ((above_distance - below_distance) / total_distance) × 100
Skew % = ((209.25 - 335.5) / 544.75) × 100 = -23.2%
4. Interpretation:

Positive skew (>threshold%): "↑X% Upward" - A few large values pull the distribution upward (right-skewed). The mean is higher than the median.
Negative skew (>threshold%): "↓X% Downward" - A few small values pull the distribution downward (left-skewed). The mean is lower than the median.
Balanced (<threshold%): The distribution is relatively symmetric around the mean.

The threshold (default 60%) determines how much skew is needed before it's labeled as directional rather than balanced.
Why This Matters:
Understanding skew helps traders know if the typical range for an hour is:

Consistently similar (balanced) - predictable behavior
Occasionally explosive (upward skew) - rare large moves inflate the average
Usually smaller with rare compression (downward skew) - uncommon tight ranges

This context helps set realistic expectations and identify when current price action is behaving normally versus exceptionally for that specific hour.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.