| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Common Prob #1: Time, DST, Broker Offset, Universal Chart https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=306 |
Page 1 of 1 |
| Author: | ironrick [ Fri Jan 27, 2012 12:16 am ] |
| Post subject: | Common Prob #1: Time, DST, Broker Offset, Universal Chart |
Common Prob #1: Time, DST, Broker Offset, Universal Chart We all know the frustrations of Empty4 and dealing with all the different: -- World timezones -- Daylight Savings Times (and dates) and -- Criminal GMT Offsets -- Differing New Bar (and especially Daily Bar) start times Which of course lead to: -- Strategies can't be tested/correlated with different Criminals -- Strategies that use time based Breakouts or Market openings as part of the strategy get messed up -- Backtesting (visual or ST) gets messed up because of time offsets, wrong DST, or wrong timezone -- Maybe most important: different (read: inconsistent) New Bar start times (I know I repeated it) And a host of other problems/challenges. This is only talking on the technical end of things -- now when we address the volume of posts on this forum related to questions and issues on the matter of time, hours, bars, GMT, etc... NOOBS or not! I would guess almost 1/10+ of the posts here are related to Empty4's handling of time. NOW add on how many hours get wasted by tests we are all running on different EAs that end up being apples to oranges comparisons because a certain person is using a different broker/time/bar offset... or is one hour off in their calculation from GMT... (None of us is immune to simple human error.) There HAS to be a unified solution. I want to hear yours. All ideas welcome. I will propose mine below. Don't know if it is technically feasible... But we won't know unless we try. Remember those Grey Cells! Rick |
|
| Author: | ironrick [ Fri Jan 27, 2012 1:06 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
My solution centers around 2 parts. Part 1 has many partial solutions and workarounds. Try to read all the way through so that you can see how both parts work together. Part #1: Universal Time. We need a way to get all of us ONTO GMT. No matter what our offset, everything that we code needs to be able to reference a universal time, independent of broker clocks and local timezone. eg, A universal way to translate GMT --> through the broker timezone --> and/or broker offset --> through to Local timezone --> with correct DST and back through to GMT again. If we can programatically do this so we can always reference a universal clock we can move on to.... Part #2: Universal Charts. This is where things get interesting (at least in my head. Maybe it won't work...but I can always hope!) Is there a way that we can all be looking at the SAME Bars for EVERY timeframe that say and start at the SAME time? (Except for the differences between different broker feeds. I don't think we can fix that) Is there a way that we can all be referrencing a universal chart -- a chart that always has it's daily bar start at 0:00 GMT with all other TF's bars based on that start time -- no matter what the broker offset is? My understanding is that this can be done with "offline charts". However, I believe there are many indicators that don't run correctly with that mode. Is there another solution? Khalid and George briefly discussed this here: http://www.stevehopwoodforex.com/phpBB3 ... 7169#p6477 and George pointed to this: http://forum.mql4.com/17169 This looks to be the best of both worlds. It is what really got me thinking in this direction. If we can get a..."module"... that combines part 1 and part 2 so that we all see, trade, and test on a broker agnostic, universal chart -- holy smokes I think it would be a HUGE help to all of us! ADDED BONUS: If we went this route we would be able to easily build out any other non-native TF that we need. Want an 8 hr bar? Poof. A 12 hr bar. No problem. What do you think? Is it something doable? Have a better idea? Sing out! R |
|
| Author: | mbkennel [ Fri Jan 27, 2012 1:35 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
I've already solved problem #1. Look for LibGMT.h, I posted it here. For #2, the only real problem is 4H and 1D bars, week and month bars aren't really a big deal. As you recognize, both can be synthesized from 1H bars. For this issue you use #1, and program any internal computations to figure things out using the 1H timescale only. |
|
| Author: | mobthehop [ Fri Jan 27, 2012 3:45 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
Not sure to what extend this is applicable to what you like to achieve but here is a link to a dashboard that includes auto GMT offset - thought u might like to have a look at the code.... http://www.forexfactory.com/showthread. ... ost4719903 |
|
| Author: | ironrick [ Fri Jan 27, 2012 4:45 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
In point of fact, it was also your library that got me thinking through this whole process -- I had meant to include a link and comment in the first post and simply forgot. I will update to reflect your contribution! Part of my point and hope here is to increase visibility and unify some of the tools we already have to the point of having a complete and usable solution. Thank you for your feedback and participation! R |
|
| Author: | magft [ Sat Jan 28, 2012 9:53 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
Does the inidicator in the link alllow EAs to run on offline charts? I had an older version that didnt work so i added the required code for the Fratelli EA. Cant test right now but i added the missing bit of code that is used to the updated version of the indicator. Give it a try and let me know if there are any issues. I like this idea for testing EAs should help. Mike |
|
| Author: | johnsmily [ Tue Mar 20, 2012 3:34 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
And a host of other problems/challenges. This is only talking on the technical end of things -- now when we address the volume of posts on this forum related to questions and issues on the matter of time, hours, bars, GMT, etc... NOOBS or not! I would guess almost 1/10+ of the posts here are related to Empty4's handling of time ! ----------------------------------------------------------------------------- Trumpet Wedding Dresses|New Style Flower Girl Dresses|Wedding Dresses with Sleeves|New Style Wedding Dresses |
|
| Author: | SteveHopwood [ Wed Mar 21, 2012 1:06 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
You are perhaps becoming to understand why I insist on using local time in all my time inputs. So, a strategy depends on a specific start time, and there is an input StartTime. Said start time is the London opening. You live in India. Or Australia. Or Greenland. Or Mars. You look at your clock when London opens, then enter into StartTime the time that shows on your clock in India. Or Australia. Or Greenland. Or Mars. I have never understood why coders and traders have found this concept so hard to understand. Beat yourself up over time zones and that is all you will ever achieve - beating yourself up. Every time you come up with the solution to some dimwit asking, £Eh, whut?" some other dimwit will come up with the same question. |
|
| Author: | mbkennel [ Fri Mar 23, 2012 4:32 am ] |
| Post subject: | Re: Common Prob #1: Time, DST, criminal Offset, Universal Ch |
He he steve. If you used libGMT.h your EA would need no inputs if it were always 8AM London, and nobody bugging anybody with questions. What would Steve Jobs say? Both Server Time and Local Time are wrong answers. Since you don't like libraries you can even copy & paste the damn subroutines. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|