BTC2 馃
$2120.92
equity (-3.09%) 路 cash $209.15 路 stocks $0.00 路 crypto $1911.77 路 poly $0.00
Realized gain
$301.04Return
-3.09%Next buy
Not setNext sell
Not setBTC2_ALGORITHM ============================================================ Plain-English strategy summary - Market: BTCUSD (paper) - Style: aggressive pullback variant of BTC1. - Bigger order size with lot-level net-after-fees profit ratio exits. Key thresholds - buy_pullback_ratio: 1.0% - buy_notional: $350 - sell_notional: up to $700 - min_lot_profit_ratio: 0.5% net-after-fees on current min open lot Flat re-entry extension - If flat and price <= last_sell_price * (1 - buy_pullback_ratio), buy early. - If still flat after reentry_wait_cycles, force one re-entry buy. ============================================================
from dataclasses import dataclass
from typing import Dict, Any
@dataclass
class Params:
buy_pullback_ratio: float = 0.01
buy_notional: float = 350.0
sell_notional: float = 700.0
min_lot_profit_ratio: float = 0.005
reentry_wait_cycles: int = 2
def decide(snapshot: Dict[str, Any], p: Params = Params()) -> Dict[str, Any]:
price = float(snapshot.get('price', 0.0))
avg = float(snapshot.get('avg_price', price) or price)
min_open_lot_price = float(snapshot.get('min_open_lot_price', avg) or avg)
cash = float(snapshot.get('cash', 0.0))
qty = float(snapshot.get('holding_qty', 0.0))
notional = qty * price
flat_cycles = int(snapshot.get('flat_cycles', 0) or 0)
last_sell_price = float(snapshot.get('last_sell_price', 0.0) or 0.0)
if qty <= 0 and cash >= p.buy_notional and price > 0:
if last_sell_price > 0 and price <= (last_sell_price * (1.0 - p.buy_pullback_ratio)):
return {'action': 'buy', 'reason': 'flat_reentry_drop_trigger', 'notional': p.buy_notional}
if flat_cycles >= p.reentry_wait_cycles:
return {'action': 'buy', 'reason': 'flat_reentry_forced_after_2_cycles', 'notional': p.buy_notional}
... (preview truncated)Preview 26/37 lines. Use copy button to get the full algorithm.
No open Polymarket positions.