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

European Breakout Grid Trap Strategy
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=101
Page 3 of 11
Author:  forextrader-radioman [ Tue Nov 29, 2011 5:04 pm ]
Post subject:  overview

here the overview ...

best wishes from here,
Dietmar (forextrader-radioman)
Author:  gaheitman [ Tue Nov 29, 2011 6:26 pm ]
Post subject:  Re: overview

forextrader-radioman wrote:here the overview ...

best wishes from here,
Dietmar (forextrader-radioman)
These are absolutely fabulous results. By my calculations, you are averaging 77.6 pips per day in EURUSD and 41.8 pips per day in GBPUSD, for a combined average of 119.4 pips per day.

Is anyone else getting these results with a completely mechanical system? Anyone?

George
Author:  DragosDanescu [ Tue Nov 29, 2011 8:05 pm ]
Post subject:  Re: overview

gaheitman wrote:
forextrader-radioman wrote:here the overview ...

best wishes from here,
Dietmar (forextrader-radioman)
These are absolutely fabulous results. By my calculations, you are averaging 77.6 pips per day in EURUSD and 41.8 pips per day in GBPUSD, for a combined average of 119.4 pips per day.

Is anyone else getting these results with a completely mechanical system? Anyone?

George
Hehe, George,
Nice to see you here, I need some help! If you got some time...
Have written some code for this, but I got some problems with grid send, sometimes it doesn't stop sending the orders and it never close all trades when TP level is reached. Can you have a look, please?
Thank you!
Author:  gaheitman [ Tue Nov 29, 2011 11:36 pm ]
Post subject:  Re: European Breakout Grid Trap Strategy

Attached is an indicator that should show us the strategy as it plays out for each day. First off, you need to set some variables correctly for what you are doing. From the indicator:

Code: Select all

extern int    Start_Hour=7; //the hour where we begin the trap
extern int    Step_Size = 15; //pips between orders
extern color  FontClr=Black;  //Font size and color
extern int    FontSize=10; 
extern int    MaxSpread=2;    //MaxSpread so that you can test during high spread times
The indicator will show a midline and the 3 buy and 3 sell lines. Below each line the indicator puts the current number of pending/open trades at that level. These numbers are updated whenever something occurs to change the numbers. For example, if a Long level is passed, that level will be updated as well as the three short levels. Below the imaginary (sorry Empty4 only gives you 8 buffers) Long Take Profit line, the indicator puts the net pips as of the close of that bar. Once a TP is hit, the final net pips minus spread is put above the candle where the TP was hit as well as on the bottom below the imaginary Short TP line.
pic_02 2011-11-29 18.32.gif
It's not smart enough to handle big gaps over the weekend (who is? :>), but most of the month of November is spot on with Dietmar's results. Take a look back, and there are some really, really bad days....

This is my first 4 digit/ 5 digit broker code so be kind if things look all wonkity. :D

George
Author:  garyfritz [ Wed Nov 30, 2011 12:02 am ]
Post subject:  Re: European Breakout Grid Trap Strategy

I'm scratching my head trying to figure out how you could calculate the risk for this. I.e. how much of your account do you risk at each buy/sell? There are so many orders, and you can keep adding them on, that I'm not quite sure what the maximum risk is. Dietmar says there could be "20 orders" open but as far as I can tell, with his definition there is no limit.

Dragos, I really want to see your EA. Then I want to change it. :D I want to see if some changes to the rules could contain the risk a bit more and maybe even improve the results.
Author:  DragosDanescu [ Wed Nov 30, 2011 12:15 am ]
Post subject:  Re: European Breakout Grid Trap Strategy

gaheitman wrote:Attached is an indicator that should show us the strategy as it plays out for each day. First off, you need to set some variables correctly for what you are doing. From the indicator:

Code: Select all

extern int    Start_Hour=7; //the hour where we begin the trap
extern int    Step_Size = 15; //pips between orders
extern color  FontClr=Black;  //Font size and color
extern int    FontSize=10; 
extern int    MaxSpread=2;    //MaxSpread so that you can test during high spread times
The indicator will show a midline and the 3 buy and 3 sell lines. Below each line the indicator puts the current number of pending/open trades at that level. These numbers are updated whenever something occurs to change the numbers. For example, if a Long level is passed, that level will be updated as well as the three short levels. Below the imaginary (sorry Empty4 only gives you 8 buffers) Long Take Profit line, the indicator puts the net pips as of the close of that bar. Once a TP is hit, the final net pips minus spread is put above the candle where the TP was hit as well as on the bottom below the imaginary Short TP line.
pic_02 2011-11-29 18.32.gif
It's not smart enough to handle big gaps over the weekend (who is? :>), but most of the month of November is spot on with Dietmar's results. Take a look back, and there are some really, really bad days....

