$* Statistical London Breakout Strategy *$

Today’s london has a loss on the buy and 30 pip TP hit on sell.

NY open for forex is a different time than the NY open for the stock markets.
forex session for NY opens at 8am EST. the stock market rings the opening bell at 9:30am EST.
We want the first 15 minutes of NY forex open-8-8:15am EST. I selected this candle based on backtesting, while it is probably more than just coincidence it happens to be part of the NY open, it was selected because price moves away from this point the most often without a loss…in other words, in a straight line of trend. So far, it has been the best, outperforming the london time idea.

Are you using s/l as with London? Entry levels? Or fixed s/l as in NY?

Hey Guys,

I have a first draft of the EA ready, good old MT4 for now :slight_smile:

The name has changed in my version as it is not only for London anymore.
PC_Breakout = pipcompounder_Breakout :45:

As I said, this is a draft, please use it with caution and under no circumstances trade it live yet.

My goal was it to keep the EA as flexible as possible and allow you to test everything according to your liking. Some features are not included yet, and there is plenty of room to grow!

I will go over the settings here because some are a bit out of the ordinary :8:


[B]--- Time(zone) Settings[/B]

[U]Reference_Candle_Time[/U]
This setting sets the time in [B]GMT[/B] for triggering the entry logic (Reference Time).
It hast to be put in the format "[B]HH:MM[/B]", so for example 09:00.

[U]Reference_Candle_Back[/U]
This setting defines the bars that the EA will look back to use as the Reference Candle.
So if you use 0 it will use the current bar, if you use 1 it will use the last bar
(which makes sense so it can place the trades at exactly 09:00 GMT for example
and still use the right reference candle - this eliminates the 1 minute delay)

[U]Close_Pending_Time[/U]
This settings sets the time in [B]GMT[/B] for triggering the delete for the still pending orders.
It hast to be put in the format "[B]HH:MM[/B]", so for example 23:00.

[U]Use_Automatic_GMT[/U]
If set to true, you do not have to do anything regarding timezone calculation.
It will calculate the correct distance for your broker time and GMT time on its own.
[I]Please note: This setting does not work for backtesting!!![/I]

[U]Manual_GMT_Offset[/U]
This is mostly for backtesting, because the setting above can calculate the
difference automatically for live trading. Put in the difference between
GMT and [B]your broker[/B] (Marketwatch in MT4).

-------------------------------------------------------------------------------------------------------------------------
Now let us get to the fun stuff ;-)
-------------------------------------------------------------------------------------------------------------------------

[B]--- Trade settings[/B]

[U]Trade_Info[/U]
This settings contains all the information for the EA how to place its trades.
Although it is a single setting, you can place as many trades with this as you wish.
The trades have to be put in the following pattern:

SL;DEV_BUY;DEV_SELL|TP;TP_VAL|BE;BE_TRIG;BE_DEV|TS;TS_TRIG;TS_STEP|MM;MM_VAL

[ul]
[li]SL - Always put 0 for now
[/li][li]DEV_BUY - Distance from Ref. Candle high to long position
[/li][li]DEV_SELL - Distance from Ref. Candle low to short position
[/li][li]-
[/li][li]TP - Always put 1 for now (more functionality to come)
[/li][li]TP_VAL - Take Profit value in Pips
[/li][li]-
[/li][li]BE - Breakeven: Put in 1 to use, 0 to ignore
[/li][li]BE_TRIG - Amount of pips after which BE is triggered
[/li][li]BE_DEV - Deviation of BE from open price
[/li][li]-
[/li][li]TS - Trailing Stop: Put in 1 to use, 0 to ignore
[/li][li]TS_TRIG - Amount of pips to trigger TS functionality
[/li][li]TS_STEP - Amount of pips for interval of resetting the stop
[/li][li]-
[/li][li]MM - Always put 0 for now, more functionality to come
[/li][li]MM_VAL - Lots to risk
[/li][/ul]

In order to add another trade, simply repeat this pattern and put a "[B]/[/B]" in between them.
Let me give you an example for the London breakout as it is right now:
0;30;10|1;300|0;0;0|0;0;0|0;0.01

We have 3 pips plus to the top, 1 pip minus to the bottom, have a take profit of 30 pips,
no BE and no TS. Also a lotsize of 0.01 is put in.

If you have questions about this feel free to ask, I understand that this system might look
complicated at the beginning but once you know how to apply it you can test pretty much
everything you want with this.

-------------------------------------------------------------------------------------------------------------------------

[B]--- Trade execution settings[/B]

These are pretty straight forward, [I]IsECN[/i] and [I]Max_Slippage[/i] should be self-explanatory.

[U]Max_Retries[/U]
This setting defines the number the EA retries to execute a trade or modification to a trade before it stops trying. This is mostly for orders being rejected due to other factors influencing the order process.

[B]--- EA Settings[/B]

Self-explanatory as well



Well, that’s it for now, more is definitely to come! I’ll include two sets of settings, one for the London and one for the NY breakout. And one for the USDJPY, why not :wink:

All the best,
Jonathan

PC_Breakout_Alpha_1.zip (6.16 KB)

