Holy Graily Bob Basics - ask your questions here.

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Post Reply
z94joma
Posts: 3
Joined: Tue Nov 29, 2016 10:10 pm

Holy Graily Bob Basics - ask your questions here.

Post by z94joma »

milanese » Thu Dec 29, 2016 12:21 pm wrote: HGI_Name=HGI_v16.04 you need to change this to HGI_Name=HGI_v16.09 and download the actual HGI from the HGI thread, as this is the actual version of HGI than that setfile should work..

Cheers :)

Tommaso
Hi Tommaso

I did change it to 16.09 and I have downloaded HGI lib etc. And read the manual. Alphabetical and so on...
Any other ideas?

/Magnus
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Holy Graily Bob Basics - ask your questions here.

Post by milanese »

z94joma » Thu Dec 29, 2016 11:28 am wrote:
Hi Tommaso

I did change it to 16.09 and I have downloaded HGI lib etc. And read the manual. Alphabetical and so on...
Any other ideas?

/Magnus
Please check your log-files, if there are any error messages and naturally check trivial thingies, like if trading is allowed for EAs ecc..
And important try it without this special setfile..
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
z94joma
Posts: 3
Joined: Tue Nov 29, 2016 10:10 pm

Holy Graily Bob Basics - ask your questions here.

Post by z94joma »

milanese » Thu Dec 29, 2016 2:31 pm wrote: Please check your log-files, if there are any error messages and naturally check trivial thingies, like if trading is allowed for EAs ecc..
And important try it without this special setfile..
Cheers :)

Tommaso
Hi

Tried it. No luck. The only thing I didn't get from the manual was
"• Add the template you prefer from your templates list (right-click on the chart, then
select Templates). You will find the templates in the zipfile in Bob's thread."

Could not find .tpl in thread or zip.

But got HGI working in other instances and terminals.

/Magnus
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Holy Graily Bob Basics - ask your questions here.

Post by milanese »

z94joma » Thu Dec 29, 2016 1:51 pm wrote:
Hi

Tried it. No luck. The only thing I didn't get from the manual was
"• Add the template you prefer from your templates list (right-click on the chart, then
select Templates). You will find the templates in the zipfile in Bob's thread."

Could not find .tpl in thread or zip.

But got HGI working in other instances and terminals.

/Magnus
The template files are removed as they were totally outdated..
You have to create your own templates..
But that has nothing to do with the EA..
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
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob Basics - ask your questions here.

Post by SteveHopwood »

z94joma » Thu Dec 29, 2016 1:51 pm wrote:
Hi

Tried it. No luck. The only thing I didn't get from the manual was
"• Add the template you prefer from your templates list (right-click on the chart, then
select Templates). You will find the templates in the zipfile in Bob's thread."

Could not find .tpl in thread or zip.

But got HGI working in other instances and terminals.

/Magnus
There might be changes in Bob's post that are not reflected in the user guide.

The idea that those of us who provide mountains of free code here can possibly keep up with every tiny change elsewhere is ludicrous. Members of SHF are expected to do some thinking for themselves. Kindly put your thinking cap on before posting in the future, and use your brains.

Harsh as this may sound, I am posting in the spirit of, this-is-a-thread-for-dummies, and so being gentle. Do say if you want me to write what I am actually thinking.

:xm:
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.
User avatar
1Direction
Trader
Posts: 97
Joined: Sun Jan 29, 2017 8:37 pm
Location: London

Holy Graily Bob Basics - ask your questions here.

Post by 1Direction »

hi guys

I hope I post at the right place if not feel free to move my post.

After joining the forum I started to experiment with HGI first and HGB there after on indices. I do not trade currencies. After 3 days of operating on US30, UK100 and DE30 I must say I've been extremely pleased about the results. It's too early for finale conclusions but I'll make sure to share my setup with all of you once I manage to fix small issues.

I've pretty much read everything I could PDF,Threads etc. after looking into the code (I'm not a coder) I found the way to fix my main issue regarding pip value for symbols encoded on line 563. I had to change my broker symbols against the hard coded one see bellow.

Code: Select all

