TradingView
twingall
21 Th07 2023 22:22

High of Day Low of Day hourly timings: Statistics. Time of day % 

E-mini S&P 500 FuturesCME

Mô tả

High of Day (HoD) & Low of Day (LoD) hourly timings: Statistics. Time of day % likelihood for high and low.

//Purpose:
To collect stats on the hourly occurrences of HoD and LoD in an asset, to see which times of day price is more likely to form its highest and lowest prices.

//How it works:
Each day, HoD and LoD are calculated and placed in hourly 'buckets' from 0-23. Frequencies and Percentages are then calculated and printed/tabulated based on the full asset history available.

//User Inputs:
-Timezone (default is New York); important to make sure this matches your chart's timezone
-Day start time: (default is Tradingview's standard). Toggle Custom input box to input your own custom day start time.
-Show/hide day-start vertical lines; show/hide previous day's 'HoD hour' label (default toggled on). To be used as visual aid for setting up & verifying timezone settings are correct and table is populating correctly).
-Use historical start date (default toggled off): Use this along with bar-replay to backtest specific periods in price (i.e. consolidated vs trending, dull vs volatile).
-Standard formatting options (text color/size, table position, etc).
-Option to show ONLY on hourly chart (default toggled off): since this indicator is of most use by far on the hourly chart (most history, max precision).

// Notes & Tips:
-Make sure Timezone settings match (input setting & chart timezone).
-Play around with custom input day start time. Choose a 'dead' time (overnight) so as to ensure stats are their most meaningful (if you set a day start time when price is likely to be volatile or trending, you may get a biased / misleadingly high readout for the start-of-day/ end-of-day hour, due to price's tendency for continuation through that time.
-If you find a time of day with significantly higher % and it falls either side of your day start time. Try adjusting day start time to 'isolate' this reading and thereby filter out potential 'continuation bias' from the stats.
-Custom input start hour may not match to your chart at first, but this is not a concern: simply increment/decrement your input until you get the desired start time line on the chart; assuming your timezone settings for chart and indicator are matching, all will then work properly as designed.
-Use the the lines and labels along with bar-replay to verify HoD/LoD hours are printing correctly and table is populating correctly.
-Hour 'buckets' represent the start of said hour. i.e. hour 14 would be populated if HoD or LoD formed between 14:00 and 15:00.
-Combined % is simply the average of HoD % and LoD %. So it is the % likelihood of 'extreme of day' occurring in that hour.
-Best results from using this on Hourly charts (sub-hourly => less history; above hourly => less precision).
-Note that lower tier Tradingview subscriptions will get less data history. Premium acounts get 20k bars history => circa 900 days history on hourly chart for ES1!
-Works nicely on Btc/Usd too: any 24hr assets this will give meaningful data (whereas some commodities, such as Lean Hogs which only trade 5hrs in a day, will yield less meaningful data).

Example usage on S&P (ES1! 1hr chart): manual day start time of 11pm; New York timezone; Visual aid lines and labels toggled on. HoD LoD hour timings with 920 days history:




Phát hành các Ghi chú

--Main Update: Added specific Day of week input (choose 'ALL' or chose specific day to get data from a specific day of the week only).
~ Working only with TradingView default new day start times (i.e. this feature will not apply when 'use custom input day start hour' is toggled on).

--Other updates & notes:
~Fixed label position error in High of day label
~Added Low of day label option
~Fixed Friday data fill error on traditional assets
~Please note that bank holiday early-close sessions may cause minor data skew for traditional assets.

Demo of Specific Day of week selection usage & display timezone input:
Bình luận
akutsusho
I found a treasure!!
twingall
@akutsusho, Thank you very much!
SenBa009
I just stubbled upon your profile and indicators. Amazing analysis and great work. I will spend more time this weekend on all your indicators. Do you have any top 5 indicator preference? @twingall Thanks and i really appreciate your work.
JMF_Tattoo
Just found your page, incredible work man. Great job on that stats tables. Have been focusing heavy on many of these in excel recently as well. Great on chart implementation.
twingall
@JMF_Tattoo, Thanks!
edjd374
Great work! It's excellent!
morgansteyn
Amazing work! Is it possible to show data based on whether the day was bullish or bearish? Eg. If is was a bullish close day - show only the LOD time data/ If it was a bearish day - show only the HOD time data. Same for the day of week or custom session indicator - if the london killzone (02h00 - 05h00) was bullish, show time data for the LOD only or if New york kill zone was bearish, show time data for HOD only. This will help traders who do not use daily bias. Willing to pay for this bro! 🙏
NickMaterazzo
Wow, love this. I do all my stats by pulling data into Sheets and it's a lengthy process for smaller timeframes. Is there any way to code smaller timeframes into this indicator? Like 5m,15m for example
twingall
@NickMaterazzo, dm'd you my first effort at doing it on 5min chart using matrix for rows(5min buckets) and columns(1hr buckets) for most effective display of data. Less data history as you go down timeframes, so 5min chart on ES1! only gives 71 days of data
Thêm nữa