> For the complete documentation index, see [llms.txt](https://help.signals.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.signals.network/framework-documentation/data.md).

# Data

Data in Signals Framework is represented by data series upon which you can register actions which define your strategy behavior. More about data series setup and registering a new action can be found in the sections dedicated to [Setup()](https://help.signals.network/~/edit/drafts/-LZJQmBDOMdfFqODYmb8/framework-documentation/untitled/methods/setup) method and [RegisterActions()](https://help.signals.network/~/edit/drafts/-LZJQmBDOMdfFqODYmb8/framework-documentation/untitled/methods/registeractions) method.

### Bars

This data series represents the most common format for working with historical price data. Each object in the series - a bar - consist of so called OHCL data - representing Open, High, Close and Low prices for the time period - and Volume.

#### Properties

| Name     | Type                 | Description                                                                                            |
| -------- | -------------------- | ------------------------------------------------------------------------------------------------------ |
| `Open`   | IDataSeries\<double> | Prices of the asset in the first trade of each bar.                                                    |
| `High`   | IDataSeries\<double> | The highest prices of the asset during the time period of each bar.                                    |
| `Close`  | IDataSeries\<double> | Prices of the asset in the last trade of each bar.                                                     |
| `Low`    | IDataSeries\<double> | The lowest prices of the asset during the time period of each bar.                                     |
| `Volume` | IDataSeries\<double> | For each bar in the bars object, you can return the volume of all transactions in that particular bar. |

#### Example

Let's say you properly define your [Setup()](https://help.signals.network/~/edit/drafts/-LZIuXzGxvM-8xfLF3pP/framework-documentation/untitled/methods/setup) method of your strategy and, using the [RegisterActions()](https://help.signals.network/~/edit/drafts/-LZIuXzGxvM-8xfLF3pP/framework-documentation/untitled/methods/registeractions) method, you define a one minute data series for the asset which you want to trade. Now, let's say your strategy needs to compare the current high with the high from one minute ago. To access those values, the code would read as follows:

{% tabs %}
{% tab title="Basic example" %}

```csharp
// Acess properties on current or previous bars
OnUpdateOf(hourlyBars).Do(() =>
{
   var currentHigh = hourlyBars.High[0];
   var highBeforeOneHour = hourlyBars.High[1];
}); 
```

{% endtab %}

{% tab title="Complete example" %}

```csharp
using Signals.DataSeries.Bars;
using Signals.Framework;

public class MyStrategy : SingleMarketStrategy
{
    private Bars hourlyBars;

    public override void Setup(DataMarketplace data, IndicatorsMarketplace indicators)
    {
        hourlyBars = data.Bars(BarPeriodType.Hour, 1).WithOffset(25);
    }

    public override void RegisterActions()
    {
        OnUpdateOf(hourlyBars).Do(() =>
        {
            Log($"High value for the current hour: {hourlyBars.High[0]}.");
            Log($"High value 5 hours ago: {hourlyBars.High[5]}.");
        });
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The most recent data are always under the index 0. Use a higher index to retrieve data from the past.

*hourlyBars\[0] -* will get us bar at current hour\
\&#xNAN;*hourlyBars\[5]* - will get us bar 5 hours ago
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.signals.network/framework-documentation/data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