//Calculating the factor needed to turn pip values into their correct points value to accommodate different Digit size.
//Thanks to Lifesys for providing this code. Coders, you need to briefly turn of Wrap and turn on a mono-spaced font to view this properly and see how easy it is to make changes.
//string          pipFactor[]  = {"JPY","XAG","SILVER","BRENT","WTI","XAU","GOLD","SP500","S&P","UK100","WS30","DAX30","DJ30","NAS100","CAC400"};
//double          pipFactors[] = { 100,  100,  100,     100,    100,  10,   10,    10,     10,   1,      1,     1,      1,     1,       1};
string          pipFactor[]  = {"JPY","XAG","SILVER","BRENT","WTI","XAUUSD","GOLD","US500","S&P","UK100","STOXX50","DE30","US30","USTEC","F40","ZAR","TRY","SEK","NOK","DKK"};
double          pipFactors[] = { 100,  100,  100,     100,    100,  10,   10,    10,     10,   1,      1,     1,      1,     1,       1,      1000, 1000, 1000, 1000, 1000};
double          factor;//For pips/points stuff. Set up in int init()
My question is regarding the proper way to set the values the comment says "Coders, you need to briefly turn of Wrap and turn on a mono-spaced font to view this properly and see how easy it is to make changes."

How do I turn the wrapper off and change the font?

Thank you all in advance for your help and sharing this exceptional EA. Looking forward to share my "success" back to the community.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob Basics - ask your questions here.

Post by SteveHopwood »

1Direction » Fri Feb 03, 2017 10:19 am wrote:hi guys

I hope I post at the right place if not feel free to move my post.

After joining the forum I started to experiment with HGI first and HGB there after on indices. I do not trade currencies. After 3 days of operating on US30, UK100 and DE30 I must say I've been extremely pleased about the results. It's too early for finale conclusions but I'll make sure to share my setup with all of you once I manage to fix small issues.

I've pretty much read everything I could PDF,Threads etc. after looking into the code (I'm not a coder) I found the way to fix my main issue regarding pip value for symbols encoded on line 563. I had to change my broker symbols against the hard coded one see bellow.

Code: Select all

//Calculating the factor needed to turn pip values into their correct points value to accommodate different Digit size.
//Thanks to Lifesys for providing this code. Coders, you need to briefly turn of Wrap and turn on a mono-spaced font to view this properly and see how easy it is to make changes.
//string          pipFactor[]  = {"JPY","XAG","SILVER","BRENT","WTI","XAU","GOLD","SP500","S&P","UK100","WS30","DAX30","DJ30","NAS100","CAC400"};
//double          pipFactors[] = { 100,  100,  100,     100,    100,  10,   10,    10,     10,   1,      1,     1,      1,     1,       1};
string          pipFactor[]  = {"JPY","XAG","SILVER","BRENT","WTI","XAUUSD","GOLD","US500","S&P","UK100","STOXX50","DE30","US30","USTEC","F40","ZAR","TRY","SEK","NOK","DKK"};
double          pipFactors[] = { 100,  100,  100,     100,    100,  10,   10,    10,     10,   1,      1,     1,      1,     1,       1,      1000, 1000, 1000, 1000, 1000};
double          factor;//For pips/points stuff. Set up in int init()
My question is regarding the proper way to set the values the comment says "Coders, you need to briefly turn of Wrap and turn on a mono-spaced font to view this properly and see how easy it is to make changes."

How do I turn the wrapper off and change the font?

Thank you all in advance for your help and sharing this exceptional EA. Looking forward to share my "success" back to the community.
There is no Wrap feature in the Empty4 editor, so ignore the comment.

Great to see you adapting the code to suit yourself. :clap: :clap: :clap:

:xm:
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.
User avatar
1Direction
Trader
Posts: 97
Joined: Sun Jan 29, 2017 8:37 pm
Location: London

Holy Graily Bob Basics - ask your questions here.

Post by 1Direction »

SteveHopwood » Fri Feb 03, 2017 12:14 pm wrote: There is no Wrap feature in the Empty4 editor, so ignore the comment.

Great to see you adapting the code to suit yourself. :clap: :clap: :clap:

:xm:
Thanks for the quick reply, greatly appreciated!

Can you give me any info on how to set the pipFactors value for an underlying correctly. The pip definition is always different from broker to broker and platform to platform. My assumption is to look up the digits value under the symbol specification in Empty4 and enter this value for the symbol pipFactor i.e digits=1 -> 1 , digits=5 -> 10000. correct?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Holy Graily Bob Basics - ask your questions here.

