|
void | SetSettings (TSettings settings) |
|
new TSettings | GetSettings () |
|
bool IEnumerable< string > Errors | IsValidSettings (TSettings settings, decimal? expectedPositionVolume=null, decimal? expectedPositionPrice=null) |
|
Task | RetryAsync () |
|
Task | CancelAsync () |
|
Task | ResetOrdersAsync () |
|
Task | CancelOrdersAsync (IEnumerable< Order > orders) |
|
bool | IsStopLoss (Order order) |
|
bool | IsTakeProfit (Order order) |
|
IATMStrategy | Clone (bool cloneOrders=true) |
|
void | SetSettings (IStopProfitSettings settings) |
|
IStopProfitSettings | GetSettings () |
|
bool IEnumerable< string > Errors | IsValidSettings (IStopProfitSettings settings, decimal? expectedPositionVolume=null, decimal? expectedPositionPrice=null) |
|
void | Start () |
|
void | Stop () |
|
async Task | StartAsync () |
| Starts the strategy, allowing it to execute its trading logic.
|
|
async Task | WatchAsync () |
|
async Task | StartFromWatchAsync () |
|
async Task | StopAsync () |
| Stops the strategy, terminating its execution and releasing any resources.
|
|
async void | OpenOrder (Order order, bool isAutomated=true) |
| Открыть ордер.
|
|
async Task | OpenOrderAsync (Order order, bool isAutomated=true) |
| Открыть ордер.
|
|
async void | ModifyOrder (Order order, Order neworder, bool isAutomated=true) |
| Изменить ордер.
|
|
async Task | ModifyOrderAsync (Order order, Order neworder, bool isAutomated=true) |
| Изменить ордер.
|
|
async void | CancelOrder (Order order, bool isAutomated=true) |
| Отменить ордер.
|
|
async Task | CancelOrderAsync (Order order, bool isAutomated=true) |
| Отменить ордер.
|
|
Task | StartAsync () |
| Starts the strategy, allowing it to execute its trading logic.
|
|
Task | StopAsync () |
| Stops the strategy, terminating its execution and releasing any resources.
|
|
Task | WatchAsync () |
|
Task | StartFromWatchAsync () |
|
Task | RetryAsync () |
|
Task | CancelAsync () |
|
Task | ResetOrdersAsync () |
|
bool | IsStopLoss (Order order) |
|
bool | IsTakeProfit (Order order) |
|
Task | OpenOrderAsync (Order order, bool isAutomated=true) |
|
Task | ModifyOrderAsync (Order order, Order newOrder, bool isAutomated=true) |
|
Task | CancelOrderAsync (Order order, bool isAutomated=true) |
|
Task | CancelOrdersAsync (IEnumerable< Order > orders) |
|
IATMStrategy | Clone (bool cloneOrders=true) |
|
void | SetSettings (IStopProfitSettings settings) |
|
IStopProfitSettings | GetSettings () |
|
bool IEnumerable< string > Errors | IsValidSettings (IStopProfitSettings settings, decimal? expectedPositionVolume=null, decimal? expectedPositionPrice=null) |
|
void | SetSettings (TSettings settings) |
|
new TSettings | GetSettings () |
|
bool IEnumerable< string > Errors | IsValidSettings (TSettings settings, decimal? expectedPositionVolume=null, decimal? expectedPositionPrice=null) |
|
|
async Task | ProcessAfterDelay (TimeSpan? delay=null) |
|
void | Process (bool isPositionChanged=false, bool isOrdersChanged=false, bool isSettingsChanged=false) |
|
decimal | GetPriceValue (decimal price, PriceUnit value, decimal sign) |
|
bool | IsEquals (Order first, Order second, bool isStop, bool comparePrices) |
|
Order | TryAttachOrder (string type, Order order, StrategyOrderId orderId, string prefix) |
|
Order | CreateStopOrder (OrderDirections direction, decimal sl, decimal volume, string prefix) |
|
Order | CreateTakeOrder (OrderDirections direction, decimal tp, decimal volume, string prefix) |
|
async Task< bool > | TryCancelStopOrTake (string type, Order order, string message, string prefix, bool retryOnError) |
|
async Task< Order > | TryProcessStopOrTake (string type, Order oldOrder, OrderDirections direction, PriceUnit? currentValue, int positionSign, decimal volume, string prefix, bool isPositionChanged) |
|
async Task< bool > | TryCancelSecondOrder (string type, Order order, string prefix) |
|
void | ResetCustomStopAndTakePrices () |
|
void | ResetWatchState () |
|
virtual void | OnProcessOrder (Order order) |
|
abstract Task | OnCancelAll (bool retryOnError) |
|
abstract Task< bool > | OnCancelSecondOrder (Order order) |
|
abstract Task | OnProcess (ChangesInfo info) |
|
abstract void | OnResetCustomStopAndTakePrices () |
|
abstract void | OnResetStopTakeOrderId () |
|
abstract void | DisableStopAndTake () |
|
abstract void | OnAttachStopAndTakeOrdersFailed () |
|
abstract bool | SetStopOrTakeCustomPrice (Order currentStopOrTake, Order newOrder) |
|
abstract bool | SetStopOrTakeCancelledManually (Order order, string type) |
|
abstract void | OnSetSettings (TSettings settings) |
|
abstract TSettings | OnGetSettings () |
|
abstract ICollection< string > | OnIsValidSettings (TSettings settings, decimal positionVolume, decimal positionPrice, decimal currentPrice) |
|
override async Task | OnStarted () |
| Called when the strategy is started from StrategyStates.Stopped state.
|
|
override async Task | OnStartedFromWatch () |
| Called when the strategy is started from StrategyStates.Watch state.
|
|
override async Task | OnStopping () |
| Called when the strategy is stopping.
|
|
override Task | OnRetry () |
|
override async Task | OnCancel () |
|
override Task | OnResetOrders () |
|
override void | OnCurrentPositionChanged () |
| Called when the volume of the current position changes.
|
|
override async Task | OnModifyOrder (Order order, Order newOrder, bool isAutomated) |
| Called when an existing order is modified.
|
|
override async Task | OnCancelOrder (Order order, bool isAutomated) |
| Called when an order is canceled.
|
|
override async Task | OnCancelOrdersAsync (IEnumerable< Order > orders) |
|
override void | OnNewOrder (Order order) |
| Called when a new order is added.
|
|
override void | OnOrderChanged (Order order) |
| Called when an existing order is changed.
|
|
override void | OnSetStopProfitSettings (IStopProfitSettings settings) |
|
override IStopProfitSettings | OnGetStopProfitSettings () |
|
| override (bool IsValid, IEnumerable< string > Errors) OnIsValidStopProfitSettings(IStopProfitSettings settings |
|
virtual Task | OnRetry () |
|
virtual Task | OnCancel () |
|
virtual Task | OnResetOrders () |
|
virtual TStrategy | CreateNew () |
|
virtual void | CommitChanges (TStrategy model, bool cloneOrders) |
|
abstract Task | OnCancelOrdersAsync (IEnumerable< Order > orders) |
|
abstract bool | IsStopOrder (Order order) |
|
abstract bool | IsTakeOrder (Order order) |
|
abstract void | OnSetStopProfitSettings (IStopProfitSettings settings) |
|
abstract IStopProfitSettings | OnGetStopProfitSettings () |
|
abstract bool IEnumerable< string > Errors | OnIsValidStopProfitSettings (IStopProfitSettings settings, decimal? positionVolume, decimal? positionPrice) |
|
void | RaiseSettingsChanged () |
|
void | ThrowIfNotStarted () |
|
override bool | CanUpdateCurrentPosition (Position position) |
| Checks if the current position can be updated with the specified position.
|
|
override void | LogParameters () |
| Log current parameters.
|
|
| Strategy () |
|
void | SetState (StrategyStates state) |
| Set strategy state.
|
|
void | SetErrorState (StrategyErrorTypes type, string[] errorDescriptions) |
| Set StrategyStates.Error state.
|
|
void | ResetErrorState () |
| Reset error state.
|
|
void | RaisePropertyChanged (string propertyName) |
| Raises the PropertyChanged event with the specified property name.
|
|
void | RaiseShowNotification (string message, string title=null, bool isError=false) |
| Raises the ShowNotification event with the specified message, title, and error flag.
|
|
bool | SetProperty< TValue > (ref TValue storage, TValue newValue, string propertyName, Action< TValue, TValue > onChanged=null) |
| Sets the property with the specified name to the new value and raises the PropertyChanged event if the value has changed.
|
|
string | GetOCOGroup () |
| Generates a unique OCO (One-Cancels-the-Other) group identifier based on the current timestamp.
|
|
bool | CanProcess (Order order) |
| Checks if the specified order can be processed by this strategy.
|
|
ICollection< MyTrade > | FilterMyTrades (IEnumerable< MyTrade > trades) |
| Filters and returns the collection of MyTrade that belong to the current portfolio and security and have occurred after the latest trade time.
|
|
void | UpdateCurrentPosition () |
| Update thr CurrentPosition and AveragePrice values.
|
|
virtual Task | OnStarted () |
| Called when the strategy is started from StrategyStates.Stopped state.
|
|
virtual Task | OnStartedFromWatch () |
| Called when the strategy is started from StrategyStates.Watch state.
|
|
virtual Task | OnStopping () |
| Called when the strategy is stopping.
|
|
virtual Task | OnStopped () |
| Called when the strategy is stopped.
|
|
virtual Task | OnOpenOrder (Order order, bool isAutomated) |
| Called when a new order is opened.
|
|
virtual Task | OnModifyOrder (Order order, Order newOrder, bool isAutomated) |
| Called when an existing order is modified.
|
|
virtual Task | OnCancelOrder (Order order, bool isAutomated) |
| Called when an order is canceled.
|
|
virtual void | OnMarketDepth (IEnumerable< MarketDepth > depths) |
| Called when market depth data is received.
|
|
virtual void | OnBestBidAsk (MarketDepth depth) |
| Called when the best bid or ask market depth data is received.
|
|
virtual void | OnNewTrade (Trade trade) |
| Called when a new trade occurs.
|
|
virtual void | OnNewPortfolio (Portfolio portfolio) |
| Called when a new portfolio is added.
|
|
virtual void | OnNewPosition (Position position) |
| Called when a new position is added.
|
|
virtual void | OnPositionChanged (Position position) |
| Called when an existing position is changed.
|
|
virtual void | OnPnLChanged (int ticks) |
| Called when the profit and loss (PnL) changes.
|
|
virtual void | OnNewOrder (Order order) |
| Called when a new order is added.
|
|
virtual void | OnOrderChanged (Order order) |
| Called when an existing order is changed.
|
|
virtual void | OnOrderRegisterFailed (Order order, string message) |
| Called when an order registration fails.
|
|
virtual void | OnOrderCancelFailed (Order order, string message) |
| Called when an order cancellation fails.
|
|
virtual void | OnOrderModifyFailed (Order order, Order newOrder, string message) |
| Called when an order modification fails.
|
|
virtual void | OnNewMyTrade (MyTrade myTrade) |
| Called when a new trade is added to the collection of MyTrade.
|
|
virtual void | OnCurrentPositionChanged () |
| Called when the volume of the current position changes.
|
|
virtual void | OnUpdateStrategyState () |
| Called when the strategy state needs to be updated.
|
|
virtual bool | CanProcess () |
| Checks if the strategy can process operations in the current state.
|
|
virtual bool | CanUpdateCurrentPosition (Position position) |
| Checks if the current position can be updated with the specified position.
|
|
virtual void | LogParameters () |
| Log current parameters.
|
|
|
abstract bool | IsStopOrderAttached [get] |
|
abstract bool | IsTakeOrderAttached [get] |
|
TimeSpan | ProcessTimeout [get, set] |
|
TimeSpan | AttachOrdersPeriod = TimeSpan.FromSeconds(30) [get] |
|
TimeSpan | RetryPeriodOnConnectionError = TimeSpan.FromSeconds(2) [get] |
|
TimeSpan | RetryPeriodOnOrderError = TimeSpan.FromMilliseconds(500) [get] |
|
TimeSpan | RetryPeriod = TimeSpan.FromMilliseconds(200) [get] |
|
abstract bool | HasActiveOrders [get] |
|
IStrategyMarketDataProvider | MarketDataProvider [get, set] |
|
TimeInForce | TimeInForce [get, set] |
|
Security | Security [get, set] |
| Gets or sets the security associated with the strategy.
|
|
Portfolio | Portfolio [get, set] |
| Gets or sets the portfolio associated with the strategy.
|
|
TPlusLimits? | TPlusLimit [get, set] |
| Gets or sets the T+ limits for the strategy.
|
|
IDataFeedConnector | Connector [get, set] |
| Gets or sets the data feed connector for the strategy.
|
|
IEnumerable< MyTrade > | MyTrades [get] |
|
IEnumerable< Order > | Orders [get] |
|
Position | Position [get, set] |
|
decimal | CurrentPosition [get] |
| Gets the current position volume of the strategy.
|
|
decimal | AveragePrice [get] |
| Gets the average price of the strategy's trades.
|
|
int | OpenTicksPnL [get] |
|
decimal | OpenPnL [get] |
| Gets the open profit and loss of the strategy.
|
|
decimal | ClosedPnL [get] |
| Gets the closed profit and loss of the strategy.
|
|
MarketDepth | BestBid [get] |
|
MarketDepth | BestAsk [get] |
|
StrategyStates | State [get, protected set] |
| Gets the current state of the strategy.
|
|
StrategyStateDescription | StateDescription [get] |
|
string | Name [get, set] |
| Gets or sets the name of the strategy.
|
|
string | Name [get, set] |
| Gets or sets the name of the strategy.
|
|
StrategyStates | State [get] |
| Gets the current state of the strategy.
|
|
decimal | CurrentPosition [get] |
| Gets the current position volume of the strategy.
|
|
decimal | AveragePrice [get] |
| Gets the average price of the strategy's trades.
|
|
decimal | OpenPnL [get] |
| Gets the open profit and loss of the strategy.
|
|
decimal | ClosedPnL [get] |
| Gets the closed profit and loss of the strategy.
|
|
Security | Security [get, set] |
| Gets or sets the security associated with the strategy.
|
|
Portfolio | Portfolio [get, set] |
| Gets or sets the portfolio associated with the strategy.
|
|
TPlusLimits? | TPlusLimit [get, set] |
| Gets or sets the T+ limits for the strategy.
|
|
IDataFeedConnector | Connector [get, set] |
| Gets or sets the data feed connector for the strategy.
|
|
bool | HasActiveOrders [get] |
|
IStrategyMarketDataProvider | MarketDataProvider [get, set] |
|