Gertje plus Squalou plus Forexhard EA

Post Reply
jb68
Trader
Posts: 71
Joined: Mon Jan 30, 2012 11:30 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by jb68 »

acostafulano wrote:Is this supposed to be this way?:
FH.png
I'd like to add, though, that despite this weird thingy, my first gbpjoy breakout trade and correspondent grid fired up correctly :)

edit: 3 trades fired up now. Everything looks ok
Hi,
The thing you encircled with red is normal. That is Empty Value (NULL) on Empty4 and means there is no new CZ box forming. Steve DID a great job printing these variables but you have to understand this is a working stage (alpha or beta ) for the EA so this weird values might be removed from final version.
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by acostafulano »

jb68 wrote:
acostafulano wrote:Is this supposed to be this way?:
FH.png
I'd like to add, though, that despite this weird thingy, my first gbpjoy breakout trade and correspondent grid fired up correctly :)

edit: 3 trades fired up now. Everything looks ok
Hi,
The thing you encircled with red is normal. That is Empty Value (NULL) on Empty4 and means there is no new CZ box forming. Steve DID a great job printing these variables but you have to understand this is a working stage (alpha or beta ) for the EA so this weird values might be removed from final version.
Understood :) Just pointing out everything that appears to be weird to help get a bug-free EA. The concept is really promising
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.

Re: Gertje plus Squalou plus Forexhard EA

Post by SteveHopwood »

jb68 wrote:
acostafulano wrote:Is this supposed to be this way?:
FH.png
I'd like to add, though, that despite this weird thingy, my first gbpjoy breakout trade and correspondent grid fired up correctly :)

edit: 3 trades fired up now. Everything looks ok
Hi,
The thing you encircled with red is normal. That is Empty Value (NULL) on Empty4 and means there is no new CZ box forming. Steve DID a great job printing these variables but you have to understand this is a working stage (alpha or beta ) for the EA so this weird values might be removed from final version.
They have already gone. They served their purpose.

I also got the 10 trades at once thingy, so defo a bug to hunt down. Made 2.5% when the market cooperated, but no chance of a real money account being so blessed. :lol:

:D
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.
plateman
Trader
Posts: 43
Joined: Wed Nov 16, 2011 9:25 am

Re: Gertje plus Squalou plus Forexhard EA

Post by plateman »

Give this EA a chance, it has only been running for a few hours, I'm trading 0.2 lots and currently $360 up. I had two instances of multiple trades but each one closed at a (small) profit.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by spotdespot »

SteveHopwood wrote:
jb68 wrote:
acostafulano wrote:Is this supposed to be this way?:
FH.png
I'd like to add, though, that despite this weird thingy, my first gbpjoy breakout trade and correspondent grid fired up correctly :)

edit: 3 trades fired up now. Everything looks ok
Hi,
The thing you encircled with red is normal. That is Empty Value (NULL) on Empty4 and means there is no new CZ box forming. Steve DID a great job printing these variables but you have to understand this is a working stage (alpha or beta ) for the EA so this weird values might be removed from final version.
They have already gone. They served their purpose.

I also got the 10 trades at once thingy, so defo a bug to hunt down. Made 2.5% when the market cooperated, but no chance of a real money account being so blessed. :lol:

:D
I had this too but also they also opened at 10 x the lot size (the initial trades opened at the specified lot size). I think this was because I had 0.2 as the trade size, 0.1 as the lots per 1000 or balance and a 20k balance......whoops the first time this happened I got away with it, second time (as I was looking at the first wondering what went on) I was very glad it wasn't live :lol:
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.

Re: Gertje plus Squalou plus Forexhard EA

Post by SteveHopwood »

Latest update in post 1, fixing the multiple-trades thingy. It was the usual, a copy/paste/forgot-to-edit bloop.

Coders, to save a re-download go to
void HasSellFilled()

and find this line of code:
string name = NextBuyLineName;

and change the highlighted bit then recompile
string name = NextSellLineName;

I have reintroduced the BB0, BB1 etc value displays until we are sure the code is watertight.

I ran a visual backtest, M15 Open prices; this is what pointed me to the bloop. Allowing the test to continue, I noticed that there are occasional double trades at the same level. It looks as though the pending trade line deletion fails from time to time, but I have no idea why.

Here is the void HasBuyFilled() function with additional comments to explain my logic more fully:

Code: Select all

void HasBuyFilled()
{
   //This function examines the Bid to see if a pending Buy price has been reached, and sends the trade if so.
   //Uses the Bid for buys also, as this is the price we see on the chart

   double take, stop, price;
   int type;
   bool CancelTrade = false;

   
   //Set pending price 
   string name = NextBuyLineName;
   if (name != "")
   {
      if (ObjectFind(name) > -1) double PendingPrice = ObjectGet(name, OBJPROP_PRICE1);
   }//if (name != "")
   
   //Initial trade. If risetoline exists, meaning that the first trade has yet to be sent.
   if (ObjectFind(risetoline) > -1) 
   {
      name = risetoline;
      PendingPrice = ObjectGet(name, OBJPROP_PRICE1);
   }//if (ObjectFind(risetoline) > -1) 
   
   RefreshRates();
   if (Bid >= PendingPrice && PendingPrice > 0)
   {
      //Ensure that OpenTrades + 1 is < ((NoOfTrades * 2) -1). If it is == ((NoOfTrades * 2) -1),
      //a further trade would leave the grid fully populated with hedged trades achieving nothing but
      //paying the crim shed-loads of swap. In this case, close the position.
      if (IsBasketStopLossHit(OP_BUY) )
      {
         CloseAllTrades();
         if (ForceTradeClosure) CloseAllTrades();
         DeleteRemainingPendingLines();//Remove pending price lines         
         return;
      }//if (IsBasketStopLossHit(OP_BUY) )
      
      //If we are looking for an initial trade, only take it if the previous candle closed below the line
      if (name == risetoline)
      {
         if (iOpen(NULL, BoxTimeFrame, 1) >= PendingPrice) return;
      }//if (name == risetoline)
            
      price = Ask;
      type = OP_BUY;
      
      
      bool result = SendSingleTrade(type, TradeComment, SendLot, price, stop, take);
      if (result)
      {
         if (name == risetoline) SetUpBuyGrid();
         //Move the pending sell to half-way up the CZ box.
         if (ObjectFind(falltoline) > -1 && OpenTrades == 0)
         {
            double ltarget = ObjectGet(falltoline, OBJPROP_PRICE1);
            double extent = (PendingPrice - ltarget) / 2;
            price = NormalizeDouble(ltarget + extent, Digits);
            ObjectMove(falltoline, 0, Time[0], price);
         }//if (ObjectFind(falltoline) > -1)
         //Delete the pending trade line
         ObjectDelete(name);         
      }//if (result)
   }//if (Bid >= PendingPrice && PendingPrice > 0)
   

}//End void HasBuyFilled()
:D
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.
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Gertje plus Squalou plus Forexhard EA

