Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 15:07:39 +0000



[Programming Help] - Where does the sc.Index, sc.CurrentIndex indexing start?

View Count: 513

[2020-09-24 17:40:49]
mbilyanov - Posts: 62
I understand this is an index used for autolooping etc.

...
current sc.Index value is 0
data[sc.Index] Same as data[0]

current sc.Index value is 1
data[sc.Index] Same as data[1]

current sc.Index value is 2
data[sc.Index] Same as data[2]
...

On a 1 min chart, 16:00:00 - 16:59:59 is being displayed and the time now is 16:59:57
so the last bar is still being drawn, we have not finished 16:59:59 and moved into 17:00:00

So the bars are like the following, from left to right:

> 16:00:00-16:00:59
> 16:01:00-16:01:59
> 16:02:00-16:02:59
...
...
...
> 16:57:00-16:57:59
> 16:58:00-16:58:59
> 16:59:00-16:59:59 -- latest bar still drawing.

So is index 0 the most outer bar or data slice on the right side? The newest? The one at 16:59:59, the one that is still being painted and not closed yet?

Or is it he most outer data slice on the left side (let's say 16:00:00-16:00:59)
[2020-09-25 11:18:07]
bradh - Posts: 846
Index 0 is the first bar which is also the oldest bar.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account