Table of Contents

Class OrderCheckResult

Namespace
ATAS.Indicators.Trading
Assembly
ATAS.Indicators.dll

The answer of OnCheckAsync(TradeOperation, CancellationToken): allow the operation or reject it with a reason.

        <p>Not in ATAS 8.0.15 yet: available from the next version.</p>
public sealed class OrderCheckResult
Inheritance
object
OrderCheckResult
Extension Methods

Fields

MaxReasonLength

The longest reason shown to the trader; a longer one is cut.

public const int MaxReasonLength = 500

Field Value

int

Properties

Allow

The operation may go on (to the next interceptor, then to the broker).

public static OrderCheckResult Allow { get; }

Property Value

OrderCheckResult

IsAllowed

True if the operation is allowed.

public bool IsAllowed { get; }

Property Value

bool

Reason

Why the operation was rejected, as the trader sees it after "Rejected by <name>:"; null when it is allowed.

public string? Reason { get; }

Property Value

string

Methods

Reject(string)

Rejects the operation. The reason is shown to the trader and written to the platform log; give one the trader understands ("Daily loss limit of 500 USD reached"). An empty reason is replaced by a generic text, a longer one than MaxReasonLength is cut.

public static OrderCheckResult Reject(string reason)

Parameters

reason string

Why the operation is rejected.

Returns

OrderCheckResult