Post by magft »

SteveHopwood wrote:
forexhard wrote:Steve, there is a flaw in the indicator's box-making logic.

The idea is not to simply make boxes with a static/fixed height parameter. It should be more flexible than that. Just as the number of bars is allowed to grow wider even though the minimum is 30, the height in pips should be allowed to grow shorter even though the maximum is 30p.

The attached pics show the same box. But the white frame shows how big it should really be.

As a result, out of 100 possible CZ's, you could literally have 100 different heights and widths.
Over to the indi coders. I haven't a clue how the code works. Indi code leaves me looking even blanker than normal and saying, "Eh? Whut?"

It probably doesn't matter too much here, given the nature of the grid trading, but if anyone can correct this, then that would be great.

:D

Great work going on here, i've been busy with other projects, if no one else gets this sorted i'll have a look tonight. I'm familiar with the indy code so i'll see how we can make this work as required. I'll have a scan for anything that may be out of place. Any other issues whilst i'm at it?

Regards

Mike
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.

Re: Gertje plus Squalou plus Forexhard EA

Post by SteveHopwood »

magft wrote:Great work going on here, i've been busy with other projects, if no one else gets this sorted i'll have a look tonight. I'm familiar with the indy code so i'll see how we can make this work as required. I'll have a scan for anything that may be out of place. Any other issues whilst i'm at it?

Regards

Mike
I don't think so, Mike. Thanks; it would be great for you to have a look at this little problem.

I have attached sq's original, in case that helps.

Cheers

:D
You do not have the required permissions to view the files attached to this post.
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.
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Gertje plus Squalou plus Forexhard EA

Post by magft »

SteveHopwood wrote:
magft wrote:Great work going on here, i've been busy with other projects, if no one else gets this sorted i'll have a look tonight. I'm familiar with the indy code so i'll see how we can make this work as required. I'll have a scan for anything that may be out of place. Any other issues whilst i'm at it?

Regards

Mike
I don't think so, Mike. Thanks; it would be great for you to have a look at this little problem.

I have attached sq's original, in case that helps.

Cheers

:D
Steve

That is a really old version of the indy, in the comments v1.8. The one you have in first post is v1.13 but i have v1.13_R1 as well which has a minor mod. Can you remember what changes you made? I have a quick scan and looks like you have set defaults and commented out drawing bits is that correct?

Ive attached v1.13_R1 for reference, in the top the history states

Code: Select all

 * - v1.13 R1 (2011.09.22):
 *   With AutoBoxRange=true:
 *   Box continue fixed. Box Range changed when new Day starts because of change in ATR value.
 *   Also Box change values when variable "_period" no longer rise. "i+_period-1" points then to the wrong bar.
 *   In display_stats() Division by Zero 'num_buy' and 'num_sell' avoided.
This may be the issue FH was referring to, i'll have a play around tonight, day job beckons at the mo.

Regards

Mike
You do not have the required permissions to view the files attached to this post.
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.

Re: Gertje plus Squalou plus Forexhard EA

Post by SteveHopwood »

magft wrote:
SteveHopwood wrote:
magft wrote:Great work going on here, i've been busy with other projects, if no one else gets this sorted i'll have a look tonight. I'm familiar with the indy code so i'll see how we can make this work as required. I'll have a scan for anything that may be out of place. Any other issues whilst i'm at it?

Regards

Mike
I don't think so, Mike. Thanks; it would be great for you to have a look at this little problem.

I have attached sq's original, in case that helps.

Cheers

:D
Steve

That is a really old version of the indy, in the comments v1.8. The one you have in first post is v1.13 but i have v1.13_R1 as well which has a minor mod. Can you remember what changes you made? I have a quick scan and looks like you have set defaults and commented out drawing bits is that correct?

Ive attached v1.13_R1 for reference, in the top the history states

Code: Select all

 * - v1.13 R1 (2011.09.22):
 *   With AutoBoxRange=true:
 *   Box continue fixed. Box Range changed when new Day starts because of change in ATR value.
 *   Also Box change values when variable "_period" no longer rise. "i+_period-1" points then to the wrong bar.
 *   In display_stats() Division by Zero 'num_buy' and 'num_sell' avoided.
This may be the issue FH was referring to, i'll have a play around tonight, day job beckons at the mo.

Regards

Mike
Thanks Mike. It is too long ago to remember what I was trying to do. I have a sqDynamicBreakoutBox.old in the folder, so I guess this was the original so I could revert once I had thoroughly screwed things up. :lol:
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.
Post Reply

Return to “Automated trading systems”