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

Gertje: a hedged grid trader
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=424
Page 20 of 24
Author:  SteveHopwood [ Fri Apr 13, 2012 7:12 am ]
Post subject:  Re: Gertje: a hedged grid trader

I have added this to the Rsi trend-detection section of post 1:

"Note that the Rsi reading on your chart will only be correct if the EA is actively looking for new trades. If it already has trades open, or is unable to trade because the number of pairs with open trades is >= MaxPairsAllowed, then the bot does not read Rsi. This cuts down on processor use. By default, G considers the Rsi to be indicating a trend, so you will see ""Market is trending (0)" on the chart.
"

I should have explained that, and intended to when I wrote post 1; I forgot.

:D
Author:  crashout [ Fri Apr 13, 2012 7:27 am ]
Post subject:  Re: Gertje: a hedged grid trader

Thanks Steve, it works :)
Author:  acostafulano [ Fri Apr 13, 2012 11:58 am ]
Post subject:  Re: Gertje: a hedged grid trader

SteveHopwood wrote:I have added this to the Rsi trend-detection section of post 1:

"Note that the Rsi reading on your chart will only be correct if the EA is actively looking for new trades. If it already has trades open, or is unable to trade because the number of pairs with open trades is >= MaxPairsAllowed, then the bot does not read Rsi. This cuts down on processor use. By default, G considers the Rsi to be indicating a trend, so you will see ""Market is trending (0)" on the chart.
"

I should have explained that, and intended to when I wrote post 1; I forgot.

:D
It all makes sense now. Thx
Author:  SteveHopwood [ Fri Apr 13, 2012 10:21 pm ]
Post subject:  Re: Gertje: a hedged grid trader

