You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4b05b62
Browse filesBrowse the repository at this point in the historyBrowse files
Adapter re-lowering: the TradingView margin call runs through the kernel margin model (R5 lane R5)
The Pine host selects spec.margin (per-side initial from the Pine margin
inputs, RealizedOnly level base, ShortfallMultiple 4.0,
PathAdverseExtremeMark, the liquidation ticket label/comment) and
supplies TradingView policy through L4b's hooks: resolve_margin_requirement
restates the requirement (ten-significant-digit money rounding) and the
equity (percent-commission live equity), resolve_margin_call_units applies
the exact flooring and the family-R whole-drop band, margin_check_allowed
carries the rounded-whole-lot-tie veto and the 1x-long exclusion, and the
kernel's liquidation request is recognised at precommit by its
RequestOrigin; resolve_execution_terms books the tick-rounded fire price
with exit-side slippage. The kernel's liquidation now replaces the
adapter's path-slice construction; the 1x-long money call (not a
maintenance liquidation) and the non-path checkpoints (script close,
stream tick, FX rollover, pre-open) stay adapter-side. Kernel additions:
NativeMarginModel::liquidation_label/comment (folded only when set) and a
fix for re-flooring an already-on-grid liquidation quantity (one lot
short). The presence of spec.margin is the margin-call switch.
Differential: tests/test_adapter_margin_relower.cpp (46 checks, eight
scenarios bit-for-bit against values harvested from the b0cec54 library);
corpus 312/312 engine_trades.csv identical (the corpus exercises no
margin call — the campaign sweep is the population proof); ci_verify
release PASS (507).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 66fcc68c996195bb85845e618f2613e31d162bf7)
Copy file name to clipboardExpand all lines: scripts/broker_state_hash_waivers.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,3 +51,4 @@ excursion_priced_fill_ # Transient excursion-sampler cache; re-derived from the
51
51
excursion_range_end_projection_ # Report-only projection scope flag around range-end row building; it is false for every real settlement.
52
52
excursion_trail_offset_ticks_ # Transient excursion-sampler cache; re-derived from the immutable native request trigger at every precommit and cleared at the applied boundary.
53
53
precommit_held_units_ # Transient precommit cache; re-derived from the physical position at every precommit and cleared at the applied-fill boundary (same class as the excursion_* caches).
54
+
kernel_margin_path_point_ # Transient within-point arming value for the kernel's margin check gate: driver point ordinals are strictly monotone and margin_check_allowed only compares this for equality with the current point's, so from the first point after the one it names it can never match again; it is re-decided from already-hashed adapter state at every point (same class as the excursion_* and precommit_held_units_ caches).
0 commit comments