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 »

censura » Sat Aug 01, 2015 3:13 am wrote:Ok using the HGI indicator which I have 16.07 loaded on charts can you let me know either where the information is or help me with how I can pull signals into my code

ie how I can get into either global or directly into my ea along with away to ensure I identify if a signal is given it on closed bar [1]

I really appreciate your help in this matter and thanks a gain for your great matrix

thank you
Hi Censura,

The indicator, when loaded on the chart, writes the signals to a set of buffers. You can see that, in the Data Window -- just move you mouse over the candles and see the values of the buffers in the Data Window change. In an EA, you can load the indicator in memory (using the iCustom-call) and read the values of these buffers, for a given candle shift. Have a look at lines 422-434 and 451-455 in the HGIMatrixMTFv31 to work out the buffer assignment for the type of signal. You can also get the signals by including hgi_lib.mqh and calling the functions getHGISignal and getHGISlope directly.

Hope this helps.

Rene.
censura
Trader
Posts: 32
Joined: Wed Jun 06, 2012 12:52 pm

HGIMatrix

Post by censura »

Hi thank you

ok so can I use

GlobalVariableSet("HGIsignal"+Symbol(),iBuffer);

from your indicator

or

GlobalVariableSet("HGIsignal"+Symbol(),iBuffer);

directly into my ea

GlobalVariableSet("HGISlope"+Symbol(),HGISlope);


thanks
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

HGIMatrix

Post by renexxxx »

censura » Mon Aug 03, 2015 5:39 pm wrote:Hi thank you

ok so can I use

GlobalVariableSet("HGIsignal"+Symbol(),iBuffer);

from your indicator

or

GlobalVariableSet("HGIsignal"+Symbol(),iBuffer);

directly into my ea

GlobalVariableSet("HGISlope"+Symbol(),HGISlope);


thanks
No, don't use Global Variables.

In your EA do something like:

Code: Select all

#include <hgi_lib.mqh>

...
...

void OnTick() {

   SIGNAL aSignal = getHGISignal( Symbol(), Period(), 1 ); // Replace '1' with the shift you're interested in
   SLOPE aSlope = getHGISlope( Symbol(), Period(), 1 );

   ...
}

That's all. I frankly don't understand what the problem is.

Cheers ... Rene.
censura
Trader
Posts: 32
Joined: Wed Jun 06, 2012 12:52 pm

HGIMatrix

Post by censura »

Hi sorry to be a pain,

I have done this and have installed

hgi_lib.mqh in include folder

added below to ea

#include <hgi_lib.mqh>

compiled both opened and closed platform

but says can't read open file?

I loaded the file from your page1
art
Trader
Posts: 588
Joined: Fri Mar 02, 2012 3:51 pm

HGIMatrix

Post by art »

hi renexxxx i cant stop alert popping up , its saying History updated and downloading more bars on all the pairs i have all the alerts switched off, using the non library version, i also have the alerts switched off in HGI,cheers
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

HGIMatrix

Post by milanese »

art » Mon Aug 03, 2015 7:06 pm wrote:hi renexxxx i cant stop alert popping up , its saying History updated and downloading more bars on all the pairs i have all the alerts switched off, using the non library version, i also have the alerts switched off in HGI,cheers
Please use the lib version of the HGIMatrix if you want to use TF's like W1 or MN1, as it could be your broker has not enough history data for the HGI indicator to work, the lib should work...

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
art
Trader
Posts: 588
Joined: Fri Mar 02, 2012 3:51 pm

HGIMatrix

Post by art »

thanks a lot tomasso youre a star
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

HGIMatrix

Post by renexxxx »

censura » Mon Aug 03, 2015 6:40 pm wrote: but says can't read open file?
I think that you mean that it is complaining that it can not find hgi_lib.ex4. This file needs to be present in the \Libraries folder and can be obtained from here. You are lucky that I'm so patient with you, as this has been explained many times before. A bit of reading would be prudent before asking questions.

Cheers ,,,
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

HGIMatrix

Post by SpiderX »

renexxxx » Mon Aug 03, 2015 7:30 pm wrote: It looks like you missed this one out ...

My friend, you are officially helpless. Find another pastime, as this is not for you.

My pleasure.
Major respect on the amount of patience here. :)

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

HGIMatrix

Post by renexxxx »

I received 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.

Version 32 and 32L are in Post 1.
Post Reply

Return to “Indicators and matrixes”