Gertje: a hedged grid trader

Post Reply
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Gertje: a hedged grid trader

Post by spotdespot »

Steve - found a slight hiccup (undocumented feature ;) ) today I think. I had to restart my Empty4 terminal I was testing on and one pair immediately opened another grid even though there were open trades from the previous grid (the previous grid lines were deleted). So somewhere it failed to identify the open trades.

I really can't find anything unique about the set file for that pair - it was the only one that had StopTradingAfterBasketClosure set to true AND had open trades but I can't see how that would affect anything as it is only referenced 3 times in the code and is in relation to exit points only.

Probably nothing you can do with this useless info but I will keep an eye out and try to pin it down to something more specific if it happens again. For now just a heads up for all, as it creates a bit of a manual sorting mess when it happens :o
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 »

spotdespot wrote:Steve - found a slight hiccup (undocumented feature ;) ) today I think. I had to restart my Empty4 terminal I was testing on and one pair immediately opened another grid even though there were open trades from the previous grid (the previous grid lines were deleted). So somewhere it failed to identify the open trades.
It is impossible for G to send the initial trades when there are trades open already - you have seen the code; there is no way around it.

What if there is a delay in retrieving open trades on platform startup? We know that an EA will send multiple trades when there is a delay in a newly-opened trade being returned to our Empty4 history - hence our use of the industrial-strength code supplied by Matt to overcome this problem.

If there is a a delay in retrieving open trades on platform startup, then an EA cannot know that there are open trades on the account, and so will trade. Ok, so any half-way intelligent programmer would have programmed TradingDisabled until the current position is returned by the crim's server, the the programmers of Empty4 are idiots.

Anybody here know any more about all this?

I never close down my real money platform without disabling Experts first. The platform has not crashed on me for a long time, but were it to do so I would prevent it from loading EA's at restart by renaming them temporarily so the platform could not find the EA it is looking for. A faff, but I trust Empty4 as much as I would trust a croc with lunch on its mind.

Latest update in post 1 in light of this. I am trading G on my real money account, on EU for the small spread and at minimum lot size. For those of us similarly testing G, I have added this code snippet to int init():

Code: Select all

   if (!IsDemo() )
   {
      int delay = 10;
      while (delay > 0)
      {
         Sleep(1000);
         delay--;
         Comment("                                       " + "Starting in " + delay + " seconds");
      }//while (delay > 0)
   }//if (!IsDemo() )
Add this anywhere to int init(). As you can see, it has no effect on demo accounts, but will stop a real money account from starting up the robot for 10 seconds to give the open position time to show up.

: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.
nubika
Trader
Posts: 80
Joined: Tue Dec 06, 2011 9:52 pm
Location: Sydney, Hills District

Re: Gertje: a hedged grid trader

Post by nubika »

bigpipn wrote:
miruvacapital wrote:I think escaping a ranging market has to be quick - else you will get swamped with swap differentials

Maybe i should take a small TP, and open faster lots,

That basically takes advantage of volatility to earn rebates and small penny profits along the way

Markets are ranging quite a bit this month
Markets are getting very edgy, something big is about to happen in next 7-10 trading sessions. The equity markets have melted up since late last year into a nice ascending wedge (SP VIX at 15), tax season selling is upon us. First warning sign is usually given by ferocious moves in yens pairs and we're starting to see that.

*Edit* This system is so stupidly absurdly simple that it is BLOOOOOOODYYYYY genius!! I feel stupid for not thinking of it sooner.

Guys, the point of this is that we are ALWAYs in the market. Set the inital buy/sell to the smallest trade possible .01. Set the grid to be 10x the initial lot, have a small tp so only 3-4 ticks into your first grid you tp. The point of this is you are ALWAYS in the market and your risk is very very small (-swap differential).

Example.

Long and short .01 EURUSD -- .9 spreads so say you are floating at worse .25, set the grid to 5x your .01 long short and set your tp to 1.50-2.00. 2-3 pips into that first grid you tp, Rinse repeat.

We must also be careful with FIFO.

This system is why hedging should be illegal (is in the USA). The regulators aren't trying to save us from ourselves, they are trying to help the criminals.

