- Consistent header: icon + bold status + symbol · side
- Prices wrapped in <code> for monospace rendering
- TP/SL shown on separate lines (Entry/TP/SL aligned)
- Closed trades: entry → exit with vol + balance on one line
- PnL summary: trades · wins/losses · WR% with bold net P&L
- Add fp() helper for f64 price without trailing zeros
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Chart image via plotters looked bad and TradingView webhook
can't send chart screenshots programmatically. Reverted to
text-only Telegram notifications.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Handle position_opened/closed/modified and order_placed/cancelled/modified
- Unified SsePayload struct (Option fields) for both position and order events
- Hourly PnL summary task (send_pnl_summary every 3600s, skip first tick)
- Add sim binary for testing TG notification flow without MT5
- Export telegram + helpers via lib.rs for bin access
- Update README with Telegram setup and event table
- Update .env.example with Telegram comment block
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add telegram.rs: send/edit messages via Bot API
- Add SSE position listener: position_opened → edit "Filled",
position_closed → edit TP/SL result + send daily+alltime PnL summary
- Extend State with tg_message_id and trade details for notifications
- Add PosState to persist position info across SSE events
- Add Deal domain type and history_deals() client method
- New env: TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, TELEGRAM_THREAD_ID
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bridge schema requires volume/type/price even for TRADE_ACTION_REMOVE.
MT5 ignores these fields when action=8; send minimal valid values.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add live trading loop (live.rs) with MT5 pending order placement,
state persistence, and per-symbol tokio task for multi-pair
- Extract backtest engine to backtest.rs and shared helpers to helpers.rs
- Multi-pair support via SYMBOLS env var (comma-separated)
- Add GitHub Actions workflow: Linux musl + Windows release binaries
- Add README with strategy docs, config reference, backtest results
- Clean up warnings, remove unused env vars, tighten .gitignore
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
STOP_OUT_PCT env var (default 0.0 = Exness standard: stop at $0 equity).
- During open trade: checks worst-case equity (candle.low/high) each candle
- Before new trade: checks balance > stop_out_balance
- Prints STOP-OUT event in trade log and MARGIN CALL banner in summary
Portfolio simulator updated: checks combined balance vs stop-out level.
Findings:
1% risk — never margin-called at any stop-out level
5% XAUUSDm — MARGIN CALL at STOP_OUT_PCT=0.2 (balance hit $88.99 < $120)
5% XAGUSDm/BTC/Oil — survive 20% stop-out (lower early drawdown)
Portfolio 4 pairs — no margin call at 20% stop-out (diversification)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vendor domain and mt5-client from hermes into crates/ so the repo can
be pushed to GitHub without external path dependencies.
Also includes all bug fixes from autonomous session:
- impulse SL fix (SL at impulse candle low/high, not zone edge)
- pip_size fix for 5-decimal pairs
- fill_ok premature cancellation fix
- TIMEOUT_CANDLES, MIN_FVG_PIPS, MIN_SL_PIPS env vars
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Strategy: detect 3-candle momentum FVG on M5, enter on retrace fill.
Signal logic:
- Candle[i-1] must be a momentum candle: body ≥ BODY_PCT_MIN (default 60%)
and close in top/bottom CLOSE_PCT_MIN (default 80%) of range
- FVG must exist between candle[i-2] and candle[i] (gap on momentum side)
- FVG zone midpoint = limit entry level
- SL: just outside FVG zone (+ optional SL_BUFFER)
- TP: entry ± SL_distance × MIN_RR
Features:
- EMA trend filter (EMA_PERIOD, same timeframe)
- FVG expiry (FVG_EXPIRY_CANDLES): stale setups auto-invalidate
- Currency conversion for non-USD profit pairs (JPY, CAD, CHF)
- Full friction model: spread, slippage, commission
- Date range filter (DATE_FROM / DATE_TO)
- Same stats output format as Hermes
Dependencies: domain + mt5-client from hermes/crates (path deps)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>