• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:52am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:52am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Price for changing Indicator to Histogram 3 replies

expert advisory for stoch histogram indicator 1 reply

awsome oscillator indicator (not histogram one) 1 reply

Histogram Volume Indicator.. 0 replies

Anyone have colored RSI histogram indicator? 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 20
Attachments: Daily high/low histogram indicator
Exit Attachments
Tags: Daily high/low histogram indicator
Cancel

Daily high/low histogram indicator

  • Last Post
  •  
  • Page 1 2
  • Page 1 2
  •  
  • Post #1
  • Quote
  • First Post: Edited Nov 6, 2018 2:45pm Jan 3, 2018 2:14pm | Edited Nov 6, 2018 2:45pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
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:
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 781.png
Size: 52 KB

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.

Attached File(s)
File Type: ex4 Daily H-L histogram.ex4   35 KB | 1,120 downloads | Uploaded Feb 14, 2018 12:29am
NOTE: 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.
Attached File(s)
File Type: mq4 Daily H-L histogram.mq4   11 KB | 1,102 downloads | Uploaded Feb 14, 2018 12:30am
  • Post #2
  • Quote
  • Jan 3, 2018 2:19pm Jan 3, 2018 2:19pm
  •  alphadude
  • Joined Jul 2011 | Status: Member | 1,035 Posts
interesting indicator
 
1
  • Post #3
  • Quote
  • Jan 3, 2018 4:09pm Jan 3, 2018 4:09pm
  •  jmn5611
  • Joined Oct 2012 | Status: Trade Small, Win Big | 4,988 Posts
Quoting hanover
Disliked
Daily high/low histogram indicator 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:{image} The indicator is designed to work on the 28 major currency...
Ignored
Thanks hanover, it confirms that the high and lows of the E/U are indeed made during the London session.
If you are good at something, never do it for free--Joker
 
1
  • Post #4
  • Quote
  • Jan 3, 2018 4:33pm Jan 3, 2018 4:33pm
  •  ReverseFlash
  • Joined Jun 2018 | Status: Member | 903 Posts
Very interesting indeed.

Thanks for sharing!

 
 
  • Post #5
  • Quote
  • Jan 3, 2018 5:03pm Jan 3, 2018 5:03pm
  •  alphadude
  • Joined Jul 2011 | Status: Member | 1,035 Posts
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.

best
 
 
  • Post #6
  • Quote
  • Jan 3, 2018 5:13pm Jan 3, 2018 5:13pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting jmn5611
Disliked
it confirms that the high and lows of the E/U are indeed made during the London session.
Ignored
I think it's actually the US session, the percentages are shown in the screenshot:
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 782.png
Size: 50 KB
 
2
  • Post #7
  • Quote
  • Jan 3, 2018 5:20pm Jan 3, 2018 5:20pm
  •  alphadude
  • Joined Jul 2011 | Status: Member | 1,035 Posts
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
Attached Image(s) (click to enlarge)
Click to Enlarge

Name: eurusd-daily-high-low.png
Size: 19 KB
Click to Enlarge

Name: eurusd-daily-high-low2.png
Size: 15 KB
 
6
  • Post #8
  • Quote
  • Jan 3, 2018 5:48pm Jan 3, 2018 5:48pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting alphadude
Disliked
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.
Ignored
When I was trading intraday I used it as perhaps a lesser piece of a total puzzle, combining it with S/D zones/orderflow, M15 climax volume candles, current daily move so far with respect to ADR i.e. 'overbought/sold', some basic PA (engulfing, pinbar, pclose(x)**, etc), recent D1 candles for overall trend/sentiment, and news considerations. Confluence of a few of those frequently gave a lowish risk entry.

[**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.]

Quoting alphadude
Disliked
a while back; I did create a report of daily High/Low of any instrument; ....
Ignored
Indeed, these kind of statistics can be helpful.
 
