Dukascopy
 
 
Wiki JStore Search Login

Proper way to automatically handle holidays
 Post subject: Proper way to automatically handle holidays Post rating: 0   New post Posted: Mon 19 Dec, 2011, 12:18 

User rating: 0
Joined: Mon 19 Dec, 2011, 12:07
Posts: 1
Location: HU
Dear All,

I have just recently started to run automated strategies through the Java API, and I have realized the following problem:
I open a position on a weekday, and would like to hold it during the weekend.
I am aware of the fact, that weekend policy lowers the margin to 1:30, and I can well prepare to reduce the position size before 18h Friday, but what about other holidays?
Since holidays occure irregularly, and - as far as I have checked (but tell me please, if I'm wrong) - banking holidays act the same as weekends, I can find myself nearly anytime in the situation, that leverage will be reduced under my open positions, and I receive a margin cut. (What if some national holiday will be on Wednesday? That means, I will get a cut after 18h Tuesday? Or 20h, since Wednesday starts at 00:00 GMT? Or what?)
Is there somekind of an option inside the API, or some datasource I can utilize to EXACTLY prepare for the event of a shrinking margin?
Thanks in advance!


 
 Post subject: Re: Proper way to automatically handle holidays Post rating: 0   New post Posted: Mon 19 Dec, 2011, 16:51 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
Dear sir,

Dukascopy Bank SA communicates in advance the days when the market is closed. A banking holiday does not necessarily mean the market is closed.
In case we are enforcing the over-the-week-end leverage rule in unusual periods, we will communicate it properly.
However, there is no automated warning method that could be used within the strategy to account for that, except for the Friday when the time at
which the leverage is changed is known.

You can check onBar, or onTick what is the maximum leverage on the account. The variable is given onAccount.

Please feel free to conatct us should you need further clarification.

Best regards.

David


 
 Post subject: Re: Proper way to automatically handle holidays Post rating: 0   New post Posted: Wed 20 Nov, 2013, 11:47 
User avatar

User rating: 0
Joined: Sun 22 Sep, 2013, 22:29
Posts: 18
Location: RomaniaRomania
Do you have any class to tell the next available market day ? I could set my strategy to exit on fridays and resume mondays, but what do I do with the rest of the holidays? It's not just the leverage that's disturbing, but gaps.


 

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