Dukascopy
 
 
Wiki JStore Search Login

JFOREX-2405 IHistory.getBars Instrument [X/Y] not opened
 Post subject: JFOREX-2405 IHistory.getBars Instrument [X/Y] not opened Post rating: 0   New post Posted: Sun 17 Oct, 2010, 20:46 

User rating: 0
Joined: Fri 01 Oct, 2010, 09:09
Posts: 2
API ver. 2.6.18

I have a simple script which computes Hi/lo values from a period of time.. It works very well for a couple of months, but since some of later version of JForex(maybe the newest one?) It has started to throw these strange exceptions even I already have all needed pairs subscribed.


an Exception has occured in both versions(Live and Demo)

Instrument [X/Y] not opened


        List<IBar> historyBars = null;
        ITick lastTick = null;       
        double actual = 0;
               
        try
        {
            historyBars =
                _history.getBars(instr,Period.DAILY,OfferSide.BID,
                                 _history.getBarStart(Period.DAILY,g_fromTime.getTime()),
                                 _history.getStartTimeOfCurrentBar(instr,Period.DAILY));
        }
        catch (JFException e)
        {
            printErr (e.getMessage()); 
           
            return null;
        }


 
 Post subject: Re: IHistory.getBars throws (Instrument XY not opened) somet Post rating: 0   New post Posted: Mon 18 Oct, 2010, 15:49 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Does this exception recur. If does, please post your script code.


 
 Post subject: Re: IHistory.getBars throws (Instrument XY not opened) somet Post rating: 0   New post Posted: Thu 04 Nov, 2010, 12:12 

User rating: -
I get similar exception while performing such tasks - already talked to that about support but no fix so far


 
 Post subject: Re: IHistory.getBars throws (Instrument XY not opened) somet Post rating: 0   New post Posted: Thu 04 Nov, 2010, 12:15 

User rating: 0
Joined: Thu 12 Aug, 2010, 11:09
Posts: 5
i get similar exception while running such tasks live - in historical tester it seems to work fine.

already talked to this about support but no fix so far.


 
 Post subject: Re: JFOREX-2405 IHistory.getBars Instrument [X/Y] not opened Post rating: 0   New post Posted: Thu 04 Nov, 2010, 16:37 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,

There was a fixes for this problem in the latest version 2.8.1. Original post was made for the older version. Please, check it with the latest 2.8.1 version and report


 

Jump to:  

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