Reactive State-Machine
Managing the lifecycle of execution through Phase-Based Logic and Risk Truncation.
The Execution Lifecycle
A trade is not a static event. It is a living object that transitions through distinct states based on market feedback.
Logic resides in the TradeExitHelper.
Initial Phase
- ● Order Filled
- ● Full Risk Active
- ● Waiting for volatility
Break-Even Event
TRIGGER: TP1 (33% to VWAP) Hit
- ✓ SL moved to Entry
- ✓ Risk = 0
- ✓ Partial Profit Locked
Profit Harvesting
- ● Trailing Stop Active
- ● TP2 / TP3 Targets
- ● Maximizing Upside
Dynamic Risk Exposure
Risk is not constant. The system mathematically drives exposure ($) to zero the moment Phase 2 is triggered, protecting the capital for the remainder of the trade.
Truncating the Tail
Before TP1: Standard bell curve (Risk of loss exists).
After TP1: The left tail (Loss) is mathematically truncated. The probability of a negative outcome becomes effectively zero.
Dynamic Cloud Autoscaling
The logic of "Initial Risk → Stabilization → Lock-in" solves the problem of Elastic Resource Management in Kubernetes clusters.
Algorithmic Trading
Risk capital to enter a position based on signal.
Price hits TP1. Move Stop Loss to Breakeven.
Risk-free ride to TP2 or Stop out at $0 loss.
Kubernetes Autoscaling
"Risk" budget to spin up new Pods when CPU > 80%.
Traffic sustains. New baseline established. Do not scale down yet.
Revenue covers instance cost ("Breakeven"). Lock as Reserved Instance.