Gertje: a hedged grid trader

Post Reply
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: a hedged grid trader

Post by SteveHopwood »

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
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.
User avatar
crashout
Trader
Posts: 75
Joined: Fri Dec 23, 2011 4:17 pm
Location: In the trading room !

Re: Gertje: a hedged grid trader

Post by crashout »

Thanks Steve, it works :)
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Gertje: a hedged grid trader

Post by acostafulano »

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
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: a hedged grid trader

Post by SteveHopwood »

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
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.
jb68
Trader
Posts: 71
Joined: Mon Jan 30, 2012 11:30 pm

Re: Gertje: a hedged grid trader

Post by jb68 »

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();
}
*/
TraderTim
Trader
Posts: 21
Joined: Fri Dec 30, 2011 7:49 pm

Re: Gertje: a hedged grid trader

Post by TraderTim »

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
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: a hedged grid trader

Post by SteveHopwood »

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
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.
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: a hedged grid trader

Post by SteveHopwood »

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
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.
jb68
Trader
Posts: 71
Joined: Mon Jan 30, 2012 11:30 pm

Re: Gertje: a hedged grid trader

Post by jb68 »

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..
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Gertje: a hedged grid trader

Post by acostafulano »

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
Post Reply

Return to “Automated trading systems”