Hey Guys,
I'm sure this has been asked or talked about before but my searching has made zero progress!
I have a strategy I like using on H4 candles on a 0 GMT broker and have been working on an EA to trade it. The issue arises when I use my live broker... a 1-2 hour shift in the H4 makes a huge difference in my trade results.
Has anyone been able to code an EA to compensate for the shift? My thoughts are using H1 candles and consolidating the appropriate 4 candles together to make a "fake" candle within an array or something of the sort. Can anyone lead me in the right direction??
My other thought is to do this type of thing and convert it to an offline chart but I don't know how well this will work using a multi-pair strategy.
Thanks!
Luke
Darn GMT differences
- RedLineFred
- Trader
- Posts: 52
- Joined: Wed May 01, 2013 6:15 am
- Location: Brisbane, Australia
Re: Darn GMT differences
My thoughts on this are:
1. use a demo account from your live broker so your accounts are in sync.
2. if your strategy is so dependent on a 1-2 hour shift, I suspect it may be over optimised (curve fitting)
3. keep it simple, by all means redo it on a H1 chart and all should be good, but to go to an off line chart seems over the top
Just my thoughts, so please feel free to ignore.
1. use a demo account from your live broker so your accounts are in sync.
2. if your strategy is so dependent on a 1-2 hour shift, I suspect it may be over optimised (curve fitting)
3. keep it simple, by all means redo it on a H1 chart and all should be good, but to go to an off line chart seems over the top
Just my thoughts, so please feel free to ignore.
-
hndymann
- Trader
- Posts: 23
- Joined: Sat Nov 19, 2011 4:01 pm
Re: Darn GMT differences
I know this may seem "over optimized" by some but a H4 trading strategy can become highly impacted by a time shift due to market open times. I'm still looking for a solution to this.
Maybe a possible way would be to create an array with calculated H4 values using the H1 timeframe.
To do this I assume one would need to specify broker hours when a calculated H4 candle would open/close, read through the H1 candles and extrapolate the 4 candles needed for the calculated H4.
I guess I need to brainstorm a little more to figure out how I would code this.
For example... I want candle hours 1-5, 5-9, 9-13, 13-17, 17-21 and 21-1 placed into a calculated H4 array.
The time is currently 19:05, obviously I am 2 hours and 5 minutes into the calculated H4 candle so I need to use the H1 H,L,O,C back to the 17:00 hour to calculate the current H4 but need to go back i-4 candles from that position to calculate the previous H4 candle. Its pretty simple to go back 4 H1 candles at a time but would anyone know a method of determining where you are within a H4 period and how you would go about calculating the first H4?
time = 19:05
If hour > 17 and < 21
hour - 17 = firstLookback
I think I be blabbing and making 0 logical sense but I just felt like putting it out there.
Has this been attempted before?
Maybe a possible way would be to create an array with calculated H4 values using the H1 timeframe.
To do this I assume one would need to specify broker hours when a calculated H4 candle would open/close, read through the H1 candles and extrapolate the 4 candles needed for the calculated H4.
I guess I need to brainstorm a little more to figure out how I would code this.
For example... I want candle hours 1-5, 5-9, 9-13, 13-17, 17-21 and 21-1 placed into a calculated H4 array.
The time is currently 19:05, obviously I am 2 hours and 5 minutes into the calculated H4 candle so I need to use the H1 H,L,O,C back to the 17:00 hour to calculate the current H4 but need to go back i-4 candles from that position to calculate the previous H4 candle. Its pretty simple to go back 4 H1 candles at a time but would anyone know a method of determining where you are within a H4 period and how you would go about calculating the first H4?
time = 19:05
If hour > 17 and < 21
hour - 17 = firstLookback
I think I be blabbing and making 0 logical sense but I just felt like putting it out there.
Has this been attempted before?
-
garyfritz
Re: Darn GMT differences
This is caused by Empty4's braindead definition of when a candle starts. D1 and H4 candles start at 00:00 and (for H4) 04:00, 08:00, etc. This works fine if your broker is GMT. But if your broker uses GMT+1/2/3, it hoses things. You get a D1 candle that includes just the last few hours of Sunday, then 4 24-hour D1 candles, then a short D1 candle on Friday. You end up with 6 D1 candles per week, which can mess up code that (properly) expects 5 candles per week. Similar but less-severe problem with H4.
Simplest solution is to shift to H1, if you can. But sometimes that's not very practical. It is NOT straightforward or simple to fix EA code to deal with this. So most people don't. They just accept that Empty4 is broken for non-GMT+0 brokers, and/or ignore it, and hope their EA works anyway.
RLF's suggestion to run your EA (or your discretionary indicators) on a GMT+0 broker and trade-copy to your broker is a pretty reasonable workaround.
Simplest solution is to shift to H1, if you can. But sometimes that's not very practical. It is NOT straightforward or simple to fix EA code to deal with this. So most people don't. They just accept that Empty4 is broken for non-GMT+0 brokers, and/or ignore it, and hope their EA works anyway.
RLF's suggestion to run your EA (or your discretionary indicators) on a GMT+0 broker and trade-copy to your broker is a pretty reasonable workaround.
-
hndymann
- Trader
- Posts: 23
- Joined: Sat Nov 19, 2011 4:01 pm
Re: Darn GMT differences
Thanks for the response, I really appreciate it. Ive tried multiple trade copiers in the past and never seem to have any luck. Have you found one that works pretty good?
- oliverjp
- Trader
- Posts: 36
- Joined: Mon May 06, 2013 8:39 am
Re: Darn GMT differences
Took a quick look at the free trade copier from MT4i.com a while ago and it looked promising.hndymann wrote:Thanks for the response, I really appreciate it. Ive tried multiple trade copiers in the past and never seem to have any luck. Have you found one that works pretty good?
All the best
Jeff
- fxdaytrader
- Trader
- Posts: 190
- Joined: Sun Jun 10, 2012 7:03 am
- Location: Poon-Town (germany, se-asia, se-europe) ...
Re: Darn GMT differences
mt4i is a good choice, find it here (free, but you have to signup first):
http://www.mt4i.com/appstore/app.aspx?id=2
This could be a workaround (as mentioned before):
choose a demo-account at a broker offering the H4 candles as you need them (servertime gmt, whatever). put the tradecopier sender on that platform.
on your live-account you will install the tradecopier receiver. now take your trades/run your ea on the demo, all will be mirrored to your live-acc.
http://www.mt4i.com/appstore/app.aspx?id=2
This could be a workaround (as mentioned before):
choose a demo-account at a broker offering the H4 candles as you need them (servertime gmt, whatever). put the tradecopier sender on that platform.
on your live-account you will install the tradecopier receiver. now take your trades/run your ea on the demo, all will be mirrored to your live-acc.
-
hndymann
- Trader
- Posts: 23
- Joined: Sat Nov 19, 2011 4:01 pm
Re: Darn GMT differences
Thanks for the info guys!
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
Re: Darn GMT differences
I thought MT4i trade copier has been blocked by Metaquotes.fxdaytrader wrote:mt4i is a good choice, find it here (free, but you have to signup first):
http://www.mt4i.com/appstore/app.aspx?id=2
This could be a workaround (as mentioned before):
choose a demo-account at a broker offering the H4 candles as you need them (servertime gmt, whatever). put the tradecopier sender on that platform.
on your live-account you will install the tradecopier receiver. now take your trades/run your ea on the demo, all will be mirrored to your live-acc.
Is anyone still using it ? I have tried it on several brokers' platform and it is not working.