HGI for beginners.
-
LegendLeach
- Posts: 2
- Joined: Sun Jun 17, 2018 6:39 pm
HGI for beginners.
Hi All,
Just curious where to get the actual HGI indicators.
I dont seem to have permission to see the links or am i doing something wrong.
Just curious where to get the actual HGI indicators.
I dont seem to have permission to see the links or am i doing something wrong.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
HGI for beginners.
You joined just after I sent out my Welcome message to new members. I will send it to you in the next couple of minutes; you will find you have open access to everything at SHF once you receive it.LegendLeach » Sun Jun 17, 2018 7:19 pm wrote:Hi All,
Just curious where to get the actual HGI indicators.
I dont seem to have permission to see the links or am i doing something wrong.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
-
LegendLeach
- Posts: 2
- Joined: Sun Jun 17, 2018 6:39 pm
HGI for beginners.
Thanks so much for the fast reply Admin.
I received the links.
I received the links.
-
henkknot
- Trader
- Posts: 11
- Joined: Mon Jul 25, 2016 11:16 am
HGI for beginners.
Thanks a lot Steve for your explanation.
I'm trying to write an EA based on the Trend-buy- and Trend-sell-signals. With the HGI Library I can get the signal from the current candle (0). (With the function iCustom() I can see only values of these from candle 1 and higher). Conform the manual I want to place an order immediately when a trend signal appears. The problem I have now is; where can I find the value of the trend-signal to set my SL? When I use iCustom() I see this value as the result of this function. When I use the HGI Library I only see a “1”(TRENDUP) or a “2”(TRENDDN). So my question is “where can I find the value that the iCustom-function returns otherwise, is it somewhere in the library?”
Thanks a lot.
Henk.
I'm trying to write an EA based on the Trend-buy- and Trend-sell-signals. With the HGI Library I can get the signal from the current candle (0). (With the function iCustom() I can see only values of these from candle 1 and higher). Conform the manual I want to place an order immediately when a trend signal appears. The problem I have now is; where can I find the value of the trend-signal to set my SL? When I use iCustom() I see this value as the result of this function. When I use the HGI Library I only see a “1”(TRENDUP) or a “2”(TRENDDN). So my question is “where can I find the value that the iCustom-function returns otherwise, is it somewhere in the library?”
Thanks a lot.
Henk.
SteveHopwood » Thu Dec 07, 2017 12:22 am wrote:I cannot make all this easy for you, but there is an easier way once you get your head around it.
Instead of battling with iCustom, use the HGI library. It is much quicker and easier once you know what you are doing, and your code will be everlastingly reusable.
What follows is from my Holy Graily Bob's Candle Power EA.
First download hgi_lib.ex4 from Bob's HGI thread and store it in your libraries folder.
Then put this somewhere close to the top of your code:Then set up some externs and associated variables - you can leave out the 'extern' if you are coding this purely for your own use:Code: Select all
//Using hgi_lib //The HGI library functionality was added by tomele. Many thanks Thomas. #import "hgi_lib.ex4" enum SIGNAL {NONE=0,TRENDUP=1,TRENDDN=2,RANGEUP=3,RANGEDN=4,RADUP=5,RADDN=6}; enum SLOPE {UNDEFINED=0,RANGEABOVE=1,RANGEBELOW=2,TRENDABOVE=3,TRENDBELOW=4}; SIGNAL getHGISignal(string symbol,int timeframe,int shift); SLOPE getHGISlope (string symbol,int timeframe,int shift); #import //HGI constants #define hginoarrow " No relevant signal" #define hgiuparrowtradable " Tradable up arrow" #define hgidownarrowtradable " Tradable down arrow" #define hgiuparrowuntradable " Untradable up arrow" #define hgidownarrowuntradable " Untradable down arrow" #define hgiupradarrowtradable " Tradable Rad up arrow" #define hgidownradarrowtradable " Tradable Rad down arrow" #define hgiupradarrowuntradable " Untradable Rad up arrow" #define hgidownradarrowuntradable " Untradable Rad down arrow" #define hgibluewavylong " Blue wavy long" #define hgibluewavyshort " Blue wavy short" #define hgiyellowrangewavey " Yellow range wavey"Then set up code that reads the HGI library:Code: Select all
extern bool UseHgiTrendFilter=true; extern ENUM_TIMEFRAMES HgiTradeFilterTimeFrame=PERIOD_H4; extern bool TradeTrendArrows=true; extern bool TradeBlueWavyLines=true; extern bool HgiCloseOnOppositeSignal=true; extern bool HgiCloseOnYellowWavy=false; //////////////////////////////////////////////////////////////////////////////////////// string TradeHgiStatus;//Constants defined at top of file//Amended HGI code string TradeHgiTimeFrameDisplay=""; ////////////////////////////////////////////////////////////////////////////////////////The above will cycle back through the candles and find the most recent HGI signal. Adapt it to find the signal now by removing the loop back etc. I leave you to work out the rest for yourself.Code: Select all
if (UseHgiTrendFilter) { //Using hgi_lib //The HGI library functionality was added by tomele. Many thanks Thomas. SIGNAL signal = 0; SLOPE slope = 0; //Read HGI at the open of each new HgiTimeFrame candle, iterating back in time to //find the most recent signal. static datetime OldTradeHgiReadTime = 0; if (OldTradeHgiReadTime != iTime(Symbol(), HgiTradeFilterTimeFrame, 0) ) { OldTradeHgiReadTime = iTime(Symbol(), HgiTradeFilterTimeFrame, 0); TradeHgiStatus = hginoarrow; cc = 1; while(TradeHgiStatus == hginoarrow) { signal = getHGISignal(Symbol(), HgiTradeFilterTimeFrame, cc);//This library function looks for arrows. slope = getHGISlope (Symbol(), HgiTradeFilterTimeFrame, cc);//This library function looks for wavy lines. if (signal==TRENDUP) { if (TradeTrendArrows) TradeHgiStatus = hgiuparrowtradable; } else if (signal==TRENDDN) { if (TradeTrendArrows) TradeHgiStatus = hgidownarrowtradable; } else if (slope==TRENDBELOW) { if (TradeBlueWavyLines) TradeHgiStatus = hgibluewavylong; } else if (slope==TRENDABOVE) { if (TradeBlueWavyLines) TradeHgiStatus = hgibluewavyshort; } else if (HgiCloseOnYellowWavy) { if (slope==RANGEABOVE || slope == RANGEBELOW) { //No need to discriminate between the market and the yellow lines - a range //is a range and we are closing all trades on a range. TradeHgiStatus = hgiyellowrangewavey; }//if (slope==RANGEABOVE || slope == RANGEBELOW) }//if (HgiCloseOnYellowWavy) /*else if (signal==RADUP) { if (RadTradingAllowed) TradeHgiStatus = hgiuparrowtradable; } else if (signal==RADDN) { if (RadTradingAllowed) TradeHgiStatus = hgiuparrowtradable; */ cc++; }//while(TradeHgiStatus == hginoarrow) }//if (OldTradeHgiReadTime != iTime(Symbol(), HgiTimeFrame, 0)) }//if (UseHgiTrendFilter)
You can see some of the code commented out. That is because it is unused in the EA but I am not in a hurry to lose it. Note my appreciation of Thomas' contribution? The code is his, not mine, so include similar appreciation if you use it in your work.
So now you have code that loops back through the candles and spots the first relevant (to you) HGI signal. Now you can send a buy trade following an HGI buy signal and close an open sell trade and vice versa.
Take this construct as an example:Code: Select all
if (TradeHgiStatus == hgiuparrowtradable) { CloseAnySellTrades();//Fictional function that performs this action SendBuyTrade();//Fictional function that performs this action }//if (TradeHgiStatus = hgiuparrowtradable)
I have taken a long long long time to learn this stuff. A lot of it has been provided by coders far far far better than me. I have provided you with a masterclass in coding reading HGI. Use it without asking any stupid questions. There have been a glut of them tonight asked by (now formerly) members and I am not in the best of all possible moods.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
HGI for beginners.
How the hell should I know? You are trying to code an EA based on HGI without understanding what HGI is all about. I told you how to read the signals into an EA. That is all I can do.henkknot » Thu Aug 16, 2018 7:47 pm wrote:The problem I have now is; where can I find the value of the trend-signal to set my SL?
Give up, fella.
I tried to help you before. Stop annoying me. You will not enjoy the results of continuing to do wo.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
-
henkknot
- Trader
- Posts: 11
- Joined: Mon Jul 25, 2016 11:16 am
HGI for beginners.
I'm sorry Steve (and others) when I'm annoying you. Maybe I described my question not good enough. I'm looking for the value in de data box:
This value I can find with the iCustom-function but only from candle 1 and higher. I’m looking fort his value in candle 0 (current candle), directly when it appears. Because I can’t get it with iCustom I’m trying it with the library as you recommand.
I hope I explained my question better now, thanks for your help.
Henk.
I hope I explained my question better now, thanks for your help.
Henk.
You do not have the required permissions to view the files attached to this post.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
HGI for beginners.
You will only see a value in the data window if there is a signal. Even if there is a signal on the chart, you will still not see a value in the data window if the signal is one of those that will disappear when you reload the chart.henkknot » Sun Aug 19, 2018 2:30 pm wrote:I'm sorry Steve (and others) when I'm annoying you. Maybe I described my question not good enough. I'm looking for the value in de data box:
This value I can find with the iCustom-function but only from candle 1 and higher. I’m looking fort his value in candle 0 (current candle), directly when it appears. Because I can’t get it with iCustom I’m trying it with the library as you recommand.
I hope I explained my question better now, thanks for your help.
Henk.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
-
henkknot
- Trader
- Posts: 11
- Joined: Mon Jul 25, 2016 11:16 am
HGI for beginners.
Thanks Steve for your explanation.
I undertand that there only is a value if there is a signal. I can get this value (to set my SL) with the function iCustom, except for the current bar (0). When there is a signal on the current bar (0) iCustom gives as result "2147483647". Immediately when a new bar will be made and the signal is still visible (on candle 1), even after reload, iCustom gives a correct result (in my screen shot 1.1379). So my question was how can I get the correct value of the signal when it is visible on candle 0. On my holiday I read about the library and hope that I can find this value in there.
Thanks again for your patience.
Henk.
I undertand that there only is a value if there is a signal. I can get this value (to set my SL) with the function iCustom, except for the current bar (0). When there is a signal on the current bar (0) iCustom gives as result "2147483647". Immediately when a new bar will be made and the signal is still visible (on candle 1), even after reload, iCustom gives a correct result (in my screen shot 1.1379). So my question was how can I get the correct value of the signal when it is visible on candle 0. On my holiday I read about the library and hope that I can find this value in there.
Thanks again for your patience.
Henk.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
HGI for beginners.
Here is where I hand over to Tommaso. He understands this stuff.henkknot » Sun Aug 19, 2018 6:47 pm wrote:Thanks Steve for your explanation.
I undertand that there only is a value if there is a signal. I can get this value (to set my SL) with the function iCustom, except for the current bar (0). When there is a signal on the current bar (0) iCustom gives as result "2147483647". Immediately when a new bar will be made and the signal is still visible (on candle 1), even after reload, iCustom gives a correct result (in my screen shot 1.1379). So my question was how can I get the correct value of the signal when it is visible on candle 0. On my holiday I read about the library and hope that I can find this value in there.
Thanks again for your patience.
Henk.
2147483647 is an Crapql4 constant that represents this value. The constant is EMPTY_VALUE.
I am one of the posh gits here with access to the source code and can find no reference to it.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
-
VictoryTrading
- Posts: 1
- Joined: Sun Dec 30, 2018 8:29 am
HGI for beginners.
Hi,
Thanks for what looks like an awesome system that I would like to try. Unfortunately I'm getting the Holy Grail Indicator expired message in the expert tab. I'm using latest version from post 1. Has it expired or is it a problem my end?
Thanks!
Thanks for what looks like an awesome system that I would like to try. Unfortunately I'm getting the Holy Grail Indicator expired message in the expert tab. I'm using latest version from post 1. Has it expired or is it a problem my end?
Thanks!