Signals Help Center
  • About Signals
  • Getting Started
    • Tutorials
      • Your First Strategy
        • Create a New Strategy
        • Define Variables
        • Define Setup Method
        • Define Register Actions Method
        • Backtest
        • Deploy Strategy & Start Receiving Signals
    • Dashboard
    • Strategies
      • Strategy Tools and Settings
        • Editor
        • Strategy Detail
        • Backtests
          • Backtest Detail
          • Deploying a Backtest
          • Delete a Backtest
        • Deployments
          • Deployment Detail
          • Edit About, Rules & Alternative Markets
          • Undeploy an Active Deployment
          • (Un)Publish a Deployment
          • (Un)Follow a Deployment
          • Delete a Deployment
        • Followings
          • Following Detail
          • Unfollow a Deployment
          • Delete Record of Following
      • Strategies Marketplace
        • Follow a Strategy
        • Publish Strategy
      • Strategy Details
      • Strategy Metrics
        • Initial Capital
        • Initial Capital (USDT)
        • Strategy Balance
        • Strategy Balance (USDT)
        • Total Performance
        • Total Performance (USDT)
      • Strategy Types
        • Single Market Strategy
        • Multi Market Strategy
    • Account
      • Change Plan
      • Change or Reset Password
      • Change Name, Username, or E-mail
  • Framework Documentation
    • Strategy
      • Methods
        • Setup()
          • DataMarketplace
          • IndicatorsMarketplace
        • RegisterActions()
        • Orders Management
          • CancelOrder()
          • CancelAllPendingOrders()
          • EnterLong()
          • EnterLongLimit()
          • EnterShort()
          • EnterLongStop()
          • EnterShortLimit()
          • ExitLong()
          • EnterShortStop()
          • ExitLongLimit()
          • ExitShort()
          • ExitShortLimit()
          • ExitLongStop()
          • ExitShortStop()
        • Risk Management
          • SetProfitTarget()
          • SetStopLoss()
      • Properties
        • Market
        • Markets
        • PendingOrders
        • Position
        • Time
      • Types
        • IOrder
        • PendingOrder
    • Data
    • Logs
  • Knowledge Base
    • Vocabulary
      • Base currency
      • Deployment
      • Following
      • Quote currency
      • Strategy
    • Technical Indicators
      • Oscillators
        • Average Directional Index (ADX)
        • Momentum Indicator (MOM)
        • Moving Average Convergence Divergence (MACD)
        • Relative Strength Index (RSI)
        • Stochastic RSI (STOCH RSI)
      • Volatility
        • Average True Range (ATR)
        • Bollinger Bands (BB)
      • Trend Analysis
        • Exponential Moving Average (EMA)
        • Simple Moving Average (SMA)
        • Volume-weighted Moving Average (VWMA)
        • Weighted Moving Average (WMA)
      • Volume
        • Accumulation/Distribution Line (ADL)
  • Have a question?
    • FAQ
    • Ask on the forums
    • Contact us
Powered by GitBook
On this page
  1. Framework Documentation

Data

Also called Data stream or Data series.

PreviousPendingOrderNextLogs

Last updated 5 years ago

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 method and 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 method of your strategy and, using the 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:

// Acess properties on current or previous bars
OnUpdateOf(hourlyBars).Do(() =>
{
   var currentHigh = hourlyBars.High[0];
   var highBeforeOneHour = hourlyBars.High[1];
}); 
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]}.");
        });
    }
}

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 hourlyBars[5] - will get us bar 5 hours ago

Setup()
RegisterActions()
Setup()
RegisterActions()