Daily high/low histogram indicator
NOTE: I have left Forex Factory, so don't expect replies to your posts. You can find an index to all my indicators and posts here.
Daily high/low histogram indicator: Terms and Conditions
All code is supplied FREE of charge. It may NOT be sold or distributed commercially. Unless otherwise shown, no source code is available.
Software is offered on an 'as is' basis. I'm not offering a programming or troubleshooting service.
There is no guarantee that the software is fit for purpose, or free of errors. Download and use the indicator(s) at your own risk; I accept no liability for computer damage or financial losses.
I've finally decided to share this indicator publicly. It's not a holy grail; it simply is what it is. It looks back over as much H1 price history as you specify, ascertains during which hour(s) of the day (00-23 MT4 time) the daily high and low occurred -- both the high and low add 1 to the count for each hour -- and then plots a frequency histogram in a new chart sub-window. It's designed to work best on a M15 (or shorter TF) chart. See screenshot:
The indicator is designed to work on the 28 major currency pairs; using it on exotics, metals, indices, cryptocurrencies, etc may cause unpredictable results.
If you leave CurrencyPair blank, it defaults to the current chart's instrument.
PlotbackDays is the number of days backwards from the current date that you want the histogram to be plotted. (Obviously the same size histogram bar gets plotted for the same time each day) .
StartDate is the date from which you want the history to be searched. The earlier this date, the longer the indicator takes to perform the necessary calculation, before the histogram is initially plotted.
A numeric value can also optionally be plotted above each histogram bar. TextCalcBasis determines what this value is, as follows:
0 = histogram bars only; no values (text) will be plotted
1 = the actual number of highs or lows that occurred during each hour will be printed
2 = the number of highs/lows will be converted to a percentage, for example a value of 167 means that a high or low occurred during this hour 16.7% of the time (the decimal point is omitted to save space)
3 = the hour during which the greatest number of highs/lows occurred is set to 100, and the other values are scaled proportionally, and then rounded to the nearest whole number
Press Ctrl-Y to toggle the day separators (vertical dotted lines) on/off.
Daily H-L histogram.ex4NOTE: This indicator was written using MetaEditor/compiler build 509. If you want the .mq4 source to compile/run without errors, you'll need to do this first. Otherwise, download only the .ex4 file.Daily H-L histogram.mq4
Very interesting indeed.
Thanks for sharing!
Hi hanover; how do you recommend trading this indicator?
i assume from the indy description is you take a mean reversion trade of daily high/low at the hours with highest frequency of occurrences.
a while back; I did create a report of daily High/Low of any instrument; and statistically when it is likely that the daily High or Low would have been made; using probabilities.
attached is an example; for EURUSD, from 2012 to 2018; where it is showing that by GMT 15:00; the daily High or Low for EURUSD would have been made already with 98% probability. indicating you could potentially do some reversal trades within the daily range; especially if the price was nearing the edge of the daily range.
the second chart; showing the occurrence of High or Low frequency of each hour of day (pretty much the same as Hanover indicator).
Note that either GMT 00:00-01:00 or GMT 14:00-15:00 have the highest frequency
[**pclose(x) is simply a candle close higher than the last x candle highs in a downmove, confirming a possible reversal; mirror image for upmove.]
The numbers on your histogram bars (3, 4, 4, 3,...) are much lower than mine (71, 33, 26, 40,...), I don't know if they are somehow being truncated, or if it reflects a lack of historical H1 data. If I zoom out on my chart, the numbers tend to squash together and overlap unreadably, rather than reduce to single digits.
I guess it's also possible that there's a bug in the code, but I've been running the indicator for several months now, and I did test it fairly thoroughly when I first wrote it.
Hello Hanover, that's a really nice sessions indicator you have on the bottom window. Would it possible for you to share that indicator?
EURUSD Date 000000000011111111112222 Lo.Hr Price Hi.Hr Price --------------- 012345678901234567890123 ------------- ------------- Fri 15 Dec 2017 000000000000000000000001 23 1.17497 23 1.17562 Mon 18 Dec 2017 111111111111111111111111 0 1.17376 17 1.18344 Tue 19 Dec 2017 111111111111111111111111 3 1.17764 20 1.18488 Wed 20 Dec 2017 111111111111111111111111 9 1.18289 17 1.19018 Thu 21 Dec 2017 111111111111111111111111 16 1.18493 12 1.18896 Fri 22 Dec 2017 111111111111111111111111 2 1.18171 0 1.18755 Tue 26 Dec 2017 111111111111111111111111 14 1.18466 17 1.18788 Wed 27 Dec 2017 111111111111111111111111 2 1.18550 17 1.19103 Thu 28 Dec 2017 111111111111111111111111 0 1.18862 20 1.19591 Fri 29 Dec 2017 111111111111111111111111 0 1.19361 19 1.20255 Tue 02 Jan 2018 111111111111111111111111 0 1.20011 12 1.20814 Wed 03 Jan 2018 111111111111111111111111 21 1.20012 1 1.20662 Hour Count ----- ----- 00:00 5 01:00 1 02:00 2 03:00 1 04:00 0 05:00 0 06:00 0 07:00 0 08:00 0 09:00 1 10:00 0 11:00 0 12:00 2 13:00 0 14:00 1 15:00 0 16:00 1 17:00 4 18:00 0 19:00 1 20:00 2 21:00 1 22:00 0 23:00 0
If I recall correctly....... for the indicator to work properly, you also need to download the MQH file into both the ..../MQL4/Include and .../MQL4/Experts/include folders; and the DLL file into both the ..../MQL4/Libraries and ..../MQL4/Experts/libraries folders. (Create any of these folders if they don't exist). FF wouldn't let me upload these files, hence I was forced to upload them in the attached ZIP file.
The indicator has a couple of known bugs. If the data that it prints disappears for whatever reason, you need to refresh the indicator (toggle between chart timeframes is easiest), and the data should return. Also, it must be the bottommost sub-window on the chart, otherwise the data doesn't print. I will fix these issues if/when I get some spare time.
You also need to enable DLLs when you attach the indicator. See screenshot:Attachment 2619843More info about the indicator, and how the TZ database operates here (but DON'T download any indicators from that post, as they are all outdated).
Also Congrats on your "38 out of 38 profitable months".
It's a great feat.
Subs. Thanks and
A loud THANK YOU Hanover,
super intresting aproach for intraday swingtrading--
can it be used for single equity or commodity
Also note that this type of trading is countertrend, i.e. top/bottom picking. Not my personal favorite (I prefer to use S/W analysis backed by macro to trade in the direction of the strongest trends). But this can still produce some good low risk entries to compensate you for the times when the intraday move continues, and blows your stoploss away. So you either use tight(ish) SLs enough to keep your losses small, and then try entering repeatedly on each confluence; or very wide SLs (more risky!) to cover several potential confluences in the one position.
Blown away, LOL. So now we wait for another possible confluence during the 10:00 (NY time) candle....... but I'm going back to bed now, it's 4am here in NZ.
Darned insomnia! Now we have engulfing body at the next supply at the highest probability (scoring 100 out of 100) hour, with price at 120% of ADR -- will this be the day's high? Ah, the joys of discretionary top-picking! Working against this is the flipover SR (the thick blue lines -- trapped traders?; easy to see in hindsight!).
Looks like today's EU high will indeed fall inside the highest probability 100-score histogram bar, while the low fell inside the 24-score bar (an infrequent occurrence). Whether profit was attained during the 25 pip move from the high down to the 'demand zone' ((1) in the screenshot) depends on the details of one's entry/exit strategy. As is frequently typical for this time of the day, price is now moving in ever decreasing circles. Anyway, enough for now, I have other things to get on with. I'll leave it for the reader to decide whether the high/low histogram is a worthwhile adjunct to a PVSRA-based intraday strategy.
why your are timezone indicator use?
can you more little explain it
© Forex Factory