OPEN-SOURCE SCRIPT

Volatility and Volume by Hour EXT

(Extended republication, use this instead of the old one)

The goal of this indicator is to show a “characteristic” of the instrument, regarding the price change and trading volume. You can see how the instrument “behaved” throughout the day in the lookback period. I've found this useful for timing in day trading.

The indicator creates a table on the chart to display various statistics for each hour of the day.

Important: ONLY SHOWS THE TABLE IF THE CHART’S TIMEFRAME IS 1H!

Explanation of the columns:


1. Volatility Percentage (Volat): This column shows the volatility of the price as a percentage. For example, a value of "15%" means the price movement was 15% of the total daily price movement within the hour.

2. Hourly Point Change (PointCh): This column shows the change in price points for each hour in the lookback period. For example, a value of "5" means the price has increased by 5 points in the hour, while "-3" means it has decreased by 3 points.

3. Hourly Point Change Percentage (PrCh% (LeverageX)): This column shows the percentage change in price points for each hour, adjusted with leverage multiplier. Displayed green (+) or red (-) accordingly. For example, a value of "10%" with a leverage of 2X means the price has effectively changed by 5% due to the leverage.

4. Trading Volume Percentage (TrVol): This column shows the percentage of the daily total volume that was traded in a specific hour. For example, a value of "10%" would mean that 10% of the day's total trading volume occurred in that hour.

5. Added New! - Relevancy Check:The indicator checks the last 24 candle. If the direction of the price movement was the same in the last 24 hour as the statistical direction in that hour, the background of the relevant hour in the second column goes green.
For example: if today at 9 o'clock the price went lower, so as at 9 o'clock in the loopback period, the instrument "behaves" according to statistics. So the statistics is probably more relevant for today. The more green background row the more relevancy.

Settings:
1. Lookback period: The lookback period is the number of previous bars from which data is taken to perform calculations. In this script, it's used in a loop that iterates over a certain number of past bars to calculate the statistics. TIP: Select a period the contains a trend in one direction, because an upward and a downward trend compensate the price movement in opposite directions.

2. Timezone: This is a string input that represents the user's timezone. The default value is "UTC+2". Adjust it to your timezone in order to view the hours properly.

3. Leverage: The default value is 10(!). This input is used to adjust the hourly point change percentage. For FOREX traders (for example) the statistics can show the leveraged percentage of price change. Set that according the leverage you trade the instrument with.

Use at your own risk, provided “as is” basis!

Hope you find it useful! Cheers!
pricemovementstatisticstatisticsVolatilityvolatiltyvolumeanalysisVolume

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항