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.

List<IBar> sumBars
 Post subject: List<IBar> sumBars Post rating: 0   New post Posted: Sat 23 Feb, 2013, 18:12 
User avatar

User rating: 0
Joined: Wed 07 Sep, 2011, 16:30
Posts: 7
Location: China,
Hello Support,

I want to put Bars(from bars 0 to bars 24) into List<IBar>sumBars, but it shows error. Could you please tell me how to correct the mistakes?

Thank you.

public List<IBar>  sumBars;
...
private double funHighest() throws JFException
{
      double highrange = 0;
    
      sumBars = history.getBars(this.instrument, this.timeFrame, this.offerSide, 0, 24);  //This sentence shows error.
    
     for(IBar curbar : sumBars)
     {
        if(highrange < curbar.getHigh())
           highrange = curbar.getHigh();
     }
    
      return highrange;
}


 
 Post subject: Re: List<IBar> sumBars Post rating: 0   New post Posted: Mon 25 Feb, 2013, 08:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please provide a full example strategy.


 

Jump to:  

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