please api support explain me how this IInstrumentStatusMessage interface works as it's advertised to in the wiki. i've been losing hours on this already...
mikakun
Post subject: Re: Instrument tradability - IInstrumentStatusMessage
Post rating: 0
Posted: Mon 26 Sep, 2016, 00:02
User rating: 0
Joined: Sun 04 Aug, 2013, 10:16 Posts: 48 Location: FranceFrance
in case anyone is interested here is a work around until the support deign to explain how to use .isTradable()
public Instrument instrument; public boolean instrumentIsTradable;
public void onMessage(IMessage message) throws JFException {
if (message.getType().equals(IMessage.Type.INSTRUMENT_STATUS)) { String m = message.toString(); if (m.contains(instrument.toString())) instrumentIsTradable = m.contains("true") ? true : false; }
Peggy37
Post subject: Re: Instrument tradability - IInstrumentStatusMessage
Post rating: 0
Posted: Mon 26 Sep, 2016, 21:04
User rating: 0
Joined: Fri 04 Sep, 2015, 19:44 Posts: 34 Location: Slovakia, KE
In manual, there is tradeability by hours checking, but you must know exact hours.
API Support
Post subject: Re: Instrument tradability - IInstrumentStatusMessage
Instrument trading hours usually don't change. Historical trading hours can be seen on chart by disabling flats filtering. That can be done from settings by selecting Tools > Preferences > Chart Flats Filter is disabled.
mikakun
Post subject: Re: Instrument tradability - IInstrumentStatusMessage
Post rating: 0
Posted: Thu 29 Sep, 2016, 17:07
User rating: 0
Joined: Sun 04 Aug, 2013, 10:16 Posts: 48 Location: FranceFrance
got an answer from support,
here is how to use IInstrumentStatusMessage.isTradable() :