Dukascopy
 
 
Wiki JStore Search Login

GetTimeUnit doesn't work out
 Post subject: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Mon 24 Jun, 2013, 03:01 
User avatar

User rating: 1
Joined: Wed 05 Jun, 2013, 03:13
Posts: 29
Location: China, HongKong
Defined the trading time, but it always takes 8:00 am entrance. Did I do something wrong?


Image

Image


Attachments:
TradingTime.vfs [26.94 KiB]
Downloaded 342 times
TheRealEntrance.JPG [74.96 KiB]
Downloaded 558 times
TradingTime.JPG [104.04 KiB]
Downloaded 544 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Tue 25 Jun, 2013, 08:23 
Site Administrator
User avatar

User rating:
Joined: Fri 21 Jun, 2013, 16:50
Posts: 197
Location: FranceFrance
Hello

I have tested your strategy, and the position opens at 10: 00.

There is a 2 hours shift. This issue is known and we are working on it.

It is a problem in the historical tester. If you run your strategy in LIVE, the right time will be kept.

So, to visualise your strategy in the tester as it would work on LIVE, you will have to add 2 hours in the code (opening at 14: 00 instead of 12:00).

We are working hard to fix this historical tester problem ASAP.


 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Sat 29 Jun, 2013, 04:18 
User avatar

User rating: 0
Joined: Thu 13 Jun, 2013, 08:09
Posts: 13
Location: China, Shanghai
Bruno_Grunberg wrote:
Hello

I have tested your strategy, and the position opens at 10: 00.

There is a 2 hours shift. This issue is known and we are working on it.

It is a problem in the historical tester. If you run your strategy in LIVE, the right time will be kept.

So, to visualise your strategy in the tester as it would work on LIVE, you will have to add 2 hours in the code (opening at 14: 00 instead of 12:00).

We are working hard to fix this historical tester problem ASAP.


@Para, just added my findings to this problem. It is probably because the generated code for GetTimeUnit block is using traders' local time zone instead of GMT.

//Original generated code: Calendar calendar = GregorianCalendar.getInstance();
Calendar calendar = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT")); //My updated code

@Tyson, FYI.


 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Sat 29 Jun, 2013, 06:01 
User avatar

User rating: 1
Joined: Wed 05 Jun, 2013, 03:13
Posts: 29
Location: China, HongKong
jerryetc wrote:
Bruno_Grunberg wrote:
Hello

I have tested your strategy, and the position opens at 10: 00.

There is a 2 hours shift. This issue is known and we are working on it.

It is a problem in the historical tester. If you run your strategy in LIVE, the right time will be kept.

So, to visualise your strategy in the tester as it would work on LIVE, you will have to add 2 hours in the code (opening at 14: 00 instead of 12:00).

We are working hard to fix this historical tester problem ASAP.


@Para, just added my findings to this problem. It is probably because the generated code for GetTimeUnit block is using traders' local time zone instead of GMT.

//Original generated code: Calendar calendar = GregorianCalendar.getInstance();
Calendar calendar = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT")); //My updated code

@Tyson, FYI.


Well done! If you are right, DUKASCOPY should give you a tip :lol:

建议他们给你发红包,呵呵!


 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Mon 01 Jul, 2013, 03:03 
User avatar

User rating: 0
Joined: Thu 13 Jun, 2013, 08:09
Posts: 13
Location: China, Shanghai
But this problem may not have impact for live trading as typically traders run their strategies remotely, means that the GetTimeUnit block still uses the server's time zone although the problem appears during historical testing.

Suggest that VJF team to update GetTimeUnit block with an option to choose time zone, with GMT selected as default.


 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Mon 01 Jul, 2013, 07:46 
Site Administrator
User avatar

User rating:
Joined: Fri 21 Jun, 2013, 16:50
Posts: 197
Location: FranceFrance
Quote:
But this problem may not have impact for live trading as typically traders run their strategies remotely, means that the GetTimeUnit block still uses the server's time zone although the problem appears during historical testing.
:idea:

You are totally right!

by the way, Para and Bruno_Grunberg are the same person, I just took a login more relevant.


 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Mon 01 Jul, 2013, 16:37 
User avatar

User rating: 0
Joined: Thu 13 Jun, 2013, 08:09
Posts: 13
Location: China, Shanghai
@Para, that also means we have to change our local time zone to GMT specifically for historical testing to get an accurate testing result... :(


 
 Post subject: Re: GetTimeUnit doesn't work out Post rating: 0   New post Posted: Tue 02 Jul, 2013, 08:56 
Site Administrator
User avatar

User rating:
Joined: Fri 21 Jun, 2013, 16:50
Posts: 197
Location: FranceFrance
I am speaking about this issue with the engineers twice a day.
We are working hard to fix this problem.
We are getting closer to the solution and this issue should be sorted out very soon.
We do apologise for the temporary inconvenience.


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com