Commit Graph

377 Commits

Author SHA1 Message Date
723a7dfc9f refactor: Move technical scanner functionality to separate module 2025-02-12 17:02:40 -08:00
3bb0ede559 fix: Import load_scanner_reports function from canslim_screener_page 2025-02-12 17:00:18 -08:00
ce1db8a8d9 refactor: Move CANSLIM screener to dedicated module 2025-02-12 17:00:08 -08:00
c2feece0d6 fix: Import missing journal functions and format_datetime 2025-02-12 16:51:25 -08:00
bf034d9ada refactor: Move trading journal functionality to separate module 2025-02-12 16:51:05 -08:00
417dbbc596 refactor: Move strategy guide to dedicated page module 2025-02-11 21:38:38 -08:00
b35349c885 refactor: Improve NULL handling in unlink_trades_from_plan function 2025-02-11 21:06:37 -08:00
84378e32f8 refactor: Replace nested expanders with cleaner trade display layout 2025-02-11 19:22:34 -08:00
1506deff0d feat: Add linked trades and trade statistics to trading plan view 2025-02-11 19:21:25 -08:00
a2bbd31f27 fix: Modify trade linking query to correctly handle ClickHouse IN clause 2025-02-11 19:18:36 -08:00
062be5863f feat: Add unlink_trades_from_plan import to trading_plan module imports 2025-02-11 19:17:06 -08:00
bee908180c feat: Add functionality to unlink trades from trading plans 2025-02-11 19:16:52 -08:00
f3d932443e fix: Remove duplicate Trade Management section and add unique keys 2025-02-11 19:14:59 -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
85d7638ef4 feat: Add trade management section to trading plan edit page 2025-02-11 19:09:51 -08:00
c1bd9e7701 fix: Resolve f-string syntax error in trading plan page format_func 2025-02-11 19:07:56 -08:00
4a0bc2bb0f fix: Resolve f-string syntax error in trading plan trade formatting 2025-02-11 19:07:42 -08:00
eeb7e6d682 feat: Enhance trade selection with direction, strategy, and profit/loss details 2025-02-11 19:07:24 -08:00
722f0d8a14 fix: Import missing functions for trading plan management 2025-02-11 19:03:25 -08:00
e575842664 feat: Add trade linking and performance metrics to trading plans 2025-02-11 19:00:24 -08:00
bdfd53e653 feat: Enhance trading plan view with comprehensive details and improved layout 2025-02-11 18:56:27 -08:00
9f0be3f617 fix: Update Streamlit query params method to use .update() 2025-02-11 18:53:15 -08:00
0312411a47 refactor: Replace deprecated st.experimental_set_query_params with st.query_params 2025-02-11 18:51:27 -08:00
613f50ec5b fix: Correct indentation for delete button in trading plan page 2025-02-11 18:48:37 -08:00
9369eadd47 fix: Correct syntax error in trading plan delete button placement 2025-02-11 18:47:12 -08:00
9e7e1dd2b1 fix: Correct indentation for delete plan button in trading plan page 2025-02-11 18:47:02 -08:00
35cebb7010 fix: Correct indentation for delete plan button in trading plan page 2025-02-11 18:46:51 -08:00
25edd0a77f fix: Correct indentation for "Delete Plan" button in trading plan page 2025-02-11 18:46:38 -08:00
f0065af3a2 fix: Resolve indentation error and remove duplicate exception handler in trading plan page 2025-02-11 18:44:57 -08:00
11660b3449 fix: Remove misplaced delete plan button and add it to trading plan page 2025-02-11 18:44:46 -08:00
b1e843e796 feat: Add delete functionality for trading plans in edit mode 2025-02-11 18:44:33 -08:00
e7946667e4 feat: Add comprehensive editing capabilities for trading plans 2025-02-11 18:40:44 -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
74e1d43936 feat: Add unique keys to Streamlit form elements to prevent duplicate IDs 2025-02-11 18:28: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
7fe83a0f6a fix: Update st.rerun() to st.experimental_set_query_params(rerun=True) 2025-02-11 18:20:07 -08:00
9897b9029b refactor: Replace st.experimental_rerun() with st.experimental_set_query_params(rerun=True) 2025-02-11 18:20:03 -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
2a790a164a refactor: Improve error handling in create_trading_plan_table function 2025-02-11 18:01:35 -08:00
a22f4a444a refactor: Simplify trading_plans table structure with TinyLog engine 2025-02-11 17:59:38 -08:00
19f06601d9 refactor: Simplify trading plans table structure with MergeTree engine and default values 2025-02-11 17:58:13 -08:00
7ccb5a8065 refactor: Simplify trading plans table structure with Log engine 2025-02-11 17:56:59 -08:00
b327062a6d refactor: Simplify trading plans table creation with Memory engine 2025-02-11 17:51:35 -08:00
26c8d83451 refactor: Simplify trading_plans table creation with MergeTree engine 2025-02-11 17:50:20 -08:00
7b6d890d7e feat: Update ClickHouse table creation with ReplacingMergeTree and DateTime64 2025-02-11 17:48:38 -08:00
f9c8d43a86 fix: Update ClickHouse table creation syntax for trading plans 2025-02-11 17:45:52 -08:00
34c006e360 refactor: Reorder TradingPlan dataclass fields to comply with Python requirements 2025-02-11 17:43:49 -08:00
4730499ae2 feat: Add trading plans page to Streamlit app with full CRUD functionality 2025-02-11 17:42:10 -08:00
8440171a08 feat: Add functions to get and update trading plans 2025-02-11 17:40:04 -08:00
ca4ceabc40 feat: Add trading plan model and database schema for managing trading strategies 2025-02-11 17:38:11 -08:00
a4bf153097 feat: Add run_migration.py to resolve Python module import issues 2025-02-11 07:10:14 -08:00
8c11af9c05 feat: Add migration script to include direction field in trades table 2025-02-11 07:07:28 -08:00
483fcf7ba9 refactor: Update TradeEntry to support buy and sell orders with optional fields 2025-02-11 07:06:17 -08:00
77a067a22e feat: Add direction field to TradeEntry and update trades table schema 2025-02-11 07:05:58 -08:00
b9116a55a2 feat: Enhance trade entry form to support buy and sell order workflows 2025-02-11 07:02:51 -08:00
c238bf45ed feat: Add buy/sell direction selector to trading journal page 2025-02-11 06:59:10 -08:00
695259f3be refactor: Remove navigation buttons from strategy guide page 2025-02-10 23:32:07 -08:00
c1445fc5e3 refactor: Replace st.switch_page() with session state navigation 2025-02-10 23:31:01 -08:00
83e2cde08a feat: Improve navigation buttons in strategy guide page with Streamlit switch_page 2025-02-10 23:29:52 -08:00
99f890c4c6 refactor: Simplify strategy guide page navigation buttons 2025-02-10 23:28:29 -08:00
f9b6cb82f8 refactor: Replace deprecated st.experimental_rerun() with st.rerun() 2025-02-10 23:27:06 -08:00
55c23b44bb feat: Add strategy guide page with trading workflow and scanner integration 2025-02-10 23:25:36 -08:00
31af0f6a02 feat: Use portfolio value as default account size in position calculator 2025-02-10 23:23:09 -08:00
470cb88da6 refactor: Improve portfolio display with unique keys and entry date 2025-02-10 23:20:11 -08:00
efe69a2dbb feat: Load open trades from journal into portfolio on initialization 2025-02-10 23:18:45 -08:00
aadd2c517e feat: Add Trading System page to navigation menu 2025-02-10 23:16:59 -08:00
b8c268652f fix: Import missing portfolio value functions from trading.journal 2025-02-10 23:15:24 -08:00
cfe17976b2 fix: Resolve syntax error in portfolio value display condition 2025-02-10 23:15:12 -08:00
7beaee7d10 fix: Correct incomplete if statement in portfolio value section 2025-02-10 23:15:00 -08:00
02496c3a3c feat: Add trading system page with position calculator, portfolio management, and value tracking 2025-02-10 23:11:16 -08:00
91e6b7f2b6 feat: Add unique keys to text_area elements in trading journal page 2025-02-10 23:01:48 -08:00
b71a3eef38 fix: Remove nested try block and simplify error handling in trade update 2025-02-10 23:00:24 -08:00
a99deffa9f feat: Add date and time input fields for updating trade entry details 2025-02-10 22:59:59 -08:00
6f5dadbe5c feat: Add interval selection to technical scanner page 2025-02-10 22:56:18 -08:00
8b56c3c8e5 feat: Add date range inputs and update technical scanner function parameters 2025-02-10 22:54:18 -08:00
0dd86ebe42 refactor: Modify scanner_controller to accept parameters directly and use dictionary mapping 2025-02-10 22:53:04 -08:00
9e1cccd3b6 feat: Add unique keys to selectboxes to resolve duplicate element ID error 2025-02-10 22:49:09 -08:00
28f0eee4ec feat: Add CANSLIM screener interface to Streamlit app 2025-02-10 22:45:06 -08:00
3bd73572af changed the screen reports folder 2025-02-10 22:42:36 -08:00
6643e891da fix: Add missing pandas import to resolve undefined name error 2025-02-10 22:40:20 -08:00
099c8b353e feat: Add CSV report viewing functionality to technical scanner page 2025-02-10 22:40:11 -08:00
e001d2e766 feat: Create Streamlit app with trading journal, technical scanner, and navigation 2025-02-10 22:35:13 -08:00
536622d1ca fix: Add shares input prompt for sell order in trading journal 2025-02-10 19:05:41 -08:00
dcfc657ced fix: Remove duplicate shares input in journal_menu function 2025-02-10 19:05:29 -08:00
6e4c26c73d feat: Allow user-provided entry date when creating trade entries 2025-02-10 19:02:09 -08:00
e89f673709 feat: Add delete trade functionality to journal menu 2025-02-10 18:53:24 -08:00
5aa6d0effe refactor: Modify update_trade to handle ClickHouse sorting key limitation 2025-02-10 18:50:22 -08:00
3e57a678f7 fix: Replace undefined update_trade_exit with update_trade 2025-02-10 18:47:55 -08:00
3819547de7 feat: Enhance trade update functionality with flexible field modifications 2025-02-10 18:47:44 -08:00
933141618b refactor: Update get_current_prices to use fast_info for reliable price fetching 2025-02-10 11:21:23 -08:00
3a985aa1f5 feat: Add get_current_prices function with yfinance support 2025-02-10 11:09:58 -08:00
cfa3e67417 fix: Resolve syntax error in get_current_prices function 2025-02-10 11:06:59 -08:00
1416d1b912 feat: Add real-time price tracking and P/L calculations using yfinance 2025-02-10 11:06:46 -08:00
8ea233ff7c feat: Add FIFO sell order handling in trade journal 2025-02-10 10:31:16 -08:00
952dfcd266 fix: Correct menu logic for portfolio value update and system exit 2025-02-10 10:18:59 -08:00
c363745542 feat: Initialize Portfolio and load existing trades in main function 2025-02-10 10:13:32 -08:00
c6089549ca fix: Correct syntax error in portfolio data check condition 2025-02-10 10:11:55 -08:00
838a2ac7d0 feat: Integrate portfolio tracking and cash balance management in trading system 2025-02-10 10:11:17 -08:00
529875527b feat: Resolve circular imports and create scanner_utils module 2025-02-10 10:01:46 -08:00
3dbaed0399 feat: Add user input escape mechanism with consistent quit options 2025-02-10 09:58:25 -08:00
9ccccfce97 feat: Add open trades summary with ticker-level insights and detailed trade information 2025-02-10 09:54:22 -08:00
6b09c85587 feat: Add target_price, stop_loss, and strategy to position summary query 2025-02-10 09:47:44 -08:00
0ce4bb4486 feat: Add timezone-aware datetime input with market hours validation 2025-02-10 09:45:29 -08:00
25a664e5bb fix: Update ClickHouse client query method in get_position_summary 2025-02-10 09:40:38 -08:00
4ebfcfebd1 fix: Update database operations for clickhouse-connect compatibility 2025-02-10 09:39:35 -08:00
e906c63893 feat: Enhance trading journal with multi-order position tracking and order types 2025-02-10 09:38:16 -08:00
15aadbe3da refactor: Modify ClickHouse database operations in journal.py for HTTP client compatibility 2025-02-10 09:33:19 -08:00
d6b6a289ed fix: Update import paths for trading module classes 2025-02-10 09:30:25 -08:00
3d4c48b82f fix: Add missing condition to check for empty data in process_symbol function 2025-02-10 09:29:01 -08:00
b887269152 refactor: Update import paths and add journal_menu function to journal.py 2025-02-10 09:27:13 -08:00
4e5b54c568 fix: Resolve indentation error in main.py by wrapping menu loop in main() function 2025-02-10 09:25:16 -08:00
0b40142bfb refactor: Simplify main menu logic with function calls 2025-02-10 09:24:22 -08:00
3425539781 refactor: Modularize main application structure and separate concerns 2025-02-10 09:23:51 -08:00
590c6fd2b7 feat: Add trading journal feature with database tracking 2025-02-10 09:18:16 -08:00
937e52f2f7 fix: Add missing imports for pandas, datetime, and db client 2025-02-09 12:18:57 -08:00
572ab3a3e1 refactor: Standardize scanner implementations using utility functions 2025-02-09 12:18:40 -08:00
f7ab8d6513 fix: Add missing imports to resolve undefined name errors 2025-02-09 12:16:40 -08:00
7f105bfd54 refactor: Modularize scanner initialization and signal processing 2025-02-09 12:16:27 -08:00
d8b41c8d8a feat: Add stock_type to signal processing in t_atr_ema_v2.py 2025-02-09 12:13:43 -08:00
1cc04b500a feat: Add stock_type to signal data in t_sunnyband.py 2025-02-09 12:12:28 -08:00
a80a4b12e5 feat: Add stock type to qualified stocks query and output 2025-02-09 12:10:02 -08:00
b8eaafafd6 fix: Correct price and volume filtering in get_qualified_stocks query 2025-02-09 00:45:19 -08:00
fcc8203aae fix: Add missing import for get_qualified_stocks in scanner files 2025-02-09 00:37:32 -08:00
1e6a05c81d refactor: Move common stock query logic to get_qualified_stocks function 2025-02-09 00:37:18 -08:00
69c5b12fd3 fix: Update SQL queries to handle trade_date column consistently 2025-02-09 00:35:30 -08:00
bf6c5e0880 refactor: Update SQL queries for consistent date handling in screeners 2025-02-09 00:32:58 -08:00
0a5ffbcadb fix: Correct datetime handling in scanner queries 2025-02-09 00:32:20 -08:00
c03a361096 fix: Correct timestamp handling in stock details query 2025-02-09 00:28:35 -08:00
d4e0bc2c92 refactor: Update scanner queries to calculate daily close prices from timestamps 2025-02-09 00:20:10 -08:00
cd7a33cb7e refactor: Filter stock data before aggregation in scanner queries 2025-02-09 00:15:02 -08:00
a9d380897a refactor: update entry conditions in ATR EMA scanners for better precision 2025-02-08 21:59:06 -08:00
1b852b2d8d fix: Remove nested try block and fix indentation in SQL query 2025-02-08 20:55:11 -08:00
819c91ff4a fix: Correct nested try blocks and indentation in t_sunnyband.py 2025-02-08 20:54:51 -08:00
4984d4944a fix: Properly use context manager for database connections in scanners 2025-02-08 20:54:31 -08:00
865438bbf8 refactor: Replace connection pool with context manager for ClickHouse connections 2025-02-08 20:52:36 -08:00
68e665a0c2 fix: Remove invalid 'use_session_id' setting from ClickHouse client config 2025-02-08 20:47:59 -08:00
906ecb7816 refactor: Rename get_client to create_client for consistency 2025-02-08 20:44:27 -08:00
a5cef08fd2 feat: add connection pool for managing multiple database connections 2025-02-08 20:41:08 -08:00
125273f22b refactor: Remove session handling in db_connection.py 2025-02-08 20:39:55 -08:00
4cf73e0a69 feat: Enhance ClickHouse client settings for better performance and session management 2025-02-08 20:35:32 -08:00
4dcb9c969e fix: Disable session checking and optimize ClickHouse client config 2025-02-08 20:27:33 -08:00
8d7ecb4f39 chore: Suppress urllib3 SSL warnings in main.py 2025-02-08 20:16:58 -08:00