Data
Also called Data stream or Data series.
Bars
Properties
Example
// 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]}.");
});
}
}Last updated