Property of type DateTime that contains timestamp of the current bar.
// Write current time and price to the logs
Log("Current price at " + Time + ": " + Market.CurrentPrice);
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(() =>
{
// Write current time and price to the logs
Log("Current price at " + Time + ": " + Market.CurrentPrice);
});
}
}