Gertje plus Squalou plus Forexhard EA

Post Reply
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Gertje plus Squalou plus Forexhard EA

Post by SteveHopwood »

SERIOUS WARNING
  • Most Forex traders lose all their money.
    Using the robot posted here in trading Forex does not guarantee success.
    Trading this robot could lead to serious financial loss.
    Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
    This is not a set-and-forget ea. There is no such thing and anyone who tells you there is, is either a liar or an idiot. This EA will need manual intervention when NoOfTrades buys and sells are open, and the only recourse from there is to manage the basket manually.
    At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
    To trade this robot, you have to understand:
DO NOT TRADE THIS EA ON A LIVE ACCOUNT. IT IS EXPERIMENTAL.

Ehup all

Gertje contacted me with an idea that looks like fun:
  • - open a pair of buy and sell trades
    - send a grid of pending buy and sell trades x pips apart.
    - market movement will fill the pending trades in one overwhelming direction.
    - take profit when a sufficient number of buy or sell trades have taken the basket into x cash profit.
    - rinse and repeat.
The EA at http://www.stevehopwoodforex.com/phpBB3 ... 8998#p8998 does this. In keeping with Stealth, the pending trades are represented by dashed lines - by default, green for buy and red for sell. The EA in this thread is adapted for use with sq's indi.

The difference
SWG123 sent me a pm. Read the details at http://www.stevehopwoodforex.com/phpBB3 ... 759#p10759

So, G++ attempts to automate what SWG suggested, with a few changes:
  • - G++ works with the attached sqDynamicBreakoutBox1 indicator.
    • - this goes in your Indicators folder.
      - it does not go on your chart.
      - jb68 modified sq's indi to deal with a 'divide by zero' error. I have further modified it so it does not show the Fib extensions when called by the EA.
    - when G++ sees that the indi detects a CZ, it draws pending buy and sell stop lines at the top/bottom of the zone. From here:
    • - If the market reaches the buy line from below, G++ takes a buy and draws the remaining buy grid, so the trades will trigger if the market continues to breakout.
      - It moves the pending sell stop line to half the extent of the CZ box. If the market falls back that far, then the sell is sent and the sell grid drawn.
      - everything reversed if the first line hit is the sell stop line.
Chart and time frame
We have been jopined by forexhard, which is fantastic. In his post at http://www.stevehopwoodforex.com/phpBB3 ... 845#p10845, he writes this:
"Make your settings:

Cable (only): M15 (only); bars: 30 (or more); height: 30p (or less).

This year alone I've already had close to 30 successful trades on Cable with these settings.

Don't test any other pair or TF for now. You don't need more of either. One pair and one TF is all you really need. If you can find more/others that work just as well as time goes on, that's great. But they are not needed
."

US citizens
It is possible for you to trade this EA. For details, read:
Sam's post at http://www.stevehopwoodforex.com/phpBB3 ... 038#p10038
TehCount's post at http://www.stevehopwoodforex.com/phpBB3 ... 064#p10064
makeda's post at http://www.stevehopwoodforex.com/phpBB3 ... 133#p10133
swg's post at http://www.stevehopwoodforex.com/phpBB3 ... 519#p10519

Inputs
There are few inputs. The few that need explanation are:
  • -PipsBetweenTrades: the distance in pips between trades.
    - NoOfTrades: the maximum number of possible buy and sell trades. If the market seesaws outrageously, then twice this number is the maximum of trades that can be opened by the EA.
The inputs that control the indi settings are the same as those in the indi.

Escaping a ranging market
Taking the next buy as an example, close the basket if:

- the next buy trading line is touched
- there are RangeBoundClosureTotal / 2 sell trades open

By default, RangeBoundClosureTotal = NoOfTrades * 2, or the maximum number of grid lines. It has to be divisible by 2, so there is an idiot check that rounds up one digit should you forget.

Once there are > LookForBreakevenAfter trades open and the difference between total open buys and total open sells is 1, the bot will look to close out at breakeven.

Closing a successful basket
There are a three strategies available:
  • 1) CashProfitTarget: the profit target in dollars that the basket is aiming for.
    - CashProfitPerLot: multiplies your Lot size by this number to arrive at an adaptive CashProfitTarget. Set this to zero to disable the feature.
    2) Cash jumping stop loss. By default, G uses
    • CashProfitTarget=1000;
      CashJumpingStopLoss=50;
      JslStartsAt=100;
      • This will jump the basket stoploss by $50 once the profit reaches $100.
      Set JslStartsAt to zero to disable this feature.
    3) PipsProfitTarget: this closes the basket when the profit in pips reaches this target. Enter this in pips. The EA converts this for x digit criminals. Set to zero to disable this feature.
