363 return (
static_cast<std::uint32_t
>(enabled)
364 &
static_cast<std::uint32_t
>(requested)) != 0u;
415 using value_type = std::variant<none, lower_tf, synthesized>;
420 bool is_none() const noexcept {
return std::holds_alternative<none>(
value); }
428 return std::get_if<synthesized>(&
value);
576 std::optional<NativeRiskLimits>
risk;
740 constexpr explicit operator bool() const noexcept {
return ok(); }
774 const std::vector<NativeTimeframeSubscription>& subscriptions,
775 const std::string& input_tf,
bool timeframe_undetected)
noexcept;
783 const std::vector<NativeTimeframeSubscription>& subscriptions,
784 const std::string& input_tf,
bool timeframe_undetected,
785 const std::optional<NativeAuxiliaryFeed>& auxiliary_feed)
noexcept;
794 const std::optional<NativeAuxiliaryFeed>& auxiliary_feed,
795 const std::string& input_tf,
bool timeframe_undetected)
noexcept;
811 const std::vector<NativeTimeframeSubscription>& subscriptions)
noexcept;
851static_assert(std::is_trivially_copyable_v<NativeRunSpecValidation>);
852static_assert(std::is_nothrow_move_constructible_v<NativeRunSpec>);
853static_assert(std::is_nothrow_move_assignable_v<NativeRunSpec>);
NativeRunSpecError
Why a field was refused.
@ UnknownCalculationTrigger
@ InvalidSubscriptionTimeframe
@ SubscriptionFinerThanAuxiliaryFeed
@ InvalidUndetectedTimeframe
@ UnknownLiquidationSizing
@ UnorderedAuxiliaryFeedBars
@ UnorderedSubscriptionBars
@ SubscriptionWithoutAuxiliaryFeed
@ SubscriptionWithoutTimeframe
@ DuplicateSubscriptionTimeframe
@ InvalidAuxiliaryFeedTimeframe
@ UnknownLiquidationCheck
@ UnknownIntrabarSampleEligibility
@ AuxiliaryFeedNotFinerThanInput
@ UnknownLiquidationLevelBase
@ UnknownMarginEquityBasis
@ AuxiliaryFeedWithoutTimeframe
@ SubscriptionFinerThanInput
@ InvalidAuxiliaryFeedBar
NativeLiquidationSizing
Which units a kernel-issued liquidation reduces (L4).
NativeRunSpecValidation validate_native_timeframe_subscriptions(const std::vector< NativeTimeframeSubscription > &subscriptions, const std::string &input_tf, bool timeframe_undetected) noexcept
Exactly the part of validate_native_run_spec that judges declared higher-timeframe series,...
NativeCalculationTrigger
When the kernel asks the host to calculate.
NativeRiskDay
Which day a risk limit's "day" is.
NativeSeriesSource
One declared higher-timeframe series of the run's own symbol, the native equivalent of request....
NativeRunSpecValidation validate_native_auxiliary_feed(const std::optional< NativeAuxiliaryFeed > &auxiliary_feed, const std::string &input_tf, bool timeframe_undetected) noexcept
Exactly the part of validate_native_run_spec that judges the auxiliary feed, against a stated input t...
constexpr bool native_feed_tolerance_enabled(NativeFeedTolerance enabled, NativeFeedTolerance requested) noexcept
Whether one NativeFeedTolerance bit is set in a run's mask.
NativeRunSpecValidation normalize_native_run_spec(NativeRunSpec &spec) noexcept
Validate the WHOLE value first, then canonicalize its admitted numeric negative zero (fee_value) to p...
NativeReportPolicy
Who records the per-script-bar report series.
@ KernelRecordedAtHostMarks
NativeCloseExecution
When a request born at a script calculation may first match.
NativeLiquidationLevelBase
Which base the liquidation level is solved from.
constexpr bool native_legacy_tolerance_enabled(NativeFeedTolerance enabled, NativeFeedTolerance requested) noexcept
Deprecated spelling of native_feed_tolerance_enabled.
NativeOpenBarView
What a bar-open callback is handed.
std::uint64_t native_margin_model_digest(const NativeMarginModel &margin) noexcept
Exact FNV-1a content digest for the generic margin model.
NativePriceGrid
A generic instrument price grid.
@ QuantizeFillsAndTriggers
NativePathOrder
Generic ordering for a modeled OHLC path.
NativeSlotLabelPolicy
Native hosts normally require every confirmed bar to name a canonical input slot.
@ LegacyTolerant
Deprecated spelling of FeedTolerant; identical value, kept so existing hosts and the source adapter c...
NativeOpenDirections
Which opening directions the run admits at all.
NativeAbortReporting
Abort presentation is a run-level policy rather than an exception-path convention.
NativeFeedTolerance
Explicit, opt-in admission exceptions for a tolerated input-feed shape.
@ WarmupNonNegativeOHLC
Source-compatible stream warmups admit finite, non-negative interim OHLC values.
@ BatchStructuralBars
Match the batch structural check: finite OHLC values need not be positive, and NaN volume means unava...
NativeRiskAction
What a breach does.
std::uint64_t native_risk_limits_digest(const NativeRiskLimits &risk) noexcept
Exact FNV-1a content digest for the generic risk limits.
std::uint64_t native_run_spec_digest(const NativeRunSpec &spec) noexcept
Machine-independent digest of a run spec: exactly the fields the consumer folds into the continuation...
NativeFeedTolerance NativeLegacyTolerance
Deprecated spelling of the tolerance type.
std::uint64_t native_intrabar_path_digest(const IntrabarPath &path) noexcept
Exact FNV-1a content digest for a retained intrabar path.
NativeFeeKind
Encodings coincide with the versioned native-v1 C transport.
std::uint64_t native_timeframe_subscriptions_digest(const std::vector< NativeTimeframeSubscription > &subscriptions) noexcept
Exact FNV-1a content digest for the declared higher-timeframe series.
NativeLiquidationCheck
When the kernel tests the maintenance requirement.
NativeRunSpecField
Which field a validation refused, in deterministic first-error order.
@ IntrabarSampleEligibility
@ MarginShortfallMultiple
std::uint64_t native_auxiliary_feed_digest(const NativeAuxiliaryFeed &feed) noexcept
Exact FNV-1a content digest for the declared auxiliary feed: its timeframe literal and every bar in c...
NativeGridRounding
HalfUp is the nearest tick with ties away from zero.
NativeMarginEquityBasis
Which equity the maintenance requirement is tested against.
@ MarkedEquityBeforeOpenCommission
NativeRunSpecValidation validate_native_run_spec(const NativeRunSpec &spec) noexcept
Complete validation, with deterministic first-error field order.
A RETAINED finer feed: the host's own lower-timeframe bars, the literal they are at,...
SampleEligibility sample_eligibility
int volume_weighted_min_samples
int volume_weighted_max_samples
MagnifierDistribution distribution
No intrabar path: the confirmed OHLC waypoints are the whole modeled walk, and on_native_sub_bar neve...
A synthesized path has no retained lower feed.
MagnifierDistribution distribution
int volume_weighted_min_samples
int volume_weighted_max_samples
An owned lower-timeframe execution path.
const lower_tf * lower() const noexcept
The retained finer feed, or nullptr when this is not the lower_tf alternative.
@ ContinuousSegments
Native hosts retain continuous matching between generated samples unless they explicitly request poin...
bool is_none() const noexcept
Whether this run declares no intrabar path at all.
std::variant< none, lower_tf, synthesized > value_type
The three alternatives as one value.
synthesized * synthesized_path() noexcept
The mutable synthesized sampling policy, or nullptr.
lower_tf * lower() noexcept
The mutable retained finer feed, or nullptr; a staged spec's feed is copied by configure_native,...
const synthesized * synthesized_path() const noexcept
The synthesized sampling policy, or nullptr when this is not that alternative.
An auxiliary feed of the run's OWN symbol at a timeframe strictly finer than the input: the bars the ...
A generic per-side broker margin model (L4).
std::optional< double > liquidation_min_units
NativeLiquidationLevelBase level_base
NativeLiquidationCheck check
NativeLiquidationSizing sizing
std::optional< double > maintenance_long
NativeMarginEquityBasis basis
std::string liquidation_comment
std::string liquidation_label
double shortfall_multiple
std::optional< double > maintenance_short
Generic account risk limits (L9), entirely opt-in: a spec that leaves NativeRunSpec::risk unset evalu...
std::optional< std::uint32_t > max_fills_per_day
std::optional< NativeLossLimit > max_intraday_loss
std::optional< std::uint32_t > max_consecutive_loss_days
std::optional< NativeLossLimit > max_drawdown
Allocation-free facts suitable for the host's durable failure variant.
constexpr bool ok() const noexcept
One complete setup value, staged/copied by NativeStrategyHost before it is applied at begin.
NativeSlotLabelPolicy slot_label_policy
Strict native hosts retain the canonical slot-label rule.
std::uint32_t max_recalculations_per_point
NativeFeedTolerance legacy_tolerance
NativePathOrder path_order
NativeCalculationTrigger calculation
Calculation timing.
std::vector< NativeTimeframeSubscription > subscriptions
Declared higher-timeframe series.
NativeCloseExecution close_execution
NativeOpenDirections allowed_open_directions
std::string chart_timezone
std::optional< double > quantity_grid
std::optional< NativeRiskLimits > risk
Opt-in generic account risk limits.
std::optional< NativeMarginModel > margin
Opt-in generic margin model.
std::optional< std::uint64_t > max_open_lots
native_order::RunIdentity identity
bool timeframe_undetected
A public begin with fewer than two bars may not establish a timeframe.
std::optional< double > initial_margin_fraction
NativePriceGrid price_grid
Opt-in instrument grid.
std::uint32_t slippage_ticks
NativeAbortReporting abort_reporting
std::optional< double > max_abs_units
NativeOpenBarView open_bar_view
std::optional< NativeAuxiliaryFeed > auxiliary_feed
Opt-in auxiliary finer feed.
NativeGridRounding grid_rounding
NativeReportPolicy report_policy
bool report_open_position_at_end
Report a position still open at run end as a mark-to-market closed row at the last close.
std::vector< Bar > authoritative_bars
NativeSeriesSource source