IStrategy

StockSharp.Algo.Strategies

The external contract of a strategy: the provider surfaces it exposes plus the strategy-specific members.

Implements: INotifyPropertyChangedEx, INotifyPropertyChanged, IMarketRuleContainer, ILogReceiver, ILogSource, IDisposable, IMarketDataProvider, ISubscriptionProvider, ISecurityProvider, ISecurityMessageProvider, ITransactionProvider, IPortfolioProvider, IPositionProvider, ITimeProvider, IReportSource

Properties

ErrorState
public LogLevels ErrorState { get; }
value = iStrategy.ErrorState

The error state.

LastError
public Exception LastError { get; }
value = iStrategy.LastError

The last error.

Name
public string Name { get; }
value = iStrategy.Name

Strategy name. Re-declared to unify the name inherited from both ILogSource and IReportSource, which are otherwise ambiguous through this interface.

Portfolio
public Portfolio Portfolio { get; set; }
value = iStrategy.Portfolio
iStrategy.Portfolio = value

The portfolio.

Security
public Security Security { get; set; }
value = iStrategy.Security
iStrategy.Security = value

The security.

Methods

RaiseParametersChanged
public void RaiseParametersChanged(string name)
iStrategy.RaiseParametersChanged(name)

Raise the parameters-changed notification for the parameter with the specified name.

name
Parameter name.
Start
public void Start()
iStrategy.Start()

Start the strategy.

Stop
public void Stop()
iStrategy.Stop()

Stop the strategy.

Events

Error
public event Action<IStrategy, Exception> Error
iStrategy.Error += handler

The error event.

OrderRegistered
public event Action<Order> OrderRegistered
iStrategy.OrderRegistered += handler

The event of order registration.

PnLChanged
public event Action PnLChanged
iStrategy.PnLChanged += handler

The profit-loss change event.

ProcessStateChanged
public event Action<IStrategy> ProcessStateChanged
iStrategy.ProcessStateChanged += handler

The ProcessState change event.