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.

IContext.setSubscribedInstruments semantics
 Post subject: IContext.setSubscribedInstruments semantics Post rating: 0   New post Posted: Sun 06 May, 2012, 21:13 
User avatar

User rating: 6
Joined: Thu 19 May, 2011, 11:14
Posts: 235
Location: South Africa,
When IContext.setSubscribedInstruments is called, is there an implication that all other instruments may be unsubscribed?

For example, if a strategy calls, in this order...
  • setSubscribedInstruments(EnumSet.of(A));
  • setSubscribedInstruments(EnumSet.of(B));
  • setSubscribedInstruments(EnumSet.of(C));
... is this the same as ...
  • setSubscribedInstruments(EnumSet.of(A,B,C));
... or is it the same as ...
  • setSubscribedInstruments(EnumSet.of(C));


 
The Best Answer  Post subject: Re: IContext.setSubscribedInstruments semantics Post rating: 0   New post Posted: Fri 11 May, 2012, 08:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It is impossible to unsubscribe to an instrument from a strategy. Method context.setSubscribedInstruments will only subscribe to instruments.
That is, if an empty set is passed to it, nothing will happen.


 

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