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

Holy Graily Bob Basics - ask your questions here.
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3979
Page 65 of 72
Author:  z94joma [ Thu Dec 29, 2016 11:28 am ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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
Author:  milanese [ Thu Dec 29, 2016 1:31 pm ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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
Author:  z94joma [ Thu Dec 29, 2016 1:51 pm ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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
Author:  milanese [ Thu Dec 29, 2016 4:06 pm ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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
Author:  SteveHopwood [ Thu Dec 29, 2016 9:15 pm ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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:
Author:  1Direction [ Fri Feb 03, 2017 10:19 am ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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.
Author:  SteveHopwood [ Fri Feb 03, 2017 11:14 am ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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:
Author:  1Direction [ Fri Feb 03, 2017 11:51 am ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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?
Author:  milanese [ Fri Feb 03, 2017 12:05 pm ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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);
  }
Author:  1Direction [ Fri Feb 03, 2017 12:26 pm ]
Post subject:  Holy Graily Bob Basics - ask your questions here.

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:
All times are UTC Page 65 of 72