Getting absolute time and date of bar in API?
-
- Posts: 4
- Joined: Sat Jan 27, 2007 5:09 am
- Location: Hong Kong
Getting absolute time and date of bar in API?
I have been evaluating Forextester using Delphi Explorer, it looks good and if I can code my systems in it then I will buy it. I use some indicators and startegies that use the time of trading day and the day of the week within their assessment, can I get the absolute time and date for the current bar from the indicator and strategy API?
- Terranin
- Site Admin
- Posts: 833
- Joined: Sat Oct 21, 2006 4:39 pm
Re: Getting absolute time and date of bar in API?
andygreenhk wrote:I have been evaluating Forextester using Delphi Explorer, it looks good and if I can code my systems in it then I will buy it. I use some indicators and startegies that use the time of trading day and the day of the week within their assessment, can I get the absolute time and date for the current bar from the indicator and strategy API?
Sure you can do this, if you know the number of bar. For this purpose there is Time() array so to get bar time you can call tm := Time(number);
This is default timeframe for indicators and strategies (after SetCurrencyAndTimeframe). You can access another timeframe and currency with tm := iTime('USDJPY', PERIOD_M15, 10); for example.
Hasta la vista
Mike
Mike
-
- Posts: 17
- Joined: Sun Sep 14, 2008 9:17 am
Dear Mike,
I want to build an indicator which would change the background color of the chart when entering into another trading session eg for Japanese white, for london red and for us blue color.
it will help me a lot in backtesting.
Also can you please enlighten me on different time zones?
I have four clocks on my desktop set to
1- GMT (Monrovia, Reykjavik); matches the time in my gft forex dealbook.
2- GMT (Greenwich mean time; Dublin, Edinburgh)
3- (GMT-5:00) Eastern time: US and Canada
4- (GMT+5:00) Islamabad, Pakistan
My question is:
1- Which version of GMT is the right one 1 or 2? because there are numerous versions of it. i have to pick a standard in order to calculate other timezones.
2- Is GMT-5:00 the only correct Eastern time of US or are there any other versions as well? and if so which is the right one to know whether US session has started or not?
My questions are overwhelming; i know.
but i can't help it; you are too intelligent and i want to learn.
thanks in advance.
Sheraz
I want to build an indicator which would change the background color of the chart when entering into another trading session eg for Japanese white, for london red and for us blue color.
it will help me a lot in backtesting.
Also can you please enlighten me on different time zones?
I have four clocks on my desktop set to
1- GMT (Monrovia, Reykjavik); matches the time in my gft forex dealbook.
2- GMT (Greenwich mean time; Dublin, Edinburgh)
3- (GMT-5:00) Eastern time: US and Canada
4- (GMT+5:00) Islamabad, Pakistan
My question is:
1- Which version of GMT is the right one 1 or 2? because there are numerous versions of it. i have to pick a standard in order to calculate other timezones.
2- Is GMT-5:00 the only correct Eastern time of US or are there any other versions as well? and if so which is the right one to know whether US session has started or not?
My questions are overwhelming; i know.
but i can't help it; you are too intelligent and i want to learn.
thanks in advance.
Sheraz
-
- Posts: 17
- Joined: Sun Sep 14, 2008 9:17 am
- Terranin
- Site Admin
- Posts: 833
- Joined: Sat Oct 21, 2006 4:39 pm
johntester wrote:Dear Mike,
I have cleared up my confusion regarding time zones.
What i need from you to assist me how to develop an indicator, indicating trading sessions on a chart(us session, japanese session, london session etc) during test mode.
thanks in advance.
Sheraz
Sorry for delay, we provide data with Central European Time that is GMT + 1 (+2 summer time). What kind of assistance do you need?
Hasta la vista
Mike
Mike
-
- Posts: 17
- Joined: Sun Sep 14, 2008 9:17 am
In simpler words,
I want a certain time interval in a chart to look different from other intervals eg the asian trading session (0:00 to 9:00; GMT time) to look different from London session (0800 to 1500; GMT time).
I want to program an indicator that would highlight the sessions opening and closing (whether by painting arrows, labels or colors).
waiting for reply.
thanks in advance.
I want a certain time interval in a chart to look different from other intervals eg the asian trading session (0:00 to 9:00; GMT time) to look different from London session (0800 to 1500; GMT time).
I want to program an indicator that would highlight the sessions opening and closing (whether by painting arrows, labels or colors).
waiting for reply.
thanks in advance.
- Terranin
- Site Admin
- Posts: 833
- Joined: Sat Oct 21, 2006 4:39 pm
johntester wrote:In simpler words,
I want a certain time interval in a chart to look different from other intervals eg the asian trading session (0:00 to 9:00; GMT time) to look different from London session (0800 to 1500; GMT time).
I want to program an indicator that would highlight the sessions opening and closing (whether by painting arrows, labels or colors).
waiting for reply.
thanks in advance.
You can make it in a form of oscillator, where have 3 buffers (one buffer for every session) in different colors. Buffers' style should be ds_Histogram. Fixed values range for example 0..1, when you have asian session set buffer 0 to 1, and other buffers to 0. When you have european session set buffer 1 to 1 and other buffers to 0, and so on.
Hasta la vista
Mike
Mike
-
- Posts: 17
- Joined: Sun Sep 14, 2008 9:17 am
-
- Posts: 72
- Joined: Wed Apr 23, 2008 12:24 pm
Who is online
Users browsing this forum: No registered users and 12 guests