Closed traderscafe11 closed 3 months ago
[!CAUTION]
Review failed
The pull request is closed.
The recent changes enhance the order management and error-handling capabilities across various modules. A new function, cancel_normal_orders
, allows for the cancellation of normal orders, improving workflow accuracy. Additionally, error-checking mechanisms have been streamlined to ensure robust handling of symbols, thus bolstering the reliability of trading strategies. Overall, these modifications refine functionality and clarity, paving the way for a more efficient trading environment.
Files | Change Summary |
---|---|
Executor/ExecutorUtils/BrokerCenter/BrokerCenterUtils.py |
Added cancel_normal_orders function to cancel normal orders, enhancing order management with detailed logging and error handling. |
Executor/ExecutorUtils/EquityCenter/EquityCenterUtils.py |
Enhanced error handling in get_asm_gsm_list and added check_symbol_for_errors , which checks symbol validity with improved logging. |
Executor/NSEStrategies/Equity/LongTerm/LongTerm.py |
Replaced error-checking logic by consolidating into check_symbol_for_errors , simplifying control flow and ensuring only valid symbols are processed. |
Executor/NSEStrategies/Equity/MidTerm/MidTerm.py |
Similar to LongTerm, replaced check_symbol_in_list with check_symbol_for_errors , shifting focus to robust error validation for symbols. |
Executor/NSEStrategies/Equity/ShortTerm/ShortTerm.py |
Like the previous two, replaced checks with check_symbol_for_errors , enhancing reliability and simplifying the main function's logic. |
Executor/Scripts/2_GoodEvening/1_SweepOrders/SweepOrders.py |
Added call to cancel_normal_orders in sweep_sl_order , altering order handling process by ensuring normal orders are canceled before further actions. |
User/UserApi/userapi_utils.py |
Simplified calculate_active_users_data by directly obtaining total holdings from portfolio data, improving readability and performance without changing public entity declarations. |
sequenceDiagram
participant User
participant BrokerCenter
participant EquityCenter
participant OrderSystem
User->>BrokerCenter: Request Order Cancellation
BrokerCenter->>OrderSystem: cancel_normal_orders(tradebook, user)
OrderSystem->>BrokerCenter: Return Cancellation Status
BrokerCenter->>User: Notify Cancellation Result
🐰 "In code we hop, with changes bright,
Canceling orders, making things right.
Symbols checked with care and glee,
Order flows smooth, as smooth can be!
A leap towards clarity, we cheer and play,
In the world of trading, we dance all day!" 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Refactor