Post by milanese »

1Direction » Fri Feb 03, 2017 11:51 am wrote:
Thanks for the quick reply, greatly appreciated!

Can you give me any info on how to set the pipFactors value for an underlying correctly. The pip definition is always different from broker to broker and platform to platform. My assumption is to look up the digits value under the symbol specification in Empty4 and enter this value for the symbol pipFactor i.e digits=1 -> 1 , digits=5 -> 10000. correct?
take a look in the APTM code, that should answer your question...

Code: Select all

//+------------------------------------------------------------------+
//| getPipFactor()                                                   |
//+------------------------------------------------------------------+
int GetPipFactor(string Xsymbol)
  {
   static const string factor1000[]={"SEK","TRY","ZAR","MXN"};
   static const string factor100[]         = {"JPY","XAG","SILVER","BRENT","WTI"};
   static const string factor10[]          = {"XAU","GOLD","SP500","US500Cash","US500","Bund"};
   static const string factor1[]           = {"UK100","WS30","DAX30","NAS100","CAC40","FRA40","GER30","ITA40","EUSTX50","JPN225","US30Cash","US30"};

   int xFactor=10000;       // correct xFactor for most pairs
   if(MarketInfo(Xsymbol,MODE_DIGITS)<=1) xFactor=1;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==2) xFactor=10;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==3) xFactor=100;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==4) xFactor=1000;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==5) xFactor=10000;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==6) xFactor=100000;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==7) xFactor=1000000;
   for(int j=0; j<ArraySize(factor1000); j++)
     {
      if(StringFind(Xsymbol,factor1000[j])!=-1) xFactor=1000;
     }
   for(int j=0; j<ArraySize(factor100); j++)
     {
      if(StringFind(Xsymbol,factor100[j])!=-1) xFactor=100;
     }
   for(int j=0; j<ArraySize(factor10); j++)
     {
      if(StringFind(Xsymbol,factor10[j])!=-1) xFactor=10;
     }
   for(int j=0; j<ArraySize(factor1); j++)
     {
      if(StringFind(Xsymbol,factor1[j])!=-1) xFactor=1;
     }

   return (xFactor);
  }
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
User avatar
1Direction
Trader
Posts: 97
Joined: Sun Jan 29, 2017 8:37 pm
Location: London

Holy Graily Bob Basics - ask your questions here.

Post by 1Direction »

milanese » Fri Feb 03, 2017 1:05 pm wrote:
take a look in the APTM code, that should answer your question...

Code: Select all

//+------------------------------------------------------------------+
//| getPipFactor()                                                   |
//+------------------------------------------------------------------+
int GetPipFactor(string Xsymbol)
  {
   static const string factor1000[]={"SEK","TRY","ZAR","MXN"};
   static const string factor100[]         = {"JPY","XAG","SILVER","BRENT","WTI"};
   static const string factor10[]          = {"XAU","GOLD","SP500","US500Cash","US500","Bund"};
   static const string factor1[]           = {"UK100","WS30","DAX30","NAS100","CAC40","FRA40","GER30","ITA40","EUSTX50","JPN225","US30Cash","US30"};

   int xFactor=10000;       // correct xFactor for most pairs
   if(MarketInfo(Xsymbol,MODE_DIGITS)<=1) xFactor=1;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==2) xFactor=10;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==3) xFactor=100;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==4) xFactor=1000;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==5) xFactor=10000;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==6) xFactor=100000;
   else if(MarketInfo(Xsymbol,MODE_DIGITS)==7) xFactor=1000000;
   for(int j=0; j<ArraySize(factor1000); j++)
     {
      if(StringFind(Xsymbol,factor1000[j])!=-1) xFactor=1000;
     }
   for(int j=0; j<ArraySize(factor100); j++)
     {
      if(StringFind(Xsymbol,factor100[j])!=-1) xFactor=100;
     }
   for(int j=0; j<ArraySize(factor10); j++)
     {
      if(StringFind(Xsymbol,factor10[j])!=-1) xFactor=10;
     }
   for(int j=0; j<ArraySize(factor1); j++)
     {
      if(StringFind(Xsymbol,factor1[j])!=-1) xFactor=1;
     }

   return (xFactor);
  }
Thanks a lot for confirming the digit part :good:
Post Reply

Return to “Thingy Bob EA's”