1
  • Post #9
  • Quote
  • Jan 3, 2018 6:55pm Jan 3, 2018 6:55pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting jmn5611
Disliked
This is what I saw.
Ignored
I'm running Pepperstone MT4 rather than Oanda. I'm not sure that it should make a big difference, but I expect there would be some variations in the historical data.

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.
 
 
  • Post #10
  • Quote
  • Jan 3, 2018 10:15pm Jan 3, 2018 10:15pm
  •  jmn5611
  • Joined Oct 2012 | Status: Trade Small, Win Big | 4,988 Posts
Quoting hanover
Disliked
{quote}I'm running Pepperstone MT4 rather than Oanda. I'm not sure that it should make a big difference, but I expect there would be some variations in the historical data. 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,...
Ignored
Okay, I compressed the chart. And I deleted my original post. I'm paranoid.
Attached Image (click to enlarge)
Click to Enlarge

Name: EURUSDM15.png
Size: 66 KB
If you are good at something, never do it for free--Joker
 
 
  • Post #11
  • Quote
  • Jan 3, 2018 10:23pm Jan 3, 2018 10:23pm
  •  Hmsr
  • | Joined May 2016 | Status: Member | 322 Posts
Quoting hanover
Disliked
{quote} I think it's actually the US session, the percentages are shown in the screenshot: {image}
Ignored

Hello Hanover, that's a really nice sessions indicator you have on the bottom window. Would it possible for you to share that indicator?
HMSR
 
 
  • Post #12
  • Quote
  • Edited Jan 4, 2018 5:49pm Jan 3, 2018 11:04pm | Edited Jan 4, 2018 5:49pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting jmn5611
Disliked
Okay, I compressed the chart.....
Ignored
I've reinstated and enhanced the code that outputs the histogram data to a file. If you set the new WriteDataToFile parameter to true, the indicator will now write the history data to a text file named Daily H-L distribution [symbol_id].txt into your .../MQL4/Files folder. The file content looks something like this:
Inserted Code
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
The above is a sample I ran with a StartDate of 2017.12.16, to give me a small enough sample to be checked manageably. Each row in the file shows the date, followed by a 24 character string of 0s and 1s, which represent whether or not a H1 candle exists at hours 00 thru 23 for that day. Any '0' means that there's bad or missing data for the H1 candle at that hour, and that entire day is excluded from the totals (Dec 15 is an example above). The columns on the right show the hour where the low and high prices for the day were made. You can easily verify their correctness by looking at the candles on the chart. And then you can count the number of occurrences of each hour, and verify that the totals in the final section (which should be the same totals showing in the plotted histogram) are correct. See screenshot:
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 784.png
Size: 26 KB
I have uploaded the latest version of the indicator to post #1.
 
2
  • Post #13
  • Quote
  • Edited Jan 4, 2018 12:21am Jan 3, 2018 11:32pm | Edited Jan 4, 2018 12:21am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting Hmsr
Disliked
that's a really nice sessions indicator you have on the bottom window. Would it possible for you to share that indicator?
Ignored
Indicator (TimeZones.ex4) is attached.

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:
Attached Image
More 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).
Attached File(s)
File Type: ex4 TimeZones.ex4   30 KB | 587 downloads
File Type: zip TZDBHelper.zip   105 KB | 502 downloads
 
2
  • Post #14
  • Quote
  • Jan 4, 2018 1:35am Jan 4, 2018 1:35am
  •  Hmsr
  • | Joined May 2016 | Status: Member | 322 Posts
Quoting hanover
Disliked
{quote} Indicator (TimeZones.ex4) is attached. 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...
Ignored
Hello Hanover, thankyou for the indicator.
Also Congrats on your "38 out of 38 profitable months".
It's a great feat.
HMSR
 
 
  • Post #15
  • Quote
  • Jan 4, 2018 1:48am Jan 4, 2018 1:48am
  •  goodways100
  • Joined Dec 2013 | Status: Member | 615 Posts
