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

Old and defunct Holy Graily Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3966
Page 48 of 129
Author:  SteveHopwood [ Mon Dec 15, 2014 7:08 pm ]
Post subject:  Holy Graily Bob

MurphyMan » Mon Dec 15, 2014 6:57 pm wrote:
Lee :clap: :clap: .

I was having the exact same problem - for days! My brain was completely scrambled, which according to my wife and Steve is a state of normalcy.
Yup.
Of course, the name of the indicator is HGI_v15.01

In the settings I somehow had HGI_v.15.01 Just a simple little dot. :uff:
You would be stunned to know how many hours of pain is caused to coders by a simple little dot. We are talking thousands here........

:xm:
Author:  PontusLSE [ Mon Dec 15, 2014 7:32 pm ]
Post subject:  Holy Graily Bob

Hey pals :)

I´m mostly lurking around here, but this EA ( and the indi) really caught my attention, brilliant work Steve, Bob and everybody else who is involved. Absolutely stunning.

I did get alot of "Error 130 - invalid stops", and after some look at the code I want to suggest this change,

Old code, starting at line 1913:

Code: Select all

double CheckMinimumPipsTo20(double price20, double TradePrice,  int type)
{
   //Recalculates price if there are less than MinPipsToNext20 between TradePrice price20
   
   if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   {
      if (type == OP_BUY)
         price20+= (20 / factor);
      else
         price20-= (20 / factor);
   }//if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   
   
   return(price20);

}//double CheckMinimumPipsTo20(double price, int type)
New code:

Code: Select all

double CheckMinimumPipsTo20(double price20, double TradePrice,  int type)
{
   //Recalculates price if there are less than MinPipsToNext20 between TradePrice price20
   
   if (type == OP_BUY)
      if (MathAbs(TradePrice -price20) < (MinPipsToNext20 / factor) )
      {
            price20+= (20 / factor);
      }//if (MathAbs(TradePrice -price20) < (MinPipsToNext20 / factor) )
   
   else
      if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
      {
            price20-= (20 / factor);
      }//if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   
   
   return(price20);

}//double CheckMinimumPipsTo20(double price, int type)
Author:  nicolkoekoek [ Mon Dec 15, 2014 8:19 pm ]
Post subject:  Holy Graily Bob

MurphyMan wrote:
Have you checked that the 'HGI_Name' in the HGB Inputs matches the HG Indicator that you have in your indicators folder?

Lee
Lee :clap: :clap: .

I was having the exact same problem - for days! My brain was completely scrambled, which according to my wife and Steve is a state of normalcy.

Of course, the name of the indicator is HGI_v15.01

In the settings I somehow had HGI_v.15.01 Just a simple little dot. :uff:

Thanks Lee. I hope this also helps someone else.

Sam
Thanks Lee and Sam,

I upgraded my HGB_1V demo with the HGB_2 and then I got this problem, although it was running okay with HGB_1V. Since I didn't change anything to the indicator(Both use HGI_v15.01), I assumed by only changing the EA it should run normally, which it didn't. After hearing you guys, I decided to reinstalling a new HGI_v15.01 over the old one, and suddenly I have both sell and buy orders again..I guess this Empty4 is playing with me.. :evil:
Thanks for the quick help! :clap:
Nicolaas
Author:  Radar [ Mon Dec 15, 2014 8:26 pm ]
Post subject:  Holy Graily Bob

Hey PontusLSE,
PontusLSE » Tue Dec 16, 2014 5:02 am wrote:Hey pals :)

I´m mostly lurking around here, but this EA ( and the indi) really caught my attention, brilliant work Steve, Bob and everybody else who is involved. Absolutely stunning.

I did get alot of "Error 130 - invalid stops", and after some look at the code I want to suggest this change,

Old code, starting at line 1913:

Code: Select all

double CheckMinimumPipsTo20(double price20, double TradePrice,  int type)
{
   //Recalculates price if there are less than MinPipsToNext20 between TradePrice price20
   
   if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   {
      if (type == OP_BUY)
         price20+= (20 / factor);
      else
         price20-= (20 / factor);
   }//if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   
   
   return(price20);

}//double CheckMinimumPipsTo20(double price, int type)
New code:

Code: Select all

double CheckMinimumPipsTo20(double price20, double TradePrice,  int type)
{
   //Recalculates price if there are less than MinPipsToNext20 between TradePrice price20
   
   if (type == OP_BUY)
      if (MathAbs(TradePrice -price20) < (MinPipsToNext20 / factor) )
      {
            price20+= (20 / factor);
      }//if (MathAbs(TradePrice -price20) < (MinPipsToNext20 / factor) )
   
   else
      if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
      {
            price20-= (20 / factor);
      }//if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   
   
   return(price20);

}//double CheckMinimumPipsTo20(double price, int type)

Not quite... Else goes with the last If... Your last If is "if MathAbs..."

The Error: 130's are caused by the TrailingStop function... Go back a few pages, and see the solution.

Have fun!

