HGIMatrix

The title says it all
Post Reply
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

HGIMatrix

Post by renexxxx »

This was originally posted in nanningbob's HGI thread, but I was getting PMs with change requests and I didn't want to pollute the HGI thread with irrelevant stuff.

So, here is the HGIMatrix (version 27L):
Selection_023.jpg
Select your time frame (can be CURRENT -- so it follows the chart time frame) and whether you want to look at the current candle or closed candle. You can change some cosmetic stuff as well -- you'll work it out.

Make sure you have the named HGI indicator in your \Indicators folder as well.

In a next version, I might differentiate between the buffer7 wavey symbol and buffer8 wavey symbol -- but for the moment I just follow what Elixe is doing on the HGI indicator.

Have fun!

Edit: You can now switch AlertsOn = true, to be alerted each time a new signal arrives. Be prepared to be annoyed by this thing, especially if UseClosedCandle = false, as in this case you will likely have a new signal every minute.
Also, you can display some legends to describe what each symbol means -- not that anyone needs that.

Edit2: Added NotificationsOn switch. You must have entered your MetaQuotes ID in the Notifications-tab of Options. Be ready to be blasted by your phone ...

Edit3: Added the ability to display the most recent signal, not just the one on the open or previous candle.

Edit4: Waves are now high or low, depending on the postion of the wave in HGI. The cell contents now scales with the cell width and height.

Edit5: Added 'selectable' Alerts, to allow the trader to which type of signals and/or waves he or she wishes to be alerted. New parameters:

AlertOnTrendChange :: Gives an alert if a new TREND signal was spotted
AlertOnRangeChange :: Gives an alert if a new RANGE signal was spotted
AlertOnRadChange :: Gives an alert if a new RAD signal was spotted
AlertOnWeakWave :: Gives an alert if a new WEAK Wave signal was spotted
AlertOnStrongWave :: Gives an alert if a new STRONG Wave signal was spotted.

The whole Alert and Notification mechanism can still be switched on/off with AlertsOn and NotificationsOn as before. Also, if AlertsOn is true, but none of the other 'AlertOn....' flags is true, you still won't get any alerts.

Edit6: Two small changes: The tile that was changed in the last refresh, turns dark red and there is now an external parameter for the SymbolFont (default: WingDings)

Edit7: A new parameter, ShowAsList, allows the information to be arranged vertically in a list.

Edit8: Made the fonts a little smaller as we got reports that some text was cut off. Also, locked the screen height with a new parameter (ScreenHeight: default 720), to by-pass the problem of getting all the rows on one line in the list form.

Edit9: I was advised by Elixe that for version 15.01, the iCustom call needs to be different. This has been updated in this version.

Edit10: Added the MTF version of HGIMatrix. Set the TimeFrames parameter to a comma-separated list of known timeframes, eg. 5,15,60,240.
Note: be sensible with your numbers. Having 28 pairs with 5 timeframes, 8 buffers and max lookback of 100 requires a maximum of 112,000 iCustom calls! This is done every minute ... You will find that at the start you get quite a few 'red' cells ... This is probably due to the HGI-indicator still trying to load some more data. This settles down after a while. Have fun and let me know how you go.

Edit11: There are some minor cosmetic changes as suggested by trendinator. There are now parameters to set the colour of the wave-symbols, as well as the background color of the changed cell. Also the wording of the Alerts() has been changed.

Edit12: New version of HGIMatrixMTF allows to change the background color of a symbol by clicking on the cell.

Edit13: Two minor updates: The cell selections now survive Empty4-restarts, timeframe changes and indi re-initializations. Also, I have made HGI 15.06 the default HGI indicator.

Edit14: Added colouring of cells depending if hurst agrees with HGI. You can switch this of by setting ShowHurst = false. Also, there is parameter for the hurst colour: ClrHurst (default: Dark Green).

Edit15: Bug fixed. The hurst-flag was not initialized on a refresh.

Edit16: Was never released.

Edit17: As requested by Tebis (Ernst), HGIMatrixMTF now indicates a Trend (as defined by the LWMA60 and LWMA240 on H4), by coloring the SYMBOL names, like so:

GREEN : if BID > LWMA60 and BID > LWMA240
RED : if ASK < LWMA60 and ASK < LWMA240
GOLD : if none of the two above conditions are true

It was suggested that this important information was still lacking on the HGIMatrixMTF screen. Mind you, we don't have much more space to display any more information. Also, as suggested by skinner36 HGIMatrixMTF will now include all symbols from your Market Watch panel, if the IncludeSymbols parameter is left blank.

