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.

News
 Post subject: News Post rating: 0   New post Posted: Sun 21 Feb, 2010, 13:45 

User rating: -
Hi,

I've 2 questions :
How can we receive the ICalendarMessage.Detail inside of a strategy ?
Is it possible to access to the IClient interface inside of a strategy ?

Thanks,
Philippe


 
 Post subject: Re: News Post rating: 0   New post Posted: Mon 22 Feb, 2010, 14:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Quote:
How can we receive the ICalendarMessage.Detail inside of a strategy ?
Use a getDetail() function from ICalendarMessages interface https://www.dukascopy.com/swiss/docs/api/com/dukascopy/api/ICalendarMessage.html#getDetails()


 
 Post subject: Re: News Post rating: 0   New post Posted: Mon 22 Feb, 2010, 19:52 

User rating: -
Hi,
I know the getDetails() method, finally I found what I was searching. Here's :

public void onMessage(IMessage message) throws JFException
{
    if(message.getType() == IMessage.Type.CALENDAR)
    {
        ICalendarMessage c = (ICalendarMessage)message;
        List<ICalendarMessage.Detail> d = c.getDetails();

        for(int n = 0; n < d.size(); n++)
        {
            console.getOut().print(d.get(n).getDescription() + "\n");
        }
    }
}

I don't understand your response about the IClient interface, for example I would like to access to the method "void com.dukascopy.api.system.IClient.addNewsFilter(INewsFilter newsFilter)" but inside the strategy itself, is it possible ? The idea is to suscribe programmatically to the news.

Thanks,
Philippe


 
 Post subject: Re: News Post rating: 0   New post Posted: Tue 23 Feb, 2010, 09:22 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
No it's not possible. IClient interface is only for applications using our JForex API as a library. You need to subscribe from the platform to make news accessible in the strategy


 

Jump to:  

cron
  © 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