TimeFrameStrategy

StockSharp.Algo.Strategies

The timeframe based trade strategy.

Inherits: Strategy

Constructors

TimeFrameStrategy
protected TimeFrameStrategy(TimeSpan timeFrame)
timeFrameStrategy = TimeFrameStrategy(timeFrame)

Initialize TimeFrameStrategy.

timeFrame
The strategy timeframe.

Properties

Interval
public TimeSpan Interval { get; set; }
value = timeFrameStrategy.Interval
timeFrameStrategy.Interval = value

The strategy start-up interval. By default, it equals to TimeFrame.

TimeFrame
public TimeSpan TimeFrame { get; set; }
value = timeFrameStrategy.TimeFrame
timeFrameStrategy.TimeFrame = value

The strategy timeframe.

Methods

OnProcess
protected abstract ProcessResults OnProcess()
result = timeFrameStrategy.OnProcess()

The implementation of the trade algorithm.

Returns: The result of trade algorithm one iteration operation.

OnStarted2
protected override void OnStarted2(DateTime time)
timeFrameStrategy.OnStarted2(time)

The method is called when the Start method has been called and the ProcessState state has been taken the Started value.