Dukascopy
 
 
Wiki JStore Search Login

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

    Submit JForex API function requests in this forum only.
    Off topics are strictly forbidden.

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

Make trade on news/calendar events possible, by automating
 Post subject: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Wed 30 Jan, 2013, 12:50 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
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.


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Wed 01 May, 2013, 12:21 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
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


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Tue 04 Jun, 2013, 12:16 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Dear Support,

What do you think of this request?


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Thu 20 Jun, 2013, 14:22 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
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.


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Tue 11 Mar, 2014, 13:17 
User avatar

User rating: 0
Joined: Wed 07 Mar, 2012, 06:02
Posts: 58
Location: SwitzerlandSwitzerland
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.


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Mon 12 May, 2014, 15:44 
User avatar

User rating: 11
Joined: Tue 27 Mar, 2012, 17:47
Posts: 111
Location: GermanyGermany
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


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Thu 15 May, 2014, 12:55 
User avatar

User rating: 11
Joined: Tue 27 Mar, 2012, 17:47
Posts: 111
Location: GermanyGermany
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


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Thu 15 May, 2014, 15:53 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
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


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Thu 15 May, 2014, 16:13 
User avatar

User rating: 11
Joined: Tue 27 Mar, 2012, 17:47
Posts: 111
Location: GermanyGermany
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?


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Fri 16 May, 2014, 09:54 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
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.


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Fri 16 May, 2014, 12:13 
User avatar

User rating: 11
Joined: Tue 27 Mar, 2012, 17:47
Posts: 111
Location: GermanyGermany
I cannot see that ICalendarMessage has a method getCountries().
Is it in a new API version?


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Fri 16 May, 2014, 12:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
it is inherited from INewsMessage.


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Fri 16 May, 2014, 12:24 
User avatar

User rating: 11
Joined: Tue 27 Mar, 2012, 17:47
Posts: 111
Location: GermanyGermany
On this page https://www.dukascopy.com/client/javadoc/com/dukascopy/api/INewsMessage.html there is also no getCountries method.


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Fri 16 May, 2014, 12:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
pardon, see getGeoRegions().


 
 Post subject: Re: Make trade on news/calendar events possible, by automating Post rating: 0   New post Posted: Fri 06 Mar, 2015, 20:27 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
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.


 

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