Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Make trade on news/calendar events possible, by automating
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=83&t=48723
Page 1 of 1

Author:  tcsabina [ Wed 30 Jan, 2013, 12:50 ]
Post subject:  Make trade on news/calendar events possible, by automating

Add the possibility for a strategy that is running in the JForex client, to receive calendar events automatically, without any user interaction.

Currently it is only possible, if the the user presses the Apply button on the News -> Live Economic calendar.

Author:  forexegyptian [ Wed 01 May, 2013, 12:21 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

tcsabina wrote:
Add the possibility for a strategy that is running in the JForex client, to receive calendar events automatically, without any user interaction.

Currently it is only possible, if the the user presses the Apply button on the News -> Live Economic calendar.


i agree with you

Author:  tcsabina [ Tue 04 Jun, 2013, 12:16 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

Dear Support,

What do you think of this request?

Author:  tcsabina [ Thu 20 Jun, 2013, 14:22 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

An alternative solution for this request would be if the calendar data is downloadable in xml (or csv) format. With that in hand automation could be possible not trough the JForex API, but by simple processing the downloaded file.

Please consider this download option. I don`t know in what format the news are entered in the site, but I guess it is much more easier to provide a download link, compared to API modification to make news filtering automatic.

Author:  burton [ Tue 11 Mar, 2014, 13:17 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

tcsabina wrote:
Add the possibility for a strategy that is running in the JForex client, to receive calendar events automatically, without any user interaction.

Currently it is only possible, if the the user presses the Apply button on the News -> Live Economic calendar.


I would prefer this simpler method which can also be used by novices.

Author:  FXjuxe [ Mon 12 May, 2014, 15:44 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

Hello Support,

I strongly support this suggestion!
An algorithm which cannot automatically handle Calendar events is pretty useless.
Please provide an API update to receive Calendar Dates.

BR,
Juergen

Author:  FXjuxe [ Thu 15 May, 2014, 12:55 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

Hello Support,

I played a bit with CalendarFilter in the JForex client and registered that any filter settings are not applied.
I initialize the filter with
client.addNewsFilter(calendarFilter);
in the onStart method.
Does the filter mechanism only work for the standalone API?
If not can you show an example for the JForex version?

Thanks and best regards,
Juergen

Author:  API Support [ Thu 15 May, 2014, 15:53 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

FXjuxe wrote:
Does the filter mechanism only work for the standalone API?
Yes it is for JForex-SDK - this effectively does the same thing as you do manually in the JForex platform filtering the news and calendar event.
FXjuxe wrote:
If not can you show an example for the JForex version?
https://www.dukascopy.com/wiki/#IClient_functionality/Calendar_filter_example
See the attached NewsStrategyNoTrades.java

For news/calendar summary from JForex-API see our second post in the following topic:
viewtopic.php?f=65&t=46771

Author:  FXjuxe [ Thu 15 May, 2014, 16:13 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

Ok, since this is only for the standalone I need a workaround for applying a filter in the JForex client.
Currently my problem is that
ICalendarMessage
has the method
icm.getCountry()
which returns a String.
The
CalendarFilter
class has the method
getCountries()
which returns a
Set<Country>
.
How can I manually on reception of a CalendarMessage check if a specific country is contained?
My current solution is:
if (!calendarFilter.getCountries().contains(message.getCountry())) {
                return;
}

Clearly this cannot work, but at debugging I see that message.getCountry() returns "United States" and in the filter the String is "US".
So even a string compare would not work.
Can you help?

Author:  API Support [ Fri 16 May, 2014, 09:54 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

FXjuxe wrote:
How can I manually on reception of a CalendarMessage check if a specific country is contained?
use ICalendarMessage.getCountries instead of ICalendarMessage.getCountry.

Author:  FXjuxe [ Fri 16 May, 2014, 12:13 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

I cannot see that ICalendarMessage has a method getCountries().
Is it in a new API version?

Author:  API Support [ Fri 16 May, 2014, 12:21 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

it is inherited from INewsMessage.

Author:  FXjuxe [ Fri 16 May, 2014, 12:24 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

On this page https://www.dukascopy.com/client/javadoc/com/dukascopy/api/INewsMessage.html there is also no getCountries method.

Author:  API Support [ Fri 16 May, 2014, 12:28 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

pardon, see getGeoRegions().

Author:  tcsabina [ Fri 06 Mar, 2015, 20:27 ]
Post subject:  Re: Make trade on news/calendar events possible, by automating

I know this topic is quite old, but being the original poster I dared to bring it up.
And the reason is that I made a strategy of mine public, which does what I was requestin: processing a file (.csv) that contains economic calendar news events.
If anyone interested, take a look on the strategy at JStore, under the name EconCalNews.

  Page 1 of 1