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.

current weekly candle is null
 Post subject: current weekly candle is null Post rating: 0   New post Posted: Mon 20 Feb, 2012, 16:14 

User rating: -
hi,

Today is Monday 20.02.2012 and suprisingly I cannot access the current weekly candle on EURUSD using the following code lines:

  IBar bar1 = history.getBar(instrument, Period.WEEKLY, OfferSide.BID, 0);            
    if(bar1== null) 
         console.getOut().println("ERROR: no candle available!! " ) ; 
   else
         console.getOut().println("hurraaaa: candle available!! " ) ;


it returns null with the message "ERROR: no candle available!! "

well the same code works fiine with Period.ONE_HOUR or Period.ONE_MIN...could you explain why I cannot access the current weekly candle with index 0? The weekly candle with index 1 is available...

Thanks!


 
 Post subject: Re: current weekly candle is null Post rating: 0   New post Posted: Tue 21 Feb, 2012, 10:47 

User rating: -
It seems that on Tuesday on the very next day the weekly candle is there! with opening time 2012-02-20 1:00. On Monday I was trying to get it all day long but it returned only null..... any explanation???


ccadar wrote:
hi,

Today is Monday 20.02.2012 and suprisingly I cannot access the current weekly candle on EURUSD using the following code lines:

  IBar bar1 = history.getBar(instrument, Period.WEEKLY, OfferSide.BID, 0);            
    if(bar1== null) 
         console.getOut().println("ERROR: no candle available!! " ) ; 
   else
         console.getOut().println("hurraaaa: candle available!! " ) ;


it returns null with the message "ERROR: no candle available!! "

well the same code works fiine with Period.ONE_HOUR or Period.ONE_MIN...could you explain why I cannot access the current weekly candle with index 0? The weekly candle with index 1 is available...

Thanks!


 
 Post subject: Re: current weekly candle is null Post rating: 0   New post Posted: Tue 21 Feb, 2012, 13:42 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Apparantly there has been a datacache problem, if the problem does persist, please clean your local historical data cache for the particular instrument.


 

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