Skip to content

Instantly share code, notes, and snippets.

@toaida
toaida / mr_bot_v76_changes.md
Created April 17, 2026 02:19
mr_bot_v76.py v7.6.5 changes: SEPARATE UP/DOWN thresholds, VROC DOWN bonus, Relaxed DOWN guard, 1H trend detection

mr_bot_v76.py v7.6.5 Changes (vs v7.6.4)

Change 1: VROC DOWN BONUS (+1.0 score when VROC < -50)

Location: score_entry() function, after existing VROC outflow check

# v7.6.5: VROC DOWN CONFIRMATION — heavy sell volume priority
if side == "DOWN" and vroc < -50:
    score += 1.0
    reasons.append(f"HEAVY SELL VROC={vroc:.1f}")
@toaida
toaida / mr_bot_v76_log_3h.md
Created April 16, 2026 09:23
mr_bot_v76 v7.6.3 BOUNCE log — 3 hours (14:22-17:22 GMT+8 Apr 16)

[2026-04-16 16:32:56] [CLOB PRICE] yes=0.5050 no=0.4950 [2026-04-16 16:32:56] [BTC] [CLOB OVERLAY] YES=0.5050 (replaced Gamma) [2026-04-16 16:32:56] [BTC] [TICK 809] YES=0.5050 Cap=$14.00 Urgent=False [2026-04-16 16:32:56] [BTC] [IND] RSI=60.8 Stoch=82.3 CCI=77.6 | MACD=9.2843 ADX=30.0 E74660.2/E74690.4/E74832.2 | BBlo=74533.72,BBhi=74753.89 BBp=74708.19 ATR=38.4986 | VROC=+35.1 [[1m]] [2026-04-16 16:32:56] [CLOB PRICE] yes=0.4650 no=0.5350 [2026-04-16 16:32:56] [ETH] [CLOB OVERLAY] YES=0.4650 (replaced Gamma) [2026-04-16 16:32:57] [ETH] [TICK 809] YES=0.4650 Cap=$14.00 Urgent=False [2026-04-16 16:32:57] [ETH] [IND] RSI=67.0 Stoch=90.1 CCI=143.9 | MACD=0.4560 ADX=42.0 E2340.3/E2341.8/E2348.2 | BBlo=2335.45,BBhi=2343.64 BBp=2342.99 ATR=1.3743 | VROC=+187.3 [[1m]] [2026-04-16 16:32:57] [ETH] [ENTRY BLOCKED] BUY UP: score=3.50 < 4.0 [2026-04-16 16:33:08] [CLOB PRICE] yes=0.5050 no=0.4950

@toaida
toaida / mr_bot_v76_exit_logic.py
Created April 15, 2026 16:13
mr_bot_v76.py v7.6.3 exit logic + CLOB price overlay
# mr_bot_v76.py — v7.6.3 Exit Logic + CLOB Price Overlay
# ==========================================================
# Three critical exit layers:
# LAYER 1: ORDER PURGE — cancel-all before sell
# LAYER 2: AGGRESSIVE LIMIT SELL — 4¢ offset from mid
# LAYER 3: SYNTHETIC EXIT FALLBACK — buy opposite outcome if sell fails
#
# CLOB Price Overlay:
# get_clob_price() — live CLOB midpoints replacing Gamma for millisecond accuracy
@toaida
toaida / mr_bot_v76.py
Created April 15, 2026 12:58
mr_bot v7.6.2 - Strict Dedup + Emergency Pause + Fill Ratio Check
#!/usr/bin/env python3
"""
mr_bot_v76.py — v7.6 "KELLY EDITION" with Liquidity Guard
==========================================================
Upgrades from v7.5.9 HardCore:
1. KELLY SIZING: Position size scaled by confidence score
- Score 4.0 → 50% Kelly fraction
- Score 5.0 → 100% Kelly fraction
2. LIQUIDITY GUARD: Orderbook check before entry
- Skip if spread > $0.03