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.

Stopping News and Calendar messages from displaying on console
 Post subject: Stopping News and Calendar messages from displaying on console Post rating: 0   New post Posted: Tue 17 Apr, 2012, 23:51 

User rating: 1
Joined: Tue 30 Aug, 2011, 08:54
Posts: 19
Location: AustraliaAustralia
Using a live strategy I am receiving news/calendar messages in the console display, for example:

2012-04-17 21:06:13.222 WARN CurvesJsonProtocolHandler - NewsStoryMessage received from history server, but none is waiting for it: {"news_id":"1994992","markets":[],"minit":false,"header":"DJ 1994992:INSERT","end":"true","content":{"event_details":[{"actual":"5","description":"Benchmark TPM Rate",
"previous":"5.0%","detail_id":"1"}],"isin":"","event_id":"1994992","description":"Banco Central de Chile Monetary Policy Meeting & interest rate announcement",
"event_code":"IEP","venue":"","confirmed":"true","company_url":"https://www.bcentral.cl/","action":"INSERT","period":"Apr",
"event_url":"https://www.bcentral.cl/","event_date":"1334620800000","country":"CHI","ticker":"","organization":"Banco Central de Chile"},"c":"2012,
Dow Jones & Company, Inc.","currs":[],"index":[],"news_src":"DJ_LIVE_CALENDAR","pub_date":"1334696640000","geo":["CL"],"type":"news_story","hot":"false"}


This severely clutters the console output. Will adding similar code to the following remove these messages from the console:

          NewsFilter newsFilter = new NewsFilter();
          newsFilter.setTimeFrame(NewsFilter.TimeFrame.TODAY);
          newsFilter.getKeywords().add("MARKET TALK");
          _client.addNewsFilter(newsFilter);
         
          CalendarFilter calendarFilter = new CalendarFilter();
          calendarFilter.setType(INewsFilter.Type.IEP);
       
          //filter keywords
          calendarFilter.getKeywords().add("Treasury");
          calendarFilter.getKeywords().add("GDP");
          calendarFilter.getKeywords().add("trade");
          _client.addNewsFilter(calendarFilter);


I'm not to sure what parameters to use with the filter either. Note: I'm checking for news and calendar messages in the strategy as well.


 
 Post subject: Re: Stopping News and Calendar messages from displaying on console Post rating: 0   New post Posted: Sat 21 Apr, 2012, 15:40 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This will get fixed with the next releases of JForex API.
Consider as a temporary workaround updating the log4j.properties file by adding the following line:
log4j.category.com.dukascopy.transport.common.msg.news.NewsStoryMessage=ERROR


 

Jump to:  

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