Commit Graph

97 Commits

Author SHA1 Message Date
25c3f0208e fix: Import get_current_prices from data_utils in journal.py 2025-02-18 20:58:50 -08:00
4ca31ebb06 refactor: Improve get_current_prices function with robust price fetching logic 2025-02-18 20:58:31 -08:00
4321c3ff66 refactor: Improve get_current_prices with robust price fetching and error handling 2025-02-18 20:58:12 -08:00
e9d2dd96a4 feat: Enhance table creation and error handling in watchlist management 2025-02-17 16:55:18 -08:00
d0b8e294db feat: Add shares field to watchlist items and update prefill functionality 2025-02-17 16:51:09 -08:00
579f870c08 feat: Simplify watchlist functionality and add table creation checks 2025-02-17 16:43:24 -08:00
a6d7a3fb54 fix: Import time module to resolve undefined name error 2025-02-17 16:39:48 -08:00
8649949278 refactor: Enhance watchlist debugging with detailed logging and Streamlit output 2025-02-17 16:39:37 -08:00
f3570ac6b3 feat: Enhance watchlist addition with Streamlit debug output 2025-02-17 16:33:42 -08:00
0eb83197cb feat: Add detailed debug logging for watchlist item creation and insertion 2025-02-17 16:28:33 -08:00
8fadc159bd feat: Add detailed SQL logging and debug database state button 2025-02-17 16:25:40 -08:00
322491bc83 refactor: Enhance watchlist addition with robust logging and error handling 2025-02-17 16:22:04 -08:00
4bdd85405a feat: Add logging and improve watchlist UI for better error handling 2025-02-17 16:18:33 -08:00
ca843a370e refactor: Migrate watchlist functionality to ClickHouse database 2025-02-17 16:12:34 -08:00
c00893360e feat: Add watchlist feature with database tables and UI integration 2025-02-17 16:10:12 -08:00
85c8f97cc5 refactor: Optimize open trades summary query with position totals subquery 2025-02-13 11:21:04 -08:00
e5b35e50e5 refactor: Improve open trades query with net shares calculation and position tracking 2025-02-13 11:20:47 -08:00
4196a61b99 refactor: Update open trades queries to handle empty exit prices and null exit dates 2025-02-13 11:18:00 -08:00
4bd9bd8c42 fix: Adjust open trades summary query to handle sell orders and filter zero total shares 2025-02-13 11:14:28 -08:00
abaf3ab855 feat: Improve trade entry and performance calculation for sell orders 2025-02-13 11:11:42 -08:00
731b4e9e2d refactor: Simplify position summary query and add debug logging 2025-02-13 10:58:09 -08:00
aedd96eef4 refactor: Simplify open trades summary query calculation 2025-02-13 10:34:46 -08:00
52839b451e feat: Add debug logging to get_open_trades function 2025-02-13 10:29:50 -08:00
c4b253cc88 feat: Add debug logging to open trades functions 2025-02-13 10:29:33 -08:00
ef762d2132 feat: Update position ID generation to use trade entry datetime 2025-02-13 10:09:53 -08:00
646d4b847f refactor: Update trade history query to explicitly list columns 2025-02-13 09:32:57 -08:00
e22a0ad67e refactor: Update trade entry handling for sell orders with exit price and date 2025-02-13 09:30:38 -08:00
b6117c84f2 feat: Add docstring and lowercase trade direction in add_trade function 2025-02-13 09:13:03 -08:00
8d76d820fe feat: Enhance trade history display with position-based grouping and comprehensive trade details 2025-02-13 08:39:51 -08:00
9642d78942 feat: Add support for sell orders in trade history query and display 2025-02-13 08:32:58 -08:00
bc064fc011 fix: Correct trade summary calculations for buy and sell directions 2025-02-13 08:29:01 -08:00
0cb11574a3 refactor: Add None checks to Position class property methods 2025-02-13 08:07:52 -08:00
11da135ea2 refactor: Prevent duplicate table creation messages in trading_plan table 2025-02-12 17:54:46 -08:00
b35349c885 refactor: Improve NULL handling in unlink_trades_from_plan function 2025-02-11 21:06:37 -08:00
a2bbd31f27 fix: Modify trade linking query to correctly handle ClickHouse IN clause 2025-02-11 19:18:36 -08:00
bee908180c feat: Add functionality to unlink trades from trading plans 2025-02-11 19:16:52 -08:00
d9692e9811 feat: Add dynamic plan_id column check and creation in get_plan_trades 2025-02-11 19:13:39 -08:00
a47cd3e1cc refactor: Update SQL queries to use parameterized queries in trading_plan.py 2025-02-11 19:12:14 -08:00
e575842664 feat: Add trade linking and performance metrics to trading plans 2025-02-11 19:00:24 -08:00
b1e843e796 feat: Add delete functionality for trading plans in edit mode 2025-02-11 18:44:33 -08:00
430520a307 refactor: Remove updated_at as version column in ReplacingMergeTree engine 2025-02-11 18:36:58 -08:00
978d9c7a20 feat: Update trading_plans table to use ReplacingMergeTree for better update support 2025-02-11 18:34:35 -08:00
aa282de020 refactor: Switch trading_plans table engine from TinyLog to MergeTree 2025-02-11 18:33:01 -08:00
7fe73d725c fix: Remove DROP TABLE command to preserve trading plan data 2025-02-11 18:31:15 -08:00
5acfe4bfc4 fix: Correctly handle query results in trading plan retrieval functions 2025-02-11 18:25:02 -08:00
1d423d3291 refactor: Update Streamlit query params and trading plan retrieval method 2025-02-11 18:22:58 -08:00
26238a6afb refactor: Update query result handling and deprecated Streamlit function 2025-02-11 18:21:33 -08:00
d17dc47d42 fix: Correctly handle query result rows when generating new trading plan ID 2025-02-11 18:17:33 -08:00
0ac499ae8c refactor: Update database client methods to use command and query for SQL execution 2025-02-11 18:15:54 -08:00
41de719250 refactor: Add error handling to get_all_trading_plans function 2025-02-11 18:02:38 -08:00