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.

Not receiving anymore calendar events?
 Post subject: Not receiving anymore calendar events? Post rating: 0   New post Posted: Mon 29 Feb, 2016, 12:54 

User rating: 6
Joined: Tue 02 Jul, 2013, 16:52
Posts: 38
Dear All,

It seems to me that I don't receive calendar event messages any more.
To confirm, I added a simple log at the start of the onMessage in my strategy:
    @Override
    public void onMessage(final IMessage message) throws JFException {
        try {
            if (message.getType() != null && !message.getType().equals(IMessage.Type.INSTRUMENT_STATUS)) {
                log.info(message.getType().toString());
            }
And I don't receive anything except my orders: ORDER_FILL_OK, ORDER_CLOSE_OK, ORDER_CHANGED_OK are all received properly, but nothing of IMessage.Type.CALENDAR.

Did something change? Am I the only one having this problem? I am not sure exactly when this problem started to occur.

Thank you in advance!
Kind Regards


 
 Post subject: Re: Not receiving anymore calendar events? Post rating: 0   New post Posted: Fri 04 Mar, 2016, 14:11 

User rating: 6
Joined: Tue 02 Jul, 2013, 16:52
Posts: 38
Dear Dukascopy team,

I confirm I don't receive Calendar messages anymore, but still receive all other messages via onMessage()
Can you check what's happening?
I am using the latest version of the API.

Thank you in advance


 
 Post subject: Re: Not receiving anymore calendar events? Post rating: 0   New post Posted: Thu 07 Apr, 2016, 07:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
To receive Calendar news in the client please enable Tools > Live Economic Calendar.
To receive them from SDK please use IClient.addNewsFilter() as described here:
https://www.dukascopy.com/wiki/#Trade_on_news


 
 Post subject: Re: Not receiving anymore calendar events? Post rating: 0   New post Posted: Wed 13 Apr, 2016, 16:29 

User rating: 6
Joined: Tue 02 Jul, 2013, 16:52
Posts: 38
Thank you for the answer and for pointing this out.
I didn't need it with previous versions and was not aware that it was now needed.

If somebody else is interested, here is what I added to my onStart to get the calendar data releases:
            instance = ClientFactory.getDefaultInstance();
            CalendarFilter calendarFilter = new CalendarFilter();
            calendarFilter.setTimeFrame(NewsFilter.TimeFrame.ONLINE);
            instance.addNewsFilter(calendarFilter);


 

Jump to:  

  © 1998-2025 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