Entering time into EAs and indicators

Post Reply
garyfritz

Entering time into EAs and indicators

Post by garyfritz »

Some EAs and indicators require time inputs to specify when they are active, when markets open or close, or similar. There is some confusion about how these times should be specified.

Most of the confusion seems to come from what timezone the EA/indi uses. Read the EA description to find out what it wants. There are generally two options:
  • Local time, or computer time. This is the time on your computer, as displayed (usually) in the lower-right corner of Windows boxes. Usually this is the same as the time shown on your watch, but not always. Empty4 cannot read your watch so you should always use your computer's time. This time will generally include summer / daylight savings time, if that is appropriate for your location.
  • Criminal time. This is the time used by your crim, and is the time used by Empty4 to timestamp market data. If you don't know your crim time, look at Market Watch in your Empty4. (Use View -> Market Watch or Ctrl-M to view it if it's not currently displayed.) The time shown at the top of the Market Watch window is your crim time.
Use the computer time or crim time to determine what timezone you or your crim are in.

Now that you know which timezone to use, what time should you enter? Let's say you're supposed to enter the London Open time. First you should find when that is. http://www.forexmarkethours.com/ (or other similar sites) shows the open/close times of the important markets, and lets you convert them into other timezones. Convert them to local timezone or crim timezone, depending on what the EA wants.

Be aware that different locales enter and exit summer time on different dates! This means the offset between two zones (e.g. between London open and your local time) can change TWICE when summer time starts or ends: once when one zone enters summer time, and again when the other zone enters summer time. You can use sites like http://www.timeanddate.com/worldclock/ to find the timezone and summer-time dates for any major city in the world.

Now you have to enter the time value into the EA/indicator. Different coders may use different formats. Some may use just the hour (for example 0 = midnight, 12 = noon), while others may use more complicated formats. You'll have to refer to the specific EA or indicator to see what it wants.
User avatar
cuzgeorge
Trader
Posts: 674
Joined: Mon Mar 05, 2012 10:10 am
Location: Johannesburg, South Africa.

Re: Entering time into EAs and indicators

Post by cuzgeorge »

Thanks Gary, cleared up some facts i did'nt know. excellent summary.
cuzgeorge
10.X, BMac,Xmeter,Marylin,and CaptsNakedTrading thread coupled with Slowkeys Intraday setup for manual trades.
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
User avatar
alex_forex
Trader
Posts: 438
Joined: Tue Nov 15, 2011 5:46 pm
Location: F R A N C E

Re: Entering time into EAs and indicators

Post by alex_forex »

Great input Gary !

Thanks for everyone ;-)

Regards
Alex
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Entering time into EAs and indicators

Post by gaheitman »

garyfritz wrote:Some EAs and indicators require time inputs to specify when they are active, when markets open or close, or similar. There is some confusion about how these times should be specified.
Someone mentioned it in another post, but it is important to call out again here. In the backtester, Empty4 sets local time to be the same as server time. So if your EA asks for local time settings, remember they will likely be different in the backtester than when you run it in real time.


George

http://www.youtube.com/watch?v=z31V0fjmR_g&t=0m45s
Post Reply

Return to “Know your MT4 platform”