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.

Ordering of Data: Lists vs. Arrays
 Post subject: Ordering of Data: Lists vs. Arrays Post rating: 0   New post Posted: Fri 26 Jul, 2013, 01:08 
User avatar

User rating: 0
Joined: Fri 19 Apr, 2013, 11:35
Posts: 11
Location: Canada, Ottawa
I have been working with a new strategy and I have noted that the index numbers for a list in chronological order (ie. oldest bars to newest bars -- index of zero is oldest bar).
Example:
barList = history.getBars(tInstrument, tPeriod, OfferSide.ASK, Filter.ALL_FLATS, from, to);


For indicators that produce arrays, is it correct that the output is in reverse-chronological order (ie: index of zero is most recent bar).
Example:
fractal = indicators.fractal(tInstrument, tPeriod, OfferSide.ASK, barsOnSides, Filter.ALL_FLATS, from, to);


If this is the case, is it correct to assume that lists are in chronological order whereas arrays are in reverse-chronological order?


 
 Post subject: Re: Ordering of Data: Lists vs. Arrays Post rating: 0   New post Posted: Fri 26 Jul, 2013, 07:07 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The results both for historical data and indicator calls are in chronologically ascending order.


 

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