Market
Object in Single Market Strategies that reveals information about selected market.
Properties
// Write current price of the selected market to the logs
Log("Current price of " + Market.Asset + " on " + Market.Exchange + ": " + 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 price of the selected market to the logs
Log("Current price of " + Market.Asset + " on " + Market.Exchange + ": " + Market.CurrentPrice);
});
}
}Last updated