Radar =8^)
Author:  PontusLSE [ Mon Dec 15, 2014 8:35 pm ]
Post subject:  Holy Graily Bob

I am not using the trailing stop function, and I missed a small part of the new code :)


This is what it was supposed to look like,

Code: Select all

double CheckMinimumPipsTo20(double price20, double TradePrice,  int type)
{
   //Recalculates price if there are less than MinPipsToNext20 between TradePrice price20
   
   if (type == OP_BUY)
   
      if (MathAbs(TradePrice -price20) < (MinPipsToNext20 / factor) )
      {
            price20+= (20 / factor);
      }//if (MathAbs(TradePrice -price20) < (MinPipsToNext20 / factor) )
   
   else if (type == OP_SELL)
   
      if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
      {
            price20-= (20 / factor);
      }//if (MathAbs(price20 - TradePrice) < (MinPipsToNext20 / factor) )
   
   
   return(price20);

}//double CheckMinimumPipsTo20(double price, int type)
Author:  SteveHopwood [ Mon Dec 15, 2014 9:13 pm ]
Post subject:  Holy Graily Bob

Guys, just to let you know I really appreciate what you are doing here.

I know that HGB still has some bugs. To be honest, they are annoying me but not actually impinging on what I am trying to do in demo trading. So, they are on a back burner so far as I am concerned - something to deal with in the future.

Anybody happy to post a fix to any bug in V2 that they have tested and found works, please do so if you are sure it is a fix and I will adopt it, with due appreciation in the source. Have a quick look at line 36 first, as a classic example of all our inattention to detail - I only noticed it this morning. No biggee, but a great example of something simple that can be missed. I didn't bother to post a fix, as nobody else had noticed. Look a tad more closely at your screen display, folks.

Please stop throwing isolated bits of code at me in the hope that I will have the time to take notice. I don't. There are lots of you but only one of me. And I still have a disabled wife to look after - in the week when I have the Christmas concerts to rehearse for. Great fun, but they reduce my coding time.

:xm:
Author:  droland [ Mon Dec 15, 2014 11:15 pm ]
Post subject:  Holy Graily Bob

SteveHopwood » Mon Dec 15, 2014 2:13 pm wrote:Guys, just to let you know I really appreciate what you are doing here.

I know that HGB still has some bugs. To be honest, they are annoying me but not actually impinging on what I am trying to do in demo trading. So, they are on a back burner so far as I am concerned - something to deal with in the future.

Anybody happy to post a fix to any bug in V2 that they have tested and found works, please do so if you are sure it is a fix and I will adopt it, with due appreciation in the source. Have a quick look at line 36 first, as a classic example of all our inattention to detail - I only noticed it this morning. No biggee, but a great example of something simple that can be missed. I didn't bother to post a fix, as nobody else had noticed. Look a tad more closely at your screen display, folks.

Please stop throwing isolated bits of code at me in the hope that I will have the time to take notice. I don't. There are lots of you but only one of me. And I still have a disabled wife to look after - in the week when I have the Christmas concerts to rehearse for. Great fun, but they reduce my coding time.

:xm:
Just so you know, sleep is much overrated so you still have another 8 hours to work with. Sheeesh. Some people are so selfish. :)
Author:  SteveHopwood [ Mon Dec 15, 2014 11:40 pm ]
Post subject:  Holy Graily Bob

droland » Mon Dec 15, 2014 11:15 pm wrote:
Just so you know, sleep is much overrated so you still have another 8 hours to work with. Sheeesh. Some people are so selfish. :)
Well, we both know I am just a piss-artist with no care for my fellow beings. Bugger; you have me sussed.

Mind, given the length of time and deletions that last para (yup, and thish) took me to typsh under the latest affluence of incoho sh, you woudn't want me coding right now.

I am not joking, guys.

:xm:
Author:  John [ Mon Dec 15, 2014 11:44 pm ]
Post subject:  Holy Graily Bob

SteveHopwood » Mon Dec 15, 2014 4:40 pm wrote:
droland » Mon Dec 15, 2014 11:15 pm wrote:
Just so you know, sleep is much overrated so you still have another 8 hours to work with. Sheeesh. Some people are so selfish. :)
Well, we both know I am just a piss-artist with no care for my fellow beings. Bugger; you have me sussed.

Mind, given the length of time and deletions that last para (yup, and thish) took me to typsh under the latest affluence of incoho sh, you woudn't want me coding right now.

I am not joking, guys.

:xm:
In that case, Steve, there is really only one logical next step as I see it....

:idea:

HAVE ANOTHER!

Cheers!
Author:  SteveHopwood [ Tue Dec 16, 2014 12:02 am ]
Post subject:  Holy Graily Bob

John » Mon Dec 15, 2014 11:44 pm wrote:
In that case, Steve, there is really only one logical next step as I see it....

:idea:

HAVE ANOTHER!

Cheers!
Like I need further bidding. glug glug glug glug

That is before I get started tomorrow - our 42nd wedding anniversary. An anniversary I did not expect to see a few months ago.

:party:
All times are UTC Page 48 of 129