Carles Sentis
|
54ad70c59d
Add database migration functionality and initialize migration checks in TradingStats
|
4 dias atrás |
Carles Sentis
|
1467766bed
Enhance InfoCommands and MarketMonitor to incorporate leverage and risk metrics in position reporting. Updated InfoCommands to format direction text with leverage details and improved handling of margin and liquidation prices. Enhanced MarketMonitor to update unrealized P&L and market data for open positions, ensuring accurate tracking of trading metrics. Added new method in TradingStats for updating market-related data, improving database interactions for trade lifecycle management.
|
4 dias atrás |
Carles Sentis
|
0f79c87a9b
Update trade insertion query to use "INSERT OR IGNORE" for improved handling of duplicate trades in TradingStats class.
|
4 dias atrás |
Carles Sentis
|
b185e1c107
Refactor InfoCommands and TradingCommands to remove deprecated auto-sync logic for orphaned positions. Updated notification handling to include trade lifecycle IDs for better tracking of orders. Enhanced MarketMonitor to utilize cached data for orders and positions, improving efficiency. Improved logging for better traceability of trade actions and notifications.
|
4 dias atrás |
Carles Sentis
|
a80a67f780
Refactor token case normalization across commands and alarm manager - Introduced a new utility function, _normalize_token_case, to standardize token case handling in InfoCommands, ManagementCommands, TradingCommands, AlarmManager, TradingStats, and PriceFormatter. This enhancement improves consistency in token processing, particularly for mixed-case tokens, ensuring accurate command execution and alarm management.
|
5 dias atrás |
Carles Sentis
|
3cb4cb089b
Refactor trading logic to unify position tracking and enhance command handling - Updated the trading bot to utilize a unified trades table as the single source of truth for open positions, improving accuracy in position management. Enhanced InfoCommands to provide detailed statistics on active trades and open positions, including improved error handling and user notifications. Updated TradingEngine and TradingStats to support new lifecycle management for trades, streamlining the overall trading process.
|
5 dias atrás |
Carles Sentis
|
75edbe2ebf
Refactor trading bot initialization and enhance command handling - Updated the TelegramTradingBot to initialize MarketMonitor with a notification manager for improved alerting. Added a new /cycles command in InfoCommands to display trade cycle statistics, enhancing user insights into trading performance. Improved error handling and logging for better traceability in command execution.
|
5 dias atrás |
Carles Sentis
|
c31e47261d
Refactor order status update logic in TradingEngine and TradingStats - Updated the method for updating order statuses to include a new parameter for setting the exchange order ID directly. Improved logging to provide clearer feedback on order updates, enhancing overall traceability and debugging capabilities.
|
5 dias atrás |
Carles Sentis
|
938e56a535
Refactor reset_data.sh and trading_bot.py for SQLite integration - Updated reset_data.sh to remove legacy JSON files and handle SQLite database cleanup. Modified trading_bot.py to check for SQLite database existence instead of JSON files, enhancing statistics persistence reporting. Adjusted management_commands.py to reflect the new SQLite file structure for trading stats. Improved trading_stats.py to rename order_id to exchange_fill_id and added linked_order_table_id for better data management.
|
5 dias atrás |
Carles Sentis
|
5ae857d2d6
Enhance order management and stop loss functionality - Updated InfoCommands to display pending stop losses linked to orders, improving user visibility. Refactored TradingCommands to ensure accurate stop loss notifications and confirmations. Transitioned MarketMonitor to utilize SQLite for state management, replacing file-based persistence, and added comprehensive logging for order status updates. Improved TradingEngine to handle order placements and cancellations more robustly, including linked stop loss management, ensuring better tracking and execution of trades.
|
5 dias atrás |
Carles Sentis
|
4e09f49d4e
Fix logging format in TradingStats - Updated the logging statement to ensure proper formatting of the average entry price, improving clarity in position enhancement messages.
|
5 dias atrás |
Carles Sentis
|
7c5d17afb9
Refactor TradingStats to use SQLite for data management - Transitioned from JSON file storage to an SQLite database for improved data integrity and performance. Enhanced methods for recording trades, balances, and adjustments, ensuring robust handling of transactions. Updated statistics calculations to leverage database queries, streamlining data retrieval and improving overall efficiency.
|
5 dias atrás |
Carles Sentis
|
484514e0f9
Update days active calculation in TradingStats - Replaced the calculation of active days with a direct reference to the 'days_active' field in the basic data structure, improving code clarity and maintainability.
|
5 dias atrás |
Carles Sentis
|
0cfca41a25
Refactor data management and update file structure for trading bot - Modified the .gitignore to include new data directories for persistent trading data and logs. Updated reset_data.sh to reflect changes in file paths and improved user prompts. Enhanced trading_stats.py and alarm_manager.py to ensure data is stored in the new structure, improving organization and maintainability. Added demo_stats.json for testing purposes.
|
6 dias atrás |
Carles Sentis
|
3e5ee4ebdd
Refactor trading bot architecture and update version to 2.2.0 - Transitioned from a monolithic structure to a modular design, enhancing maintainability and scalability. Introduced dedicated modules for core functionalities, trading commands, and logging configuration. Improved logging setup with advanced features and fallback mechanisms. Updated project documentation to reflect the new structure and benefits of modularization.
|
6 dias atrás |