execute-entry

A command for placing a new iron condor trade, a four-option strategy that combines a put spread and a call spread. It checks the proposed strikes and current market price before submitting the order.

In plain words
What is it for?
Use it to enter an approved MEICAgent trade after strategy strikes, spread width, quotes, and the entry decision have been checked.
Why use it?
It helps prevent accidental trades when an option strike is already used or the market has moved enough to make the earlier decision outdated.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/joncovington/meicagent/execute-entry
Clone the repo
git clone --depth 1 https://github.com/joncovington/MEICAgent

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,700 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01700
Opus 5 $0.00000 $0.00850
Sonnet 5 $0.00000 $0.00340
Haiku 4.5 $0.00000 $0.00170

Measured yesterday against content hash 3f75dae624f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

execute-entry scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/execute-entry.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execute a new MEICAgent iron condor entry. Only invoke when the entry decision (Step 6) is yes.

Requires: strategy strikes, wing width, and quotes already evaluated this iteration.

  1. Strike overlap check — fetch open trades for this symbol only (python src/db.py get_open_trades --symbol <symbol>) and collect all strikes currently held across this symbol's open ICs. Confirm that none of the four proposed strikes (short put, long put, short call, long call) appears in that set. A matching strike would either net out an existing leg (partial close) or result in more than one contract at the same strike — both are disallowed. Strikes on other symbols are never compared (they're on different underlyings and different price scales). If any overlap is found, abort immediately without submitting an order.

  2. Price check — get the current underlying price:

python src/tt.py get_quote --symbol <symbol>

If the underlying has moved more than 0.5 points since the get_strategies call, re-fetch strikes:

python src/tt.py get_strategies --symbol <symbol> --short_delta <delta_target> --wing_width <width> --around_price <last>
  1. Fetch live quotes — get the current bid/ask/mid for all four legs:
python src/tt.py get_option_chain --symbol <symbol> --expiration <date> --include_quotes --around_price <last>

From the response, extract for each of the four legs: bid, ask, mid. Compute:

  • ic_mid = short_put_mid + short_call_mid − long_put_mid − long_call_mid
  • ic_natural_bid = short_put_bid + short_call_bid − long_put_ask − long_call_ask
  • avg_spread_per_leg = mean of (ask − bid) across all four legs

Abort if ic_mid ≤ 0 or ic_natural_bid ≤ 0.

  1. Apply price strategy — based on entry_price_strategy config:

    mid (default): Attempt a Day limit at ic_mid if conditions are favorable; fall back to ic_natural_bid otherwise.

    Gate — skip mid attempt and go straight to natural_bid if any of:

    • avg_spread_per_leg > mid_spread_gate (default 0.10) — spread too wide for a mid fill
    • Session is open_volatile (9:45–10:15, elevated gamma) — mid orders stale too fast
    • Session is late (after 14:45) — time pressure outweighs credit improvement
    • ic_mid − ic_natural_bid < 0.03 — spread so tight the improvement isn't worth the wait

    If gate passes:

    • Submit a Day limit at ic_mid (round to nearest $0.01). Go to Step 5 (dry run), then Step 6 (submit).
    • After submitting, wait mid_improve_wait_seconds (default 45s) polling working orders.
    • If filled within the wait: proceed to Step 7 (save trade).
    • If unfilled: cancel the working order, then resubmit at ic_natural_bid as a Day limit. Proceed to Step 5 and Step 6 for the fallback order.

    If gate fails: use ic_natural_bid directly as a Day limit.

    natural_bid: submit the order at ic_natural_bid as a Day limit.

    ioc_step: try IOC orders at ic_natural_bid + each increment in ioc_step_increments, waiting ioc_step_wait_seconds per attempt. If none fill, fall back to ic_natural_bid as a Day limit.

    day_improve: submit a Day limit at ic_natural_bid + day_improve_amount. Wait day_improve_wait_seconds. If unfilled, cancel and resubmit at ic_natural_bid.

    auto: choose strategy based on session window, spread width, and IV rank:

    • open_volatile or late: use natural_bid
    • prime or midday, avg_spread_per_leg ≤ 0.07: use mid
    • prime or midday, avg_spread_per_leg > 0.07: use day_improve
    • afternoon: use day_improve if IV rank > 0.40, else natural_bid
  2. Dry run — submit a dry-run order at the chosen limit price and check for errors, buying-power warnings, or rejections. Abort without submitting if the dry run fails.

python src/tt.py execute_trade --order '<JSON order spec>'

(Default is dry run; omit --live to validate only.)

5a. Pre-submit requote — immediately before adding --live, re-fetch the current bid/ask for all four legs:

python src/tt.py get_option_chain --symbol <symbol> --expiration <date> --include_quotes --around_price <last>

Recompute ic_natural_bid from the fresh quotes. If either of these conditions holds, abort the live submission and re-evaluate next iteration:

  • ic_natural_bid ≤ 0 (credit has flipped to a debit — would trigger Spread Checker rejection)
  • ic_natural_bid < planned_limit_pricepre_submit_requote_threshold (price has dropped more than $0.03 from the dry-run price)

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 93 lines · 0 tokens per session scan A 3f75dae624f7

Subscribe to this mod's changes

execute-entry is a command published in the GitHub repository joncovington/MEICAgent (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,700 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.