Array of TicksValue anywhere?

Questions about MultiCharts .NET and user contributed studies.
AntiMatter
Posts: 60
Joined: 03 Mar 2011
Has thanked: 9 times
Been thanked: 2 times

Array of TicksValue anywhere?

Postby AntiMatter » 20 Nov 2013

I would like to look back at previous tick prices... How would I do this?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Array of TicksValue anywhere?

Postby Henry MultiСharts » 20 Nov 2013

To reference previous bar's values (ex. previous bar's close):

Code: Select all

Bars.Close[1]

AntiMatter
Posts: 60
Joined: 03 Mar 2011
Has thanked: 9 times
Been thanked: 2 times

Re: Array of TicksValue anywhere?

Postby AntiMatter » 20 Nov 2013

On a 1-minute chart, this would be the previous close of the 1-minute bar. However, I would like to look at the previous tick.

I can (for example) do this:

Output.WriteLine(Bars.Ticks[1].ToString())

However, I would also like to be able to do something like this:

Bars.TicksValue[0].ToString()

However, TicksValue is not an array, it only stores the last tick value. E.g. I want to access tick values, but from a 1-minute bar. This might seem a little strange, I guess!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Array of TicksValue anywhere?

Postby Henry MultiСharts » 21 Nov 2013

There are two ways to do that:
1) Add second data series with the desired resolution and reference it from the code.
2) use DataLoader


Return to “MultiCharts .NET”