Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

isTradable() returning wrong values in test mode
 Post subject: isTradable() returning wrong values in test mode Post rating: 0   New post Posted: Fri 19 Feb, 2021, 08:43 

User rating: 1
Joined: Mon 04 Nov, 2019, 03:51
Posts: 8
Location: Canada, Vancouver
Seemingly, in test mode :

IEngine.isTradable(Instrument) returns always true
Instrument.isTradable() returns always false

Regardless if the market was actually closed or not.
It's working fine in live mode.
I tested this on COFFEE.CMD.

Can someone else confirm that ?


 
 Post subject: Re: isTradable() returning wrong values in test mode Post rating: 0   New post Posted: Wed 24 Feb, 2021, 18:16 

User rating: 2
Joined: Fri 27 Jul, 2018, 13:46
Posts: 13
Location: ItalyItaly
Hello,
I had the same problem in the past.
I replaced with this piece of code:

public void onStart(IContext context) throws JFException {
this.context = context;
}

then

this.context.getDataService().isOfflineTime(timestamp, instrument)

Regards,
Fabrizio


 

Jump to:  

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