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.

INSTRUMENT_STATUS of null instrument?
 Post subject: INSTRUMENT_STATUS of null instrument? Post rating: 0   New post Posted: Wed 09 May, 2012, 14:37 
User avatar

User rating: 6
Joined: Thu 19 May, 2011, 11:14
Posts: 235
Location: South Africa,
In a strategy running in the platform, I received this message:
MessageType : INSTRUMENT_STATUS Instument : null Tradable : false

It's not a problem because I just ignore it, but what does it mean if "null" instrument is not tradable?

This snippet of code:
    void onMessage(final IMessage message){
        // some code
            switch (message.getType()) {
                case INSTRUMENT_STATUS:
                    IInstrumentStatusMessage ism = (IInstrumentStatusMessage) message;
                    Debug.assertNotNull(ism);
                    Instrument instrument = ism.getInstrument();
                    if(instrument == null)
                        Debug.warn("Received message "+ism+" but getInstrument() == null");
                    // some code
                    break;
                // some other cases
            }
      }

...generated this output:
13:20:03 WARN: Received message MessageType : INSTRUMENT_STATUS Instument : null Tradable : false but getInstrument() == null


 
 Post subject: Re: INSTRUMENT_STATUS of null instrument? Post rating: 0   New post Posted: Wed 16 May, 2012, 12:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We could not replicate this.


 

Jump to:  

  © 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