Pipcompounder, what is your stop placing “15 min bar” for the NY strategy? I got stopped out very early on both long and short and as 15:30, I am long again at 1.33289 .
Also, i have the 12:00 hour bar (eastern usa time) set in the ea for the london open and it seems to have placed a long and short again after being stopped out. Looks like this took place around 15:42. Any idea what setting may have allowed? Its demo so I am going to let it ride for now.

I got stopped out both ways on NY, also…I replaced the orders, and the buy is open, now.

-jsiebern, Thanks for the EA…we’ll try it out…will it close pending orders if TP for a particular session is hit? And will it close all orders before the market closes for the weekend?

@pipcompounder
Well, it does now :wink:

And please, call me Jonathan!

PS:
Regarding the Markethours, here is a great tool:
ForexMarketHours v5.1

PC_Breakout_Alpha_1.zip (6.36 KB)

Appreciate it, Jonathan…

Our NY suddenly came alive and smashed down thru the stops to open and hit sell TP, so something like -12, -12, -12, +40…net +4 pips. This is the product of good risk\reward…it absorbed 3 losses in a row to end up a little better than BE.

Vielen Dank Jonathan! (wife is German. :))

Haha, schöne Grüße an deine Frau :slight_smile:

You are very welcome riley!

Jonathan
Thanks you for your hard work. I wanted to compare my settings with the everyone following so please give feedback. Attached are my settings for the NY Open. I have set it to 15:00 which is 8am eastern time. I have 1 for the reference candle back. If I read your instructions correctly, this way, the orders will be placed on the 15:15 bar based on the high and low of the 15:00 bar. Did I do that correctly?


Hi Riley

I think 8am EST is 13:00 GMT not 15:00. The way I understand Jonathan’s EA is that the execution time is 13:15 and the reference candle is 1 back on the 15 min charts for the NY open.

I’m sure Jonathan can better clarufy this for us though.

Yes, the correct setting for the 15m Chart would be 13:16 for the reference candle. This way the 2nd candle is forming which allows the setting to go back 1 and have the correct one. Another thing I did not test yet would be to set it to 13:15 and use 0 as Reference_Candle_Back.

Edit:
It might be best if I included seconds into the calculation so we could use 13:15:01 for example, which would be the next best thing to 13:16…

Nope, thats incorrect. Eastern Time (NY Time), London opens at 10:00 (3am) and NY opens at 15:00 (8am)


Great hit of TP this morning :slight_smile:

An idea:
How about taking partial profit at Pivot lines? And maybe a function that when an entry order is placed very near a PP (say like 10 pips or so) it will actually be placed above/below that line. PP usually are strong resistance/support lines in my experience.

Also I’ve been thinking about not using a fixed TP but rather a trailing stop depening on the last candles. If, especially for London on H1, this has to be moved down a TF or 2, maybe.

What do you think?

@riley
13:00 GMT is the correct time for sure!
08:00am + 5 difference of GMT = 13 :slight_smile:

@Jonathan
I think the confusion is my broker. The London open was 10:00 on my chart and the NY open is at 15:00 on my chart. The current bar as of this writing at 6:30am est is 13:30. NY is not yet open.

I agree with Riley on these times. You need to allow for the MT4 time offset. On my system 13.00 GMT = 15.00 on MT4 candle.

Jonathan - Thanks for the EA but I can not get this to actually place any orders on my test account. Also, when back testing it comes up with 0 profit and 0 loss! I have also tried loading you presets but there is no action. Please advise. Thank you.

DrB.

Hello pipcompounder,

Happy New Year to you and all traders out there.

I have modified my last version of the EA to add the below two functions:

  1. Automatic closing of all open orders and pending orders on friday. You can set time with the help of variables "CloseTradeHour & “CloseTradeMinutes”
  2. You had requested for all pending orders to be closed if TP3 is hit. This version of the EA will close all pending orders when the price is 1 pip below TP3. It should be considered extreme bad luck if after coming so close TP3 is not hit.

I havent been following closely your thread for the last few weeks. I will go through it. I also see that Jonathan has been helping with an EA for your new ideas. I will let Jonathan take charge now as he seems a more professional coder than me.

I am going to run this new EA on demo from tomorrow after reading through your latest settings.

Safe trading to all!!

Crisscross

London Breakout v1-4.zip (5.2 KB)

@riley
It’s the same for my broker. You don’t have to worry about it though, just put in the times as GMT, not your broker time. The EA will compensate for it automatically.

@drbios
Could you please post your settings here, especially the “Trade_Info” is interesting if the EA does not trade. In backtesting please keep in mind that the automatic GMT offset won’t work so you have to set it to false and put in the setting manually (difference GMT to your Broker time)

@crisscross
The EA I posted is completely based on yours, I just added some functionality here and there so it can be used more flexible for other pairs/timeframes :slight_smile:

Thanks everybody for your great contributions. Your effort is not in vain.

London gave us good profit this morning.
NY on it’s way.

Jonathan- I haven’t gotten a chance to put the EA into practice, will download it tonight. If I want the EA to use both london and NY ideas, do I use a 15 minute chart? Or will the NY part work on an hourly chart?

thanks again, everybody…there isn’t a way to thank you enough-I just hope you can use this to make lots of money.

I guess it’s not completely unselfish for all of us contributing to this thread :wink:

Indeed, 2 charts have to be opened, one H1 chart and one M15 chart.
Today I found the best settings for NY time to be:
Reference_Candle_Time = 13:15
Reference_Candle_Back = 1