Skip to content

Fix/fee bleed and cooldown#22

Open
simp-son wants to merge 17 commits intoNunchi-trade:mainfrom
simp-son:fix/fee-bleed-and-cooldown
Open

Fix/fee bleed and cooldown#22
simp-son wants to merge 17 commits intoNunchi-trade:mainfrom
simp-son:fix/fee-bleed-and-cooldown

Conversation

@simp-son
Copy link
Copy Markdown

No description provided.

bhargav55 and others added 17 commits April 2, 2026 18:05
Trigger price was not being rounded to HL's 5-sig-fig tick size before
placing stop-loss orders. For BTC at ~$69k the tick is 1.0, so a floor
like 65896.75 was rejected as invalid. Round trigger_price the same way
place_order already rounds limit prices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hreshold

Standalone runner never called set_leverage on HL, so BTC account stayed at
20x (default/prior setting). Now sets leverage to config.leverage (5x) right
before each entry order.

Also sync apex_btc_mainnet.yaml radar_score_threshold to 160 (tuned last session).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
min_hold_ms was 45 min, same as conviction_collapse_minutes, causing
positions to always close at exactly 45 min regardless of signal state.
Now min_hold is 15 min, giving the 45 min conviction window real time
to check for signal reappearance before closing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Guard: extend weak-peak check from 45min to 90min and lower min ROE
from 3.0% to 1.5% so normal BTC noise doesn't trigger early exits.
Extend Phase 1 hard cap to 180min to match.

Radar: add short-term deterioration override to BTC macro. When 4h EMAs
say up/strong_up but structural 1h trend is not UP and last 4h price
change is negative, downgrade effective macro to neutral. Prevents stale
uptrend from boosting longs into a declining market. Log shows override
as "BTC strong_up→neutral" when active.

Revert raw_score gate in apex_engine — treated symptom not cause.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Guard retrace (5%) gives a -50% ROE buffer at 10x — survivable. Position
notional doubles to ~$500 on the $50 account.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tiers

- ALO entries now price at bid/ask (maker side) instead of mid, preventing
  automatic fallback to GTC taker. Saves ~$2/round-trip in fees.
- Wire consecutive_losses tracking into ApexState + cooldown gate in
  ApexEngine. After 2 consecutive losses, block entries for 30 min.
- Add Tier 0 at 5% ROE (lock 2%) for earlier Phase 2 graduation.
  Existing tiers tightened: 10%→lock 7%, 20%→lock 15%, 40%→lock 32%.
- Bump radar_score_threshold 160→180 to filter low-quality entries.
- Port _approve_builder_fee to agent-cli standalone_runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants