OPEN-SOURCE SCRIPT
已更新 Hourly Opening Price

The Inner Circle Trader has noted that the Opening Price of every Hourly candle can be used in a Power Of 3 (PO3) context.
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.
- 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.
版本注释
*Added Midnight Price Label option and extended Midnight open line through entire calendar day.版本注释
*Minor tweak to label版本注释
*Minor Fix版本注释
Updated Timezone function to accommodate different exchanges.版本注释
Bug Fix版本注释
** Updated to work on seconds time frame.版本注释
Changed behavior of Midnight Open line and label.版本注释
Accurate Hourly Range TrackingAdded 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
版本注释
Changed table to better reflect actual hourly statistics.版本注释
Label fix版本注释
Shows actual lookback when it is less than the user defined lookback.版本注释
Range calculations rounded to symbol minimum tick value.版本注释
Added Average/Median Option: New dropdown to choose between "Average" or "Median" for all range statistics calculations and displaysStatistics now calculate for all hours even when labels are disabled, ensuring the table always shows complete 24-hour data
版本注释
Range StatisticsThe 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.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。