Food for thought here guys in a pm earlier this week, and this from someone who did not even need a bath to come up with it:
SWG123 wrote:Steve, an idea occurred to me recently - this is a rare enough occurrence in itself (and I wasn't even in the bath).

I've been playing around with Gertje - does that sound rude? - and I believe it has great potential. Clearly a trending market is ideal, as with countless other strategies, and you have tried to address this with the TMA and Scoobs RSI inputs. Then I remembered Forexhard's Stairstep Breakout thread at FF - I'm sure you are familiar with it http://www.forexfactory.com/showthread.php?t=302007.

Squalou developed the indicator which tries to identify so-called consolidation zones (CZs)where price has been trapped in a narrow range for long periods (typically 30 x M15 bars with a <30 pip range).

Typically the CZs develop during the Asian session. We can't easily predict which direction the first breakout will take. Breakouts are often typified by high momentum moves but often retrace and take out stops before shooting off in the opposite direction for 60-100+ pips. Trading psychology ensures that many traders will chicken out instead of reversing position and so miss out on the main move.

So it occurred to me - what if we wait for a CZ to form and then bung Gertje's initial buy and sell right in the middle of it?

1. We have price in a <30-pip extended range. We pay the spread x2;
2. At some point a breakout is almost guaranteed, often with momentum;
3. Gertje doesn't care which direction;
4. If it reverses on us and the big move happens the other way, again, Gertje just bags the pips, depending on our MM settings.

The logic seems sound but if you want something more tangible in terms of testing then I'll try to comply. Finally, if this does look worth exploring, credit goes to Forexhard, Squalou and Gertge.

All the best,

Steve G
I am familiar with Forexhard's thread, and started my own thread at FF dedicated to developing tools to help trade the strategy. I could not come to grips with the coding required at the time, and so the thread petered out.

Steve's idea is brilliant, and looks like a fantastic way of using G in conjunction with Fh. sq's ind (attached) is fantastic - sq's indi's always are. Give it a try next week, guys.

:D
Author:  jb68 [ Fri Apr 13, 2012 11:18 pm ]
Post subject:  Re: Gertje: a hedged grid trader

Steve, You don't need SQ,s indicator to detect CZ. That indicator (the new one) is a piece of art but is good for manual trading. In an EA all you need is something like this..


bool CheckCZ(){

int BarsBack=70;
int Crp=10 ; criminal point
int Pips= 30;


PerMx=High[iHighest(NULL,PERIOD_M5,MODE_HIGH,BarsBack,1)];
PerLo= Low[iLowest(NULL,PERIOD_M5,MODE_LOW,BarsBack,1)];


if (PerMx - PerLo<Pips*Crp*Point) { return (1); // we haveCZ
// draw CZ... just for fun and confirmation

//DrawResLine( PerMx,iHighest(NULL,PERIOD_M5,MODE_HIGH,BarsBack,1),3);
//DrawResLine( PerLo,iLowest(NULL,PERIOD_M5,MODE_LOW,BarsBack,1),4);


} else return (0);

}

/*
void DrawResLine(double Price,int StartPoint, int id){

color ResColor;
if (id<3) ResColor=Red;
if (id>2) ResColor=White;
if (ObjectFind("ResLine_"+id) != -1) ObjectDelete("ResLine_"+id);
ObjectCreate("ResLine_"+id, OBJ_TREND, 0, iTime(NULL, 0, StartPoint), Price , iTime(NULL, 0, 0), Price);
ObjectSet("ResLine_"+id, OBJPROP_RAY, false);
ObjectSet("ResLine_"+id, OBJPROP_WIDTH, 1);
ObjectSet("ResLine_"+id, OBJPROP_COLOR, ResColor);
ObjectSetText("ResLine_"+id,"Last Resistence",10);
WindowRedraw(); // Image redrawingWindowRedraw();
}
*/
Author:  TraderTim [ Fri Apr 13, 2012 11:24 pm ]
Post subject:  Re: Gertje: a hedged grid trader

Steve et al:

The TMA function does not appear to be working, it certainly sets the top and bottom initially, but does not seem to update dynamically as price moves. Once a trade is closed it sets the top and bottom correctly as set in the atr TMA function, but then stays static until either the top or bottom gets broken.

Regards,

Tim
Author:  SteveHopwood [ Fri Apr 13, 2012 11:37 pm ]
Post subject:  Re: Gertje: a hedged grid trader

TraderTim wrote:Steve et al:

The TMA function does not appear to be working, it certainly sets the top and bottom initially, but does not seem to update dynamically as price moves. Once a trade is closed it sets the top and bottom correctly as set in the atr TMA function, but then stays static until either the top or bottom gets broken.

Regards,

Tim
And what do you think will happen if the TMA lines move dynamically as the price moves? Take some time to think about it before replying.

It works as coded and as I intended it to work.

:D
Author:  SteveHopwood [ Fri Apr 13, 2012 11:38 pm ]
Post subject:  Re: Gertje: a hedged grid trader

jb68 wrote:Steve, You don't need SQ,s indicator to detect CZ. That indicator (the new one) is a piece of art but is good for manual trading. In an EA all you need is something like this..


bool CheckCZ(){

int BarsBack=70;
int Crp=10 ; criminal point
int Pips= 30;


PerMx=High[iHighest(NULL,PERIOD_M5,MODE_HIGH,BarsBack,1)];
PerLo= Low[iLowest(NULL,PERIOD_M5,MODE_LOW,BarsBack,1)];


if (PerMx - PerLo<Pips*Crp*Point) { return (1); // we haveCZ
// draw CZ... just for fun and confirmation

//DrawResLine( PerMx,iHighest(NULL,PERIOD_M5,MODE_HIGH,BarsBack,1),3);
//DrawResLine( PerLo,iLowest(NULL,PERIOD_M5,MODE_LOW,BarsBack,1),4);


} else return (0);

}

/*
void DrawResLine(double Price,int StartPoint, int id){

color ResColor;
if (id<3) ResColor=Red;
if (id>2) ResColor=White;
if (ObjectFind("ResLine_"+id) != -1) ObjectDelete("ResLine_"+id);
ObjectCreate("ResLine_"+id, OBJ_TREND, 0, iTime(NULL, 0, StartPoint), Price , iTime(NULL, 0, 0), Price);
ObjectSet("ResLine_"+id, OBJPROP_RAY, false);
ObjectSet("ResLine_"+id, OBJPROP_WIDTH, 1);
ObjectSet("ResLine_"+id, OBJPROP_COLOR, ResColor);
ObjectSetText("ResLine_"+id,"Last Resistence",10);
WindowRedraw(); // Image redrawingWindowRedraw();
}
*/
This would simply create a fixed price breakout EA like a million others. Nothing wrong with that, if that is what you want, but sq's indi is a tad more sophisticated than that.

:D
Author:  jb68 [ Fri Apr 13, 2012 11:47 pm ]
Post subject:  Re: Gertje: a hedged grid trader

SteveHopwood wrote:
jb68 wrote: This would simply create a fixed price breakout EA like a million others. Nothing wrong with that, if that is what you want, but sq's indi is a tad more sophisticated than that.

:D

That code is processor friendly.. and it doesn't look back like if you start the EA now and find the last prices where there is a CZ, but it will return 1 at first next CZ with 70 bars in 30 pips limits.
What you do after that is up 2 you..
Author:  acostafulano [ Sat Apr 14, 2012 2:22 am ]
Post subject:  Re: Gertje: a hedged grid trader

SteveHopwood wrote:Food for thought here guys in a pm earlier this week, and this from someone who did not even need a bath to come up with it:
SWG123 wrote:Steve, an idea occurred to me recently - this is a rare enough occurrence in itself (and I wasn't even in the bath).

I've been playing around with Gertje - does that sound rude? - and I believe it has great potential. Clearly a trending market is ideal, as with countless other strategies, and you have tried to address this with the TMA and Scoobs RSI inputs. Then I remembered Forexhard's Stairstep Breakout thread at FF - I'm sure you are familiar with it http://www.forexfactory.com/showthread.php?t=302007.

Squalou developed the indicator which tries to identify so-called consolidation zones (CZs)where price has been trapped in a narrow range for long periods (typically 30 x M15 bars with a <30 pip range).

Typically the CZs develop during the Asian session. We can't easily predict which direction the first breakout will take. Breakouts are often typified by high momentum moves but often retrace and take out stops before shooting off in the opposite direction for 60-100+ pips. Trading psychology ensures that many traders will chicken out instead of reversing position and so miss out on the main move.

So it occurred to me - what if we wait for a CZ to form and then bung Gertje's initial buy and sell right in the middle of it?

1. We have price in a <30-pip extended range. We pay the spread x2;
2. At some point a breakout is almost guaranteed, often with momentum;
3. Gertje doesn't care which direction;
4. If it reverses on us and the big move happens the other way, again, Gertje just bags the pips, depending on our MM settings.

The logic seems sound but if you want something more tangible in terms of testing then I'll try to comply. Finally, if this does look worth exploring, credit goes to Forexhard, Squalou and Gertge.

All the best,

Steve G
I am familiar with Forexhard's thread, and started my own thread at FF dedicated to developing tools to help trade the strategy. I could not come to grips with the coding required at the time, and so the thread petered out.

Steve's idea is brilliant, and looks like a fantastic way of using G in conjunction with Fh. sq's ind (attached) is fantastic - sq's indi's always are. Give it a try next week, guys.

:D
This indi ROCKS. Gertje is successful as it is. Replacing the TMA entry with a higher probability entry such as this sounds very good
All times are UTC Page 20 of 24