Index

Created at 14 Dec 2012, 17:07
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
lec0456's avatar

lec0456

Joined 14.11.2012

Index
14 Dec 2012, 17:07


When calculating results do you use index as the value or index -1

 

for example,

do I use

decimal open1 = (decimal)MarketSeries.Open[index];

or 

decimal open1 = (decimal)MarketSeries.Open[index-1];

 

 

 


@lec0456
Replies

admin
10 Jan 2013, 09:48

It depends on the logic of your algorithm.  In indicators, using the previous index of MarketSeries.High/Low/Close will be more accurate than the current index. The reason is that these values change at each tick.  If you like explain further what you are trying to accomplish so that we can advise you which index to use.


@admin