Bigpipn.

You got it. That is what I am working on as well.
The aim is to close the trade after second order is opened with 2-3 pips profit. I have done more tests and this can cut down DD big time. Profit level is better also, since we are trading more frequently.

Each pair has different settings so we still have to work the actual figures out.

Frank
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Gertje: a hedged grid trader

Post by spotdespot »

SteveHopwood wrote: It is impossible for G to send the initial trades when there are trades open already - you have seen the code; there is no way around it.
That's what it looked like to me - forgot to factor in the Empty4 factor..... :lol:

Build 419 being rolled out btw - which seems to have made some EA developers a little happier.

Thanks,
Dave.
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 »

nubika wrote:You got it. That is what I am working on as well.
The aim is to close the trade after second order is opened with 2-3 pips profit. I have done more tests and this can cut down DD big time. Profit level is better also, since we are trading more frequently.

Each pair has different settings so we still have to work the actual figures out.

Frank
Would you like a BasketPipsTakeProfit input?

: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.
miruvacapital
Trader
Posts: 11
Joined: Tue Feb 21, 2012 2:58 pm

Re: Gertje: a hedged grid trader

Post by miruvacapital »

Frank

Are you using TP to be around 2-3 pips of your initial lot size? without the RSI and TMA right?

If so - are you using the lot multiplier that steve just added not too long ago?

I am still unsure about this EA compared to even a simple martingale - single direction scalper grid using trend exhaustion to time market entry.

-

I still think there needs to be a market entry criteria to pick out extreme points in the market,

Else if you get stuck in the middle you would be at a loss - through swap, spread and commissions

Meaning that i don't see any market inefficiency that a grid can possibly extract any alpha or trading edge out of - if it is just constructed wildly.

Do you see my point? What purpose actually does the first 2 trades do for us ?

If we just mark the initial price as A. if market moves lets say 10 pips above, we place a buy order and TP at 2 pips - essentially that would have the same net effect as placing the initial 2 trades and opening the third TP at 3 pips. Likewise if the market reversed back down to point A - the trade on +10 pips would be net -10 pips, more or less the same if we had opened the first 2 trades.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Gertje: a hedged grid trader

Post by spotdespot »

I do see your point - so if price returned to point A we open a sell, then whichever way the market moves we win with a max 2 trades, as 13 (or whatever) pips above or below point A = win.

Downside is potential slippage I guess.
miruvacapital
Trader
Posts: 11
Joined: Tue Feb 21, 2012 2:58 pm

Re: Gertje: a hedged grid trader

Post by miruvacapital »

Am just highlighting that overtrading is an issue

Slippage is another annoying thing with tight TP levels

My broker seems to be getting away with nice pips...
Guest

Re: Gertje: a hedged grid trader

Post by Guest »

SteveHopwood wrote:
nubika wrote:You got it. That is what I am working on as well.
The aim is to close the trade after second order is opened with 2-3 pips profit. I have done more tests and this can cut down DD big time. Profit level is better also, since we are trading more frequently.

Each pair has different settings so we still have to work the actual figures out.

Frank
Would you like a BasketPipsTakeProfit input?

:D
This would be fannntastic. :)

BTW, I set up the grid today before the FOMC minutes and it made 20% in 30 minutes on my GKFX spreadbetting account. I got a nasty email from compliance for "snipping" lol and that they would revoke my trades if this continues.

Use some common sense with this too. Move the lines manually to avoid getting a sharp reversal right at your grid entry.
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

Re: Gertje: a hedged grid trader

Post by kwchau »

I hope someone could help me out on this.
When I drag the latest EA to different charts, some of them generate a buy and sell trade very close together (eg AUDUSD 1.2675/1.2665 only 1 pip apart) and establish the buy and sell grid, I think this is normal.
Some of the charts entered into multiple buy trades which I sort of remember this is a criminal issue. There is no grid set up.
Some of the charts only have two yellow lines which is far apart (eg GBPJPY 132.416/131.274).
Please help me out to understand the EA.
Post Reply

Return to “Automated trading systems”