Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How to run a strategy with custom Day start time?
 Post subject: How to run a strategy with custom Day start time? Post rating: 0   New post Posted: Wed 05 Jul, 2023, 10:52 

User rating: 0
Joined: Fri 28 Feb, 2020, 14:55
Posts: 9
Location: Bulgaria,
In JForex Chart Preferences it is possible to set a custom "Day start time" : UTC, EST, etc. This recalculates all bars, indicators, etc.

Is it possible to run an entire strategy on bar data that is not using the default (UTC) timezone? E.g. if we use EST day start:
- the onBar() method will be called at 00:00 EST for a new daily bar
- history.getBars() will return bars starting at 00:00 EST
- indicators will be calculated using EST timezone bars, etc.


 
 Post subject: Re: How to run a strategy with custom Day start time? Post rating: 0   New post Posted: Mon 10 Jul, 2023, 15:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello!

Yes, it is possible. Please see article on that topic: https://www.dukascopy.com/wiki/en/devel ... -date-time

I also attached strategy file with example.

Kind regards,
Dukascopy Bank SA


Attachments:
ADR_Test.java [2.91 KiB]
Downloaded 267 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.
 

Jump to:  

  © 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