Money management
This allows G to calculate your lot size and to protect you from over-trading.
  • - Lot: the lot size if you do not want auto-calculation.
    - LotsPerThousandOfBalance: lot size is calculated by rounding down the balance to bare $thousands, then multiplying this figure by LotsPerThousandOfBalance to produce a lot size that will grow with the account. Set this input to zero to disable the feature.
    - IncrementalLotMultiplier: multiplies the lot size of the most recent trade by this number. The default of 1 disables lot incrementing. This feature might need adaptation, as a badly ranging market might lead to alternate buy/sell trades opening, each of which has successively higher lot sizes. This will unbalance the basket, so we shall have to see if this is a problem.
    - MaxPairsAllowed tells G to allow no further trading if there are already this number of pairs trading on the account. The pairs do not have to belong to G; they merely have to be open trades. Set this input to zero to allow unlimited trading.

Bear in mind that when the market screams off in one direction in rocket-style, the 'pending' trades are unlikely to fill. A combination of Empty4 and criminal activities will prevent trades being sent.

Honours list
Not a lot of all this is down to me. A warm round of applause goes to these individuals:
  • - Gertje, for bringing me the hedged grid strategy in the first place.
    - SWG for having the idea to merge forexhard's strategy with G.
    - squalou for his incomparable indicator.
    - forexhard, for sharing his strategy at FF.
    - jb66, whose enormous contribution was to send me the code that interrogates sq's indi.
G++ would never have happened without these guys.

In conclusion
On the face of it, this is a guaranteed winner. Where is the catch? Let's see.

:D


Matters of general interest

Read this post:
http://www.forexfactory.com/showthread. ... ost4923611 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration. There is a thread devoted to Sam's trading method at http://www.forexfactory.com/showthre...25#post5118825

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.

Useful utilities/EA's/scripts
Matt's chart-population script at http://www.stevehopwoodforex.com/phpBB3 ... 5733#p5733. Use this every time you start a fresh platform.
MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
Account equity analyser: http://www.forexfactory.com/showthread. ... ost4693716 Also at http://www.forexfactory.com/showthread. ... ost4709098, which includes a template for both USD and the Euro.
Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthread. ... ost3830610
My shell EA – the code I use to produce EA's so quickly. http://www.stevehopwoodforex.com/phpBB3 ... p?f=5&t=15
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. [email protected] 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.
SWG123
Trader
Posts: 565
Joined: Wed Nov 16, 2011 3:02 pm
Location: Cape Town

Re: Gertje plus Squalou plus Forexhard EA

Post by SWG123 »

Thanks, Steve, can't wait for markets to open so we can put this puppy to work! :D
User avatar
SteveHopwood
Owner
Posts: 9754
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 »

A thingy to add emerged tonight. We need a no-Sunday-candle-trading filter, or the gap can cause premature trading.

: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. [email protected] 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.
pmacel
Trader
Posts: 10
Joined: Mon Dec 12, 2011 3:16 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by pmacel »

When the EA moves up or down the grid it will open 10 trades against 1 trade in backtesting. Then it will stop opening more trades creating big drawdown.
forexhard
Posts: 4
Joined: Sat Mar 31, 2012 7:43 am

Re: Gertje plus Squalou plus Forexhard EA

Post by forexhard »

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.
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9754
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 »

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
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. [email protected] 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.
forexhard
Posts: 4
Joined: Sat Mar 31, 2012 7:43 am

Re: Gertje plus Squalou plus Forexhard EA

Post by forexhard »

It really does matter. The original Sq indicator has this ability to automatically filter by height as well as by width. I hope this one can be made to do it too.

If it stays the way it is then I would strongly suggest a new set of minimums, such as 25p tall and 35 bars wide. The optimal CZ is wider than it is taller -- and the shorter and the wider it is, the better I like it.

Over-trading even without a grid format is always a concern. So the easiest way to nip over-trading in the bud, is to have less CZ's to work with in the first place. But don't just limit the trades or the CZ's randomly according to quantity, limit them according to quality. My suggestions make this happen.
jb68
Trader
Posts: 71
Joined: Mon Jan 30, 2012 11:30 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by jb68 »

SteveHopwood wrote:A thingy to add emerged tonight. We need a no-Sunday-candle-trading filter, or the gap can cause premature trading.

:D
Yeap.. Sunday gap bring 2 issues, first EA can trade premature, this might be fixed by an hour filter however this CZ strategy was a 24/7

Second the gap may not allow a new box to form, in this case we may lose a trade, especially when news emerge over weekend.
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by acostafulano »

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
You do not have the required permissions to view the files attached to this post.
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Gertje plus Squalou plus Forexhard EA

Post by acostafulano »

Darn! First bug seems to have appeared on my platform:
eurnzd.png
1. First sell trade and correspondent sell grid open on touch of the bottom of the box drawn correctly (4:55)

2. Price retracted to the middle of the box where the pending buy trade was, and grid should've opened... but instead when it touched it it opened 10 sell trades at that point...

.. anyone else experiencing this bug?
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Automated trading systems”