stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

HGIMatrix
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3973
Page 53 of 68
Author:  renexxxx [ Fri Jul 31, 2015 8:48 pm ]
Post subject:  HGIMatrix

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.
Author:  censura [ Mon Aug 03, 2015 7:39 am ]
Post subject:  HGIMatrix

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
Author:  renexxxx [ Mon Aug 03, 2015 7:49 am ]
Post subject:  HGIMatrix

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.
Author:  censura [ Mon Aug 03, 2015 8:40 am ]
Post subject:  HGIMatrix

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
Author:  art [ Mon Aug 03, 2015 9:06 am ]
Post subject:  HGIMatrix

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
Author:  milanese [ Mon Aug 03, 2015 9:14 am ]
Post subject:  HGIMatrix

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
Author:  art [ Mon Aug 03, 2015 9:21 am ]
Post subject:  HGIMatrix

thanks a lot tomasso youre a star
Author:  renexxxx [ Mon Aug 03, 2015 10:05 am ]
Post subject:  HGIMatrix

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 ,,,
Author:  SpiderX [ Tue Aug 04, 2015 1:21 am ]
Post subject:  HGIMatrix

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
Author:  renexxxx [ Fri Aug 07, 2015 2:40 am ]
Post subject:  HGIMatrix

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.
All times are UTC Page 53 of 68