Subs. Thanks and
Regards
 
 
  • Post #16
  • Quote
  • Jan 4, 2018 2:11am Jan 4, 2018 2:11am
  •  jmn5611
  • Joined Oct 2012 | Status: Trade Small, Win Big | 4,988 Posts
Quoting hanover
Disliked
{quote} I've reinstated and enhanced the code that outputs the histogram data to a file. If you set the new WriteDataToFile parameter to true, the indicator will now write the history data to a text file named Daily H-L distribution [symbol_id].txt into your .../MQL4/Files folder. The file content looks something like this: 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...
Ignored
I have big gaping holes in my data!
If you are good at something, never do it for free--Joker
 
 
  • Post #17
  • Quote
  • Jan 4, 2018 3:01am Jan 4, 2018 3:01am
  •  Sesamstrasse
  • Joined Jun 2013 | Status: Membership Rewarded | 3,164 Posts
A loud THANK YOU Hanover,

super intresting aproach for intraday swingtrading--

Well done!

Guido
The future(s) is mine!Risiko birgt immer auch die Chance.
 
 
  • Post #18
  • Quote
  • Jan 4, 2018 3:34am Jan 4, 2018 3:34am
  •  ramzam
  • Joined Nov 2015 | Status: Member | 2,963 Posts
can it be used for single equity or commodity
Success is a Journey Not a Destination....... kind regards ramzam
 
 
  • Post #19
  • Quote
  • Edited 4:50pm Jan 4, 2018 9:06am | Edited 4:50pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting jmn5611
Disliked
I have big gaping holes in my data!
Ignored
We're both using the same version of the same indicator. Hence issues would logically be caused by something else that's different between our respective computers, e.g. different brokers, different data, different MT4 or Windows versions, other software running in the background, etc etc. In this case it was the data.
_____________________________
Quoting ramzam
Disliked
can it be used for single equity or commodity
Ignored
I ran it for gold (XAUUSD) on my broker and got an empty sub-window. Then I looked at the generated output file, and found that there are no H1 candles for 00 hours:
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 796.png
Size: 20 KB
But this could easily differ from broker to broker. You can test the indicator on any instrument you wish, and then pinpoint the cause of any irregularity by using the process described in post #12.
_____________________________
Quoting hanover
Disliked
When I was trading intraday I used it as perhaps a lesser piece of a total puzzle.....
Ignored
As an example, to demonstrate what I mean by confluence, here's an interesting scenario developing on EU. We have climax volume, supply zone, some obvious absorption, price has reached 100% of the ADR (dashed horiz white line -- 71 pips), and we have a 64 score (out of 100) for a possible daily H/L during the 08:00 candle (New York time -- the 10:00 candle scores 100). And at some point there 'must' be some profit taking from the upmove. However, I almost certainly wouldn't have taken this trade because the climax volume has been caused by ADP and employment data, making it too risky. But just for fun, let's see how it develops!
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 795.png
Size: 54 KB
Note that today's low (so far) on EU occurred during the early Asian session (24 out of 100), a relatively low probability occurrence.

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.
________________________________
[EDIT]
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.

[EDIT]
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!).
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 798.png
Size: 50 KB


[EDIT]
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.
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 800.png
Size: 55 KB
 
2
  • Post #20
  • Quote
  • Feb 1, 2018 12:53pm Feb 1, 2018 12:53pm
  •  fx1990
  • | Membership Revoked | Joined Jan 2018 | 59 Posts
Quoting hanover
Disliked
{quote} Indicator (TimeZones.ex4) is attached. 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...
Ignored
hellow hanover

why your are timezone indicator use?
can you more little explain it
Attached Image (click to enlarge)
Click to Enlarge

Name: Picture21.jpg
Size: 173 KB
 
 
  • Platform Tech
  • /
  • Daily high/low histogram indicator
  • Reply to Thread
    • Page 1 2
    • Page 1 2
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023