run_guardrail
Run six pre-flight safety gates before placing any trade order. Returns approval only if all gates—including VIX, daily loss, stoploss, cooldown, confidence, and R/R—pass.
Instructions
Run the GUARDRAIL pre-flight middleware chain before placing any order. Executes 6 gates: VIX, daily-loss, stoploss-guard, cooldown, confidence, R/R. Returns approved=true only if all gates pass. Wire this before every order execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vix | No | Current VIX (reads CURRENT_VIX env if omitted) | |
| side | Yes | ||
| stop | No | Stop loss price (enables R/R gate) | |
| entry | No | Entry price (enables R/R gate) | |
| gates | No | Gate subset to run. Omit for all: vix, daily_loss, stoploss_guard, cooldown, confidence, risk_reward | |
| symbol | Yes | e.g. MNQ, CL, BTC/USD | |
| daily_pnl | No | Today realized P&L (reads TODAY_REALIZED_PNL env if omitted) | |
| confidence | No | Model confidence 0-1 |