This is my first 4 digit/ 5 digit broker code so be kind if things look all wonkity. :D

George
Wow, George, nice piece!
The EA is now opening orders as per rules, I still got a minor problem with closing routine. The logical rule for opening sequence of pendings was so obvious, I didn't saw it last night, lol!
Maybe you can have a look at this.
Author:  gaheitman [ Wed Nov 30, 2011 1:24 am ]
Post subject:  Re: European Breakout Grid Trap Strategy

DragosDanescu wrote: The EA is now opening orders as per rules, I still got a minor problem with closing routine. The logical rule for opening sequence of pendings was so obvious, I didn't saw it last night, lol!
Maybe you can have a look at this.
I don't see where you are updating "OpenTrades", and you are using it in the main LookForTradingOpportunities() procedure. It was in the original version of "CountOpenTrades()" but that is currently commented out. I'm thinking SendSellGrid() and SendBuyGrid() aren't getting called.

If I was trying to code this, I would need to keep track of the pending/open orders in an array like I did in the indicator. When price passed a level, I would look and see if I was supposed to have a pending order at that level by consulting the appropriate variable. If my variable said I did have something pending at that level, I'd know to automatically place three more pendings on the other side of the base line. When I placed the orders, I'd also know to update the pending count for those three levels.

One of the reasons I'd approach it this way is I could have one account just doing the buys and one account just doing the sells. If you have to look at actual orders I don't think it would work on a non-hedging broker. Hypothetically speaking of course. :D

George
Author:  DragosDanescu [ Wed Nov 30, 2011 1:50 am ]
Post subject:  Re: European Breakout Grid Trap Strategy

gaheitman wrote:
DragosDanescu wrote: The EA is now opening orders as per rules, I still got a minor problem with closing routine. The logical rule for opening sequence of pendings was so obvious, I didn't saw it last night, lol!
Maybe you can have a look at this.
I don't see where you are updating "OpenTrades", and you are using it in the main LookForTradingOpportunities() procedure. It was in the original version of "CountOpenTrades()" but that is currently commented out. I'm thinking SendSellGrid() and SendBuyGrid() aren't getting called.

If I was trying to code this, I would need to keep track of the pending/open orders in an array like I did in the indicator. When price passed a level, I would look and see if I was supposed to have a pending order at that level by consulting the appropriate variable. If my variable said I did have something pending at that level, I'd know to automatically place three more pendings on the other side of the base line. When I placed the orders, I'd also know to update the pending count for those three levels.

One of the reasons I'd approach it this way is I could have one account just doing the buys and one account just doing the sells. If you have to look at actual orders I don't think it would work on a non-hedging broker. Hypothetically speaking of course. :D

George
Sorry, added a non working version. This one is doing the job of opening pendings as it should, only problem I got is the closing routine.Will have a look at the indi's code tommorow, never worked before with arrays, but will try to learn about.
Cheers,Dragos
Author:  gaheitman [ Wed Nov 30, 2011 8:09 am ]
Post subject:  Re: European Breakout Grid Trap Strategy

DragosDanescu wrote:Sorry, added a non working version. This one is doing the job of opening pendings as it should, only problem I got is the closing routine.Will have a look at the indi's code tommorow, never worked before with arrays, but will try to learn about.
Cheers,Dragos
In LookForTradeClosure(), all you really need to test for is whether price goes beyond Level14 or Level24. If so, close all trades. Right now you have some tests at the beginning that don't seem to add anything and could possible prevent it from executing. I would use:

Code: Select all

void LookForTradeClosure()
{
   bool CloseTrade;

   if (Ask > Level14 || Bid < Level24)    {
      bool result = CloseAllTrades();
      //Actions when trade send fails
      if (!result)
      {
         OldBars = 0; //not sure why this is here, but it's unlikely to be called.
      }//if (!result)
   }
}      
George
Author:  forextrader-radioman [ Wed Nov 30, 2011 4:18 pm ]
Post subject:  EURUSD 30th of November

Hello traders and coders *g*

thank you for the efforts to code an EA for this strategy! ... I´m very eager to find some improvements for this strategy ...

here the EURUSD breakout trap from today, 30th of November, 07:00 GMT at one hour before London opening.

Calculation:

Long1 = 45 Pips
Long2 = 30 Pips
Long3 = 15 Pips

Spread = (3 x 2) = -6 Pips

Result: 84 Pips
All times are UTC Page 3 of 11