Profile Picture

Suggest RList and ISeries API change

Posted By mulyoved 7 Years Ago
Message
Posted Sunday October 10 2010
If I can suggest

ISeries add
double this[int barsBack] { get; }

So instead of

High.LookBack(x)

can do

High[x]

Which is more elegant and more compatible with other platforms
Same change should be done to RList

Does it make sense?

Muly
Posted Sunday October 10 2010
We used to use the indexers, but we had it so that High[0] was the very first value, so if you wanted the most recent high you would have to use High[High.Count - 1]. This wasn't very convenient. So we switched it so that series were indexed based at the current bar. However, we didn't want people to be able to run systems that were written the old way without modifying them (since they would not work correctly unless modified). So we switched from using the indexers to the LookBack method to force them to change the code.

It's been long enough since this happened that we probably don't need to worry much about systems written the "old" way. So in the future we will probably add the indexers (while still leaving the LookBack methods too).

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems