Commit Graph

138 Commits

Author SHA1 Message Date
b462651f60 test: add comprehensive Hurst strategy simulations and backtest engine enhancements (v1.7.11)
- Add Hurst_simulations.md with detailed performance data from Jan 2025 to Mar 2026 across 1m-1h TFs.
- Enhance backtest_engine.py:
    - Add --starting_equity for memory-efficient chunked testing.
    - Add Max Drawdown tracking.
    - Add --interval override flag.
    - Add --brake_period/--brake_interval for safety filter testing.
2026-03-10 13:02:29 +01:00
cd66a976de feat: implement Mid-Price logic and separate error logging (v1.8.6)
- Implement Mid-Price calculation (Bid+Ask)/2 for Maker orders to improve fill rates.
- Add separate 'logs/ping_pong_errors.log' for WARNING and ERROR messages.
- Add RotatingFileHandler for error logs (5MB cap, 2 backups).
- Refine 'leverage not modified' (110043) handling from ERROR to INFO.
- Improve order verification with explicit status checks and race condition handling.
- Verify script syntax and update version to 1.8.6.
2026-03-08 22:07:11 +01:00
2840d9b0b3 feat: implement Maker Chase logic and enhanced order logging (v1.8.2)
- Implement 5-try Chase logic for Maker (Limit Post-Only) orders.
- Add 'attempts' column to CSV transaction log for performance tracking.
- Update backtest engine (v1.7.9) with Stop Loss and Maker fee simulation.
- Log failed chase sequences explicitly as "Failed (Chase Timeout)".
- Consolidate order processing into internal helper methods.
2026-03-08 20:39:17 +01:00
f3b186b01d feat: add local PC support and setup instructions for backtesting (v1.7.8) 2026-03-08 20:12:16 +01:00
56d0237bbf feat: implement backtesting environment and refine strategy logic (v1.7.5)
- Extract strategy logic into a reusable PingPongStrategy class for bot and backtester.
- Create src/strategies/backtest_engine.py for local historical testing using DB data.
- Add BACKTESTING_GUIDE.md with instructions on how to use the new environment.
- Update dashboard to show Net Realized PnL (including fees).
- Verified bot and backtester compatibility with existing Docker setup.
2026-03-08 19:56:53 +01:00
f544b06753 feat: enhance trade tracking with fees, PnL, and refined logging (v1.7.3)
- Implement real-time fee and realized PnL tracking using get_executions.
- Rename 'side' column to 'trade' in CSV log and dashboard (Enter/Exit labels).
- Add automatic CSV header migration (side -> trade).
- Enhance dashboard with session PnL (USD/BTC), total fees, and used leverage.
- Improve signal detection with candle-internal crossover logic.
- Add robust retry mechanism with failure window tracking.
- Sync exchange leverage automatically based on direction.
- Update config with robustness and mode-specific leverage settings.
2026-03-07 22:57:51 +01:00
8fe8224762 fix: implement precise rounding for spot asset swaps (v1.5.7) 2026-03-05 23:45:09 +01:00
3e741592dc feat: fix asset swap logic for Unified Trading Accounts (v1.5.6) 2026-03-05 23:43:02 +01:00
0ce712cc86 fix: resolve invalid symbol error and refine DB queries (v1.5.5) 2026-03-05 23:38:32 +01:00
57e098c25b fix: refine base_coin extraction to support BTCUSD and fix DB queries (v1.5.4) 2026-03-05 23:30:38 +01:00
8b076106dc fix: ensure DB credentials are explicitly passed and verified (v1.5.3) 2026-03-05 23:26:59 +01:00
58070550a5 fix: increase 1D candle fetch limit for more reliable MA44 (v1.5.2) 2026-03-05 23:24:33 +01:00
f3ce68de22 fix: resolve Illegal category error by adding safety checks (v1.5.1) 2026-03-05 23:21:15 +01:00
6e6e9db5cc feat: implement automated direction (1D SMA44) and asset management (v1.5.0) 2026-03-05 23:12:30 +01:00
e553a1dd48 feat: change indicator order in dashboard (v1.4.2) 2026-03-05 23:07:29 +01:00
cf0ccbcad5 revert: remove all blinking related Live UI changes (v1.4.1) 2026-03-05 22:50:40 +01:00
b44847cbbd feat: use rich.Live(screen=False) for flicker-free dashboard (v1.3.9) 2026-03-05 22:42:48 +01:00
08a4639dad feat: use ANSI cursor reset for flicker-free dashboard (v1.3.8) 2026-03-05 22:39:48 +01:00
ca0e74d402 fix: resolve pybit TypeError and implement async timeouts (v1.3.7) 2026-03-05 22:37:28 +01:00
fb9736177a feat: replace rich.live with standard print and add exchange timeouts (v1.3.6) 2026-03-05 22:36:16 +01:00
f1d7c7138c feat: add heartbeat and robust error handling to main loop (v1.3.5) 2026-03-05 22:34:21 +01:00
fcfa2244f2 feat: implement rich.live for non-blinking dashboard (v1.3.4) 2026-03-05 22:28:22 +01:00
38d8e5f1de fix: resolve KeyError in indicators and fix wallet balance logic (v1.3.3) 2026-03-05 22:21:35 +01:00
40178ca469 fix: map interval to DB format and add 'No candles found' status (v1.3.2) 2026-03-05 22:19:24 +01:00
b5cc51a4d2 fix: use BTC for DB queries and BTCUSDT for Bybit API (v1.3.1) 2026-03-05 22:15:01 +01:00
7c6faebead feat: refactor bot to use DB for candles with 5s/15s polling sync (v1.3.0) 2026-03-05 22:11:17 +01:00
9ffcf4c8c4 chore: bump version to 1.2.1 for indicator reorder 2026-03-05 21:33:56 +01:00
0ea6b22388 style: reorder indicators in dashboard table 2026-03-05 21:28:45 +01:00
36dd389e10 feat: introduce versioning (v1.2.0) and display it in dashboard 2026-03-05 21:22:57 +01:00
07c71ab209 feat: align ping_pong_bot logic with STRATEGY_PING_PONG.md 2026-03-05 21:21:34 +01:00
d08f12c6aa docs: restore STRATEGY_PING_PONG.md from master 2026-03-05 21:16:36 +01:00
9c3fa908ce feat: add real-time status dashboard using rich tables 2026-03-05 21:10:22 +01:00
ccc36da1e2 fix: resolve Bybit Hedge Mode position idx error by adding positionIdx and settleCoin 2026-03-05 21:02:12 +01:00
907eecc4de chore: clean up project to focus only on btc_bot service on bot branch 2026-03-05 20:59:52 +01:00
295bd3085c revert: remove database dependency from ping_pong_bot to fix aiohttp import error 2026-03-05 20:54:23 +01:00
2e901ac95e feat: refactor ping_pong_bot to use database for candles and sync crossover logic with dashboard 2026-03-05 15:09:14 +01:00
da7fbd1b49 feat: fix Bybit Unified Account support and enhance Docker logging for ping_pong_bot
- Added accountType='UNIFIED' to wallet balance requests
- Updated balance retrieval to support totalWalletBalance for UTA
- Replaced rich.Live with standard logging for better Docker compatibility
- Added PYTHONUNBUFFERED=1 to ensure real-time logs in containers
- Updated docker-compose to point to NAS database (20.20.20.20)
- Created GEMINI.md with comprehensive project context
2026-03-05 11:04:30 +01:00
30aeda0901 docs: add DOCKER_GUIDE.md and fix .env parsing; chore: update docker and script configurations 2026-03-05 08:20:18 +01:00
e41afcf005 feat: implement interactive Best Moving Averages panel based on 1D timeframe 2026-03-04 10:13:39 +01:00
756b1dbd65 feat: standardize date/time format to DD/MM/YYYY 24h and enhance simulation with stop date and auto-data fetching 2026-03-04 09:11:25 +01:00
35ebb0ae87 feat: enable interactive scrolling and time-scale sync for simulation result charts 2026-03-03 23:13:03 +01:00
9883d1bea9 feat: enhance strategy simulation with Inverse Perpetual support, effective leverage caps, and advanced charting 2026-03-03 23:07:03 +01:00
50c525a0bd Refactor strategy simulation to track BTC quantity and enhance chart markers
- Switch simulation to track BTC quantity instead of USD notional only
- Use current candle price for entry/exit quantity and PnL calculations
- Correctly weight average entry price by BTC quantity
- Update chart markers to display total position in format: ( / BTC size)
- Improve equity chart accuracy by accounting for BTC value fluctuations
2026-03-03 16:05:46 +01:00
633a146e8e Refine strategy simulation with pyramiding, partial exits, and fixed marker logic
- Implement position pyramiding and 15% partial profit-taking
- Add mutual exclusion between entry and exit in the same candle
- Optimize simulation to use cached indicator results
- Revert Hurst Bands signal logic to cross-down (dip entry)
- Add safety filter for chart markers to prevent rendering errors
2026-03-03 15:39:59 +01:00
d92af6903d Implement Strategy tab with Ping-Pong backtesting and crossover-based signal logic
- Add 'Strategy' tab to sidebar for backtesting simulations
- Create strategy-panel.js for Ping-Pong and Accumulation mode simulations
- Refactor all indicators (MA, HTS, RSI, MACD, BB, STOCH, Hurst) to use strict crossover-based signal calculation
- Update chart.js with setSimulationMarkers and clearSimulationMarkers support
- Implement single-entry rule in Ping-Pong simulation mode
2026-03-03 13:15:29 +01:00
73f325ce19 Fix indicator preset saving and update Hurst Bands defaults
- Include visual settings (line width, color, markers) in saved presets
- Change default line width to 1px for indicators
- Update Hurst Bands to use grey markers and custom shapes by default
- Add robust userPresets initialization and error handling in savePreset
2026-03-03 12:19:13 +01:00
cf1aca8855 Add Hurst Bands indicator with buy/sell signal markers 2026-03-03 08:36:26 +01:00
9d7647fde5 Add signal markers on main chart with configurable shapes and colors
- Create signal-markers.js module to calculate crossover markers for indicators
- Add marker configuration options to indicator config panel:
  - Show/hide markers toggle
  - Buy/sell shape selection (built-in or custom Unicode)
  - Buy/sell color pickers
- Integrate markers with lightweight-charts using createSeriesMarkers API
- Markers recalculate when indicators change or historical data loads
2026-03-02 12:49:49 +01:00
d332748411 fixed params handling in analysis panel 2026-03-02 10:46:03 +01:00
b888c03e8e show only period param in analysis panel 2026-03-02 10:45:00 +01:00