algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::strategy::GuardDecision Struct Reference

What RiskGuard::evaluate concluded about one order. More...

#include <algotradelib/src/strategy/risk.hpp>

Public Attributes

std::optional< GuardRejection > rejection_
 Why the order was refused, or std::nullopt if it was permitted.
bool admitted_outside_phase_ {false}
 Whether the order was permitted only because it closes toward flat in a phase the limits do not permit. Always false for a refusal.

Detailed Description

What RiskGuard::evaluate concluded about one order.

admitted_outside_phase_ is true only for a permitted order that got past RiskLimits::permitted_phases_ by closing toward flat. It does not mean the order was sent: the broker can still reject it.

Definition at line 686 of file risk.hpp.

Member Data Documentation

◆ admitted_outside_phase_

bool algotradelib::strategy::GuardDecision::admitted_outside_phase_ {false}

Whether the order was permitted only because it closes toward flat in a phase the limits do not permit. Always false for a refusal.

Definition at line 693 of file risk.hpp.

◆ rejection_

std::optional<GuardRejection> algotradelib::strategy::GuardDecision::rejection_

Why the order was refused, or std::nullopt if it was permitted.

Definition at line 688 of file risk.hpp.

Referenced by algotradelib::strategy::RiskGuard::check().


The documentation for this struct was generated from the following file: