TickZoom/Arrays

TickZoom C# Arrays

How TickZoom C# Arrays Work

In TickZoom C# these arrays are returned as interfaces.

The interfaces have an indexer so you can access them just like any array. However, it operates differently than an ordinary array in C# and must more like EasyLanguage arrays.

  1. The index 0 refers to the latest value, index 1 refers to the value prior in time and so on. In this way it functions much like arrays in EasyLanguage .
  2. When you refer to a previous element like high[5] that means the 5th prior value, then TickZoom automatically waits to call your model until it has 5 previous values available. This happens just like Easy Language and simplifies your model so you never have to perform "bounds checking" in your model code.
  3. The Prices interface also offers a Count property which tells you how many values are in the array. This is useful if you need to loop through all the values.
  4. The Prices interface also has a BarCount property which tells you how many values have been added to the array since it was created. Note that this can be more than the Count property because the system never needs to keep more previous values in the array than you actually use in your model.
  5. One major enhancement in the Prices interface over the EasyLanguage or AmiBroker Formula Language arrays is that that all the bars may have different time intervals. So you must realize then that the index 1 on one Bars collection will refer to the bar 5 minutes ago while the index 1 on another set of Bars indicates 10 seconds ago depending on the interval defined per each set of Bars.
  6. For the Prices and Times interfaces, you can only read values from these array. That protects your trading model defeating the accuracy of you model results by inadvertently changing the time series input data.

Different Types of Arrays in TickZoom C#

Prices

These arrays only refer to price or volume data and are read only.

Times

These arrays only refer to timestamps for bars like begin or end time and also are read only.

Integers

These arrays contains integer values and are for your use in writing models. They work exactly like the Prices array except you can create them and modify the contents as you wish inside your trading models. C# int

Doubles

These work just like Integers except they contain floating point numbers. C# double

Longs

Again, these work just like integers except they contain large integer numbers. C# long

Indicator

Indicators operate exactly like Doubles arrays.

Values

Values is a specialized interface which "wraps" any of the above and is used by formulas so that you can pass any off the above arrays to the formula. It converts any int or long values into doubles.

can you point to some examples. In the scenario, that i am looking at, i would like to store some booleans that indicate that the CCI has crossed above 200.