Regular visitors will have noticed ever increasing amounts of spam on the Trading Gurus Community Forum. On November 24th 2012 we implemented some changes:

1. New users will be moderated 2. Registered users who have a post count of zero will not be able to view attachments or download code. 3. Registered users who have a post count of zero will not be able to create a new thread

As an additional countermeasure we anticipate introducing a modest paywall in the near future.

If this is your first visit here our apologies for the inconvenience.

Existing users may wish to contribute their ideas to this thread.

Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: MQL5 London Breakout Systems

  1. #1
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494

    MQL5 London Breakout Systems

    Following the recent improvements to our MetaTrader 4 London Breakout expert advisor, we've taken the next step and ported the system to MetaTrader 5, using the new object-oriented features available in the MQL5 language. Here's the source code of our latest "robot":

    GurooEx06.zip

    and here's the result of the first backtest using our new creation:

    GurooEX06-EU-2010-Q2.jpg

    That's for EUR/USD using the default input settings over the period from March 28th 2010 (when British Summer Time began) to date.
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  2. #2
    Junior Member
    Join Date
    Nov 2010
    Posts
    3
    Jim, it is interesting: what Eur/Usd to do with London Breakout? We trade GBP here, remember? :-P

  3. #3
    Junior Member
    Join Date
    Nov 2010
    Posts
    3

    some testing

    Have done some testing, however i don't think that parameters are optimisable and stable can be on forward testing.
    gurooEx06_Eurusd_M1_Y1.jpg

  4. #4
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Hi Light,

    Welcome to the Trading Gurus community forum. If you'd like to introduce yourself more formally please feel free to start a thread over in our Introductions section.

    You seem to have already at least partially answered your own question in your next post! However here's my 2 pence worth anyway.

    There are lots of "expert advisors" on sale at the moment supposedly based around the idea that a good time to be trading cable is when hordes of dealers in the City of London sit down in front of their banks of screens, typically at around 8 AM London time. A commonly used generic term for such things is "London Breakout Systems".

    If there is any validity in that theory then maybe there is also a "Frankfurt breakout" of the euro, a "New York breakout" of the dollar, or a "Tokyo breakout" of the yen? This example expert advisor provides a basic tool for exploring those sort of ideas, and many others too!

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  5. #5
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Hi Light,

    Quote Originally Posted by Light View Post
    Have done some testing, however i don't think that parameters are optimisable and stable can be on forward testing.
    Thanks very much for posting your own backtest results. It looks like you've been trying out some of the exciting new features of the MetaTrader 5 strategy tester, including the walk forward optimization feature. It also seems likely you've encountered one of the big drawbacks of MT5. MetaQuotes don't make it easy to export their optimization results for further analysis and/or inspection!

    It also sounds as though one of your criteria for a "stable system" is that it should be possible to come up with a single set of input parameters for a system that work well across all currency pairs. However if we're exploring the premise that there is a "best" time of day for trading a country's currency, isn't it likely that at least the optimal "Start Trading Session" setting would differ from country to country, and pair to pair? EUR/CHF looks to be the best of the bunch in your particular test. Maybe there's a "Basel breakout" that merits further investigation?

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  6. #6
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494

    Lightbulb MQL5 London Breakout Robot Optimization Improvements

    Here is the source code for the latest object-oriented MetaTrader 5 version of our "London Breakout Robot":

    GurooEx06v101.zip

    This now contains all the improvements that have recently been made to the MT4 version of the same system. In particular money management has been added, along with a change to the input settings to allow for easier optimization. That should also make the code and all the input settings directly comparable to the latest MetaTrader 4 version of this expert advisor.

    Please let us know about any problems you come across using the new version, particularly if you discover any significant differences when compared to the latest MetaTrader 4 version.
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  7. #7
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Here's a new version that fixes a bug reported in the MetaTrader 4 version:

    GurooEx06v102.zip
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  8. #8
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494

    Anyone for a New York Breakout?

    It's been suggested to me that taking a breakout of the hour bar preceding the opening of the New York Stock Exchange might be a profitable way of trading the USD/JPY pair. Trading a "New York Breakout" instead of a "London Breakout" makes some sense for a pair with no European involvement. All that's required is changing an input setting or two. I tried that, and ran some tests to see if there might be any merit in the idea. I fired up the MT5 strategy tester and changed the "Start of Trading Session" to 15:00 hours MetaTrader 5 time and the "Range Duration" to 1 hour. Then I let GurooEx06 loose on one minute bars of the Yen for the whole of 2010. With the default settings for target and stop (30/30) the end result was in positive territory at least, but not awfully impressive with a profit factor of 1.11:

    GurooEx06-UJ-1..png

    Next I tried some optimization to see if that might help at all, and here's the top few results:

    GurooEx06-NYB-UJ-Opt-1.png

    As you can see the very best settings (as far as the profit factor is concerned at least) produced a PF of 1.22, but with rather strange numbers (to my eyes at least) of 115 for the target and 130 for the stop loss. All in all it looks like this one needs some more work. Maybe some entry filters would help? Maybe a different exit strategy would too? More coding and testing would certainly be required before this (admittedly still very simple) system should be considered for anyone's live portfolio. That will all have to wait for another day.

    Here's those test results, bundled up with our rechristened "Opening Breakout Robot" itself:
    Attached Files Attached Files
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  9. #9
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Pursuing the idea of a "New York Breakout" of the yen, I've been doing a bit more testing today to see if it's possible to improve on those results. I performed a 4 dimensional optimization run, varying the "Start of Trading Session" and the "Range Duration" in addition to target and stop. Here's what MT5 calls the "2D Graph" of the optimization results:

    Opt-GurooEx06-UJ--B.jpg

    As you can see, it looks as though increasing the range duration to 2 hours, or possibly changing the session start time to 16:00 (European time!) would improve things. Here's the first few lines of the table of results:

    UJ_System_3.png

    The best profit factor is definitely an improvement, and is now up to 1.30, using 15/2 for the entries, and 70/30 for the exits. Running a single test on those numbers produces a rather better looking equity curve also:

    GurooEx06-UJ-B-70-30.png

    Over on the MT5 range breakout thread Mintaka has been doing some work which suggests that using M1 OHLC tick quality might speed up optimizations without affecting the results too much, so I tried that as well:

    GurooEx06-UJ-B-Fast-70-30.png

    Unfortunately that doesn't seem to work quite so well in this case! Note also that in the table of results there is something of a gap before the second best set of parameters, which only managed a PF of 1.19. It looks like there's still a lot more to be done to turn this into a tradeable system.
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  10. #10
    Junior Member
    Join Date
    Jun 2012
    Location
    Ipswich, Suffolk, UK.
    Posts
    7
    Hi Jim,

    I seem to be having problems getting this to only open trades in a 4 hour period starting at a given time.

    It seems from the parameters that is should be able to do this without any code changes?

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •