Array of TicksValue anywhere?
-
- Posts: 60
- Joined: 03 Mar 2011
- Has thanked: 9 times
- Been thanked: 2 times
Array of TicksValue anywhere?
I would like to look back at previous tick prices... How would I do this?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Array of TicksValue anywhere?
To reference previous bar's values (ex. previous bar's close):
Code: Select all
Bars.Close[1]
-
- Posts: 60
- Joined: 03 Mar 2011
- Has thanked: 9 times
- Been thanked: 2 times
Re: Array of TicksValue anywhere?
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!
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!
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Array of TicksValue anywhere?
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
1) Add second data series with the desired resolution and reference it from the code.
2) use DataLoader