Table of Contents

Interface IStrategy

Namespace
ATAS.Strategies
Assembly
ATAS.Strategies.dll

Represents a trading strategy.

public interface IStrategy
Extension Methods

Properties

AveragePrice

Gets the average price of the strategy's trades.

decimal AveragePrice { get; }

Property Value

decimal

ClosedPnL

Gets the closed profit and loss of the strategy.

decimal ClosedPnL { get; }

Property Value

decimal

Connector

Gets or sets the data feed connector for the strategy.

The host never assigns a raw connector here. ATM strategies get the StrategyDataFeed wrapper, which serves trading and reference data but throws System.NotSupportedException on market-data subscriptions and on security search; for chart strategies the property stays null. Subscribing to market data directly from a strategy is not supported - use the chart data of the strategy instead.

Added in ATAS 8.0.15.

IDataFeedConnector Connector { get; set; }

Property Value

IDataFeedConnector

CurrentPosition

Gets the current position volume of the strategy.

decimal CurrentPosition { get; }

Property Value

decimal

Name

Gets or sets the name of the strategy.

Added in ATAS 8.0.15.

string Name { get; set; }

Property Value

string

OpenPnL

Gets the open profit and loss of the strategy.

decimal OpenPnL { get; }

Property Value

decimal

Portfolio

Gets or sets the portfolio associated with the strategy.

Added in ATAS 8.0.15.

Portfolio Portfolio { get; set; }

Property Value

Portfolio

Security

Gets or sets the security associated with the strategy.

Added in ATAS 8.0.15.

Security Security { get; set; }

Property Value

Security

State

Gets the current state of the strategy.

StrategyStates State { get; }

Property Value

StrategyStates

TPlusLimit

Gets or sets the T+ limits for the strategy.

TPlusLimits? TPlusLimit { get; set; }

Property Value

TPlusLimits?

Methods

StartAsync()

Starts the strategy, allowing it to execute its trading logic.

Added in ATAS 8.0.15.

Task StartAsync()

Returns

Task

StopAsync()

Stops the strategy, terminating its execution and releasing any resources.

Added in ATAS 8.0.15.

Task StopAsync()

Returns

Task

Events

ShowNotification

Occurs when the strategy needs to show a notification or alert.

event EventHandler<StrategyNotificationEventArgs> ShowNotification

Event Type

EventHandler<StrategyNotificationEventArgs>

StateChanged

Occurs when the state of the strategy changes.

event EventHandler<StrategyStateChangedEventArgs> StateChanged

Event Type

EventHandler<StrategyStateChangedEventArgs>