Edit17L: Added the hgi_lib version of 17. In this version, you no longer need the HGI_v15.06.ex4 indicator (or any version for that matter) in your \Indicators folder. (Of course you can leave them there, they won't do any harm). However, you do need the hgi_lib.ex4 file (attached) in your \Libraries folder. Tommaso has granted me permission to publish this library with the 17L version. The library will cease to work beyond April 1st, 2015, like the indicator. After a certain time, you will get differences in signals between 17 and 17L, as signals obtained via the library are always the latest, updated signals. Signals obtained via the indicator stay the same except for bar 0.

Edit18 and 18L: If there is no signal (or wave), no number is displayed next to it either. Also, the message text for Alerts, Notifications and Emails for signals now contains the candle number (between brackets) where it occurred.

Edit19 and 19L: To combat the number of Alerts, two measures have been taken:
(1) There will be no Alerts on initialization (that includes switching timeframes, or changing a parameter)
(2) There is now an option to save alerts to a text file. AlertsToFile. By switching AlertsOn off, but AlertsToFile on, all alerts will be directed to a text file (<ExpertName>.txt) in the \Files area. A sound will be played to alert that something was saved to the file. You could monitor the contents to this file in another application -- eg. Notepad++ (as suggested by Radar)

In addition, alorente's request was added. There is a new parameter ShowOnlyHurst that, when switched on, limits the display to only signals that agree with the Hurst direction. You still get Alerts (if switched on) for changes related to non-Hurst agreeing signals. Note that if you switch ShowHurst off and ShowOnlyHurst on, you get nothing. That would be right, as you deserve to get nothing.

Edit 20 and 20L; Two minor code changes: Added the current time to the message in the alert file and fixed a bug, introduced by ShowOnlyHurst. For setting up Notepad++ to monitor your alert file see this post from BobbyT. For the linux affectionados, (like myself), a tail -f on the file is good enough.

Edit 21 and 21L: Added Chart Open functionality. If you click on an arrow, the chart for the particular symbol and timeframe is opened.

Edit 22 and 22L: Added TemplateName parameter. If you click on an arrow, it will open the corresponding chart with the selected template applied. Many thanks to Tommaso (milanese) for the code suggestion.

Edit 23 and 23L: Baluda has added the text that represents the time remaining of the current bar, for the selected timeframes. This text has been added underneath the 'H4', 'H1' 'M15' etc. column heads. Thanks Paul for this contribution. Also, I changed the scaling of font size with the selected CellHeight and CellWidth a little bit better, so that now (hopefully) the symbol and time frame text fits within each cell.

Edit 24 and 24L: Alerts can now be enabled by timeframe. Set the AlertOnXXX parameters to a comma-separated list of timeframes (like: "1440,240,60,15") for which you want to receive Alerts. Setting the parameter to "" (empty string), means: no Alerts on any timeframe. Also, make sure that the TimeFrames parameter contains the timeframe for which you have requested Alerts for.

Edit 25 and 25L: Symbols (arrows and waves) for bar=0 (the current bar) are now flashing to attract the attention, as per Alorente's request.

Edit 26 and 26L: You can now switch the flashing arrows on and off with the ShowFlash parameter.

Edit 27 and 27L: There is a new parameter, called AlertOnlyHurst, to specify that you only want to receive Alerts for signals/waves if the new signal/wave agrees with the Hurst-condition.

Edit 28 and 28L: Two tiny changes:
(1) Fixed a bug such that it now recognises the Monthly timeframe (43200).
(2) Split the Alerts for Waves into "Range Wave Above" and "Range Wave Below". Ie. the Alert now indicates if the wave is above or below the candle. This came as a suggestion from trendinator by PM.

Edit 29 and 29L: In this version the Arrows are smaller and the Waves are bigger on Alorente's request

Edit 30 and 30L: The symbol selection routine has been revamped. For that purpose, we have three parameters:
(1) IncludeSymbols: Leave it blank if you want to include all symbols in the market panel, or specify just the symbols you want. The string 'NULL' is translated to the symbol of the current chart.
(2) ExcludeSymbols: Leave it blank if you don't want to exclude any symbols, or specify the symbols you want to exclude. Again 'NULL' is translated to the symbol of the current chart.
(3) ExcludeExtensions: This is to specify, which symbol extensions you want to exclude. A symbol extension is defined as the string of characters that appears after the 6th character in the symbol name. Eg. in 'AUDUSD.', the extension is the '.' (dot) character.

The symbols you get are determined as follows:
If IncludeSymbols is empty: You will get all symbols in the market panel, minus those in ExcludeSymbols and minus those which have an extension in the ExcludeExtentions list.

If IncludeSymbols is non-empty: You will only get the symbols in IncludeSymbols, as long as they are listed in the market panel and as long as their extension is not in the ExcludeExtentions list.

Edit 31 and 31L: Two small changes:
(1) The ATR (Average True Range) value (in PIPs) is displayed below the symbol. The ATR is calculated for the given ATRTimeFrame and ATRPeriod. The display of this number can be switched on/off with the ShowATR parameter (default: true). There is also a ATRThreshold parameter (default: 100.0) and a ShowOnlyATR parameter (default: false). By setting ShowOnlyATR to true, the matrix will only list symbols that have an ATR of at least ATRThreshold.
(2) Due to popular demand, you can now also click on the 'Wave' symbol, to open up a chart for the given symbol and timeframe.

Edit 32 and 32L:
There was a change request to be able to switch-off signals you're not interested in. So, I have introduced three new parameters:
  • ShowTrendSignal (default: true)
  • ShowRangeSignal (default: true)
  • ShowRadSignal (default: true)
By setting any of these parameters to false, it will continue looking further backwards (upto: MaxBarLookback), to find a signal. So, if there is a RANGE signal at shift=2, but ShowRangeSignal=false, and the next most recent signal is a TREND signal, it will show the TREND signal, along with the candle shift of that TREND signal. Obviously, if you set all three of these parameter to false, you won't get any signals.

Edit 33 and 33L:
There was a change request from dydynamic, to allow a timeframe specific MaxBarLookback setting. To this end, it is now possible to define the TimeFrames as a comma-separated string of tuples, like <timeframe>:<maxLookback>. So, eg. if you set TimeFrames to "240:10,60:30,15:100", the max bar lookback for H4 is 10, H1 is 30 and for M15 is 100. This is still backwards compatible with the previous format, as if you set TimeFrames to "240,60,15", each timeframe will have the default setting of MaxBarLookback.

Edit 34:
In this version the changes made by peteforex are included, most notably the addition of the ATR value in account currency. Thank you Pete, for these modifications! You are a ST*R.
In addition, I have merged the indicator version and the library version into one source file. The thinking is that most users will decide once and for all, whether to use the indicator version or the library version (with the majority choosing the library version). The code in the attached HGIMatrixMTFv34.mq4 (as it is) compiles to the library version. Those, who want to use the indicator version, will have to change line 16 from

Code: Select all

#define   HGI_LIB
to

Code: Select all

//#define   HGI_LIB
and recompile. Make sure to download the additional hgi_indi.mqh and to store this file into your \Include folder.

Edit 35:
I had a request from Petrocelli (Pete) to have the option to send alerts to an email account. No biggie. There is now a new parameter SendEmailOn (Default: false). If AlertsOn is set to true and SendEmailOn is also set to true, it should send alerts to your configured email account.

Any probs ... you know where to find me.
You do not have the required permissions to view the files attached to this post.
Jayzon
Trader
Posts: 13
Joined: Fri Aug 29, 2014 2:11 am
Location: Huntsville,AL

HGIMatrix

Post by Jayzon »

Looks nice and consolidated. Great work on visually representing a higher level view that contains priority data on a grid for majors.
bubo
Trader
Posts: 29
Joined: Thu Jan 10, 2013 7:02 am

HGIMatrix

Post by bubo »

Thank you for this great tool !!

At the moment, this displays the signals or 'pulse' events coming in. Perhaps another way of looking at what we would want to see in a quick overview matrix, could be a focus on the current status or a variable that is 'holding' the value after the pulse event.

Let me explain. If I understand the HGI correctly, then one great entry method would be to wait after an angled RAD, and then take a buy/sell as soon as a thick arrow arrives. So as a trader coming to my computer, I would want to know which pairs have an ongoing trend and are expecting a signal to trade, so I can pull up these charts and study them - and then either wait for the thick arrow, take my own trades based on my assessment, or decide that other factors tell me it is not a good overall setup and I pass on the opportunity.

One way of doing that would be loopig back on bars to the next event in the past, and then keep the information that is still valid now, for example in a simple background colour tones greenish for 'get ready to buy', reddish for 'get ready to sell', or black for market is ranging.

Just tossing some ideas - not meaning to create more work on top of very useful tool.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

HGIMatrix

Post by renexxxx »

bubo » Fri Dec 05, 2014 10:57 am wrote:Thank you for this great tool !!

At the moment, this displays the signals or 'pulse' events coming in. Perhaps another way of looking at what we would want to see in a quick overview matrix, could be a focus on the current status or a variable that is 'holding' the value after the pulse event.

Let me explain. If I understand the HGI correctly, then one great entry method would be to wait after an angled RAD, and then take a buy/sell as soon as a thick arrow arrives. So as a trader coming to my computer, I would want to know which pairs have an ongoing trend and are expecting a signal to trade, so I can pull up these charts and study them - and then either wait for the thick arrow, take my own trades based on my assessment, or decide that other factors tell me it is not a good overall setup and I pass on the opportunity.

One way of doing that would be loopig back on bars to the next event in the past, and then keep the information that is still valid now, for example in a simple background colour tones greenish for 'get ready to buy', reddish for 'get ready to sell', or black for market is ranging.

Just tossing some ideas - not meaning to create more work on top of very useful tool.
Sure this can be done, however, HGIMatrix was meant to be an overview tool to be used along side the individual charts with HGI loaded on. There are infinite ways to represent the current status and its previous lead-up to that status -- but at the end of the day the chart gives you the real picture. I don't think you can trade the HGI signals purely based on the HGIMatrix -- even not if your suggestion would be implemented.

What do you think?
thomasmore
Trader
Posts: 269
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

HGIMatrix

Post by thomasmore »

Thanks for this indi! Great job. The new HGI version is now xx.05, and I see in the code that it is calling for xxx.02. Maybe this should be a user input?
Cheers ,
Ludo
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

HGIMatrix

Post by renexxxx »

You are absolutely right ... but it IS a user input. I have changed the default value though (in post 1). Thanks for the heads-up!

Rene.
thomasmore
Trader
Posts: 269
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

HGIMatrix

Post by thomasmore »

renexxxx » 05 Dec 2014, 11:25 wrote:You are absolutely right ... but it IS a user input. I have changed the default value though (in post 1). Thanks for the heads-up!

Rene.
:oops: :oops: :oops: :oops: :oops: :oops: :oops:
bubo
Trader
Posts: 29
Joined: Thu Jan 10, 2013 7:02 am

HGIMatrix

Post by bubo »

renexxxx » Fri Dec 05, 2014 1:04 am wrote: Sure this can be done, however, HGIMatrix was meant to be an overview tool to be used along side the individual charts with HGI loaded on. There are infinite ways to represent the current status and its previous lead-up to that status -- but at the end of the day the chart gives you the real picture. I don't think you can trade the HGI signals purely based on the HGIMatrix -- even not if your suggestion would be implemented.

What do you think?
I totally agree that the Matrix should not be used for trading itself.

What I am talking about is integrating the relevant information of the recent past at that TF into the value of a cell so you can quickly see where something promising is going on, while at the moment when you walk to your computer and look at the matrix you have to either wait for signals to appear or you may be late for the entries already.

Imagine a more extreme example. If you were to use a simple method and determine the trend with a slower and faster MA crossing, then a Matrix showing signals would only give you the rare points of the crossovers. In contrast, showing you if the last crossover was down or up would give you the current status of the trend. Walking to the computer and waiting for crossovers to appear would be a much less powerful method of using the Matrix than showing the current trend since the last crossover/signal.

I don't think there are infinite ways of doing this for HGI, as far as I understand it is mostly going back to RADs or Wavies, and carry their information forward to the present. But I am still learning.

So no, this would not be for trading directly off the Matrix. Practically, when you come to the computer a first step would be having a look at the matrix, and what you are mostly looking for are existing trends after a RAD, which are setups for entries during forming retracements. You can then click severals TFs on your chart to see how consistent the trend is, and then home into a promising pair/chart for evaluation.

I think this would be a great advantage over seeing only arrows/wavies when they appear at the moment, but I agree it is wise to gain some experience with this method first before and play with it more before investing much time into coding.
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

HGIMatrix

Post by GT3RS »

Hey! Thanks for sharing this very useful tool.

Does it send alerts to mobile devices or are they just pop ups?

Thanks once again!!!

Here's my setup. H4 matrix at the top, H1 on bottom..........
You do not have the required permissions to view the files attached to this post.
bubo
Trader
Posts: 29
Joined: Thu Jan 10, 2013 7:02 am

HGIMatrix

Post by bubo »

Nice addition of the legend! :)
Post Reply

Return to “Indicators and matrixes”