Catalyst
Prompt Studio
Library
Studio
Log In
Prompt Editor
Refine, edit, and optimize your generated prompt.
Ready for your AI model
**Programming Task: Trading Script Refactoring** **Objective:** Refactor the provided trading script to significantly enhance its maintainability, readability, modularity, and adherence to established best practices. **Required Input:** 1. **Trading Script Code:** Provide the complete source code of the existing trading script. 2. **Programming Language:** Explicitly state the programming language of the script (e.g., Python, JavaScript, C++). *Assumption: If not specified, Python will be assumed.* **Refactoring Directives:** 1. **Modularity:** Decompose large functions or code blocks into smaller, single-responsibility functions or classes. 2. **Readability:** Improve variable, function, and class naming for clarity. Add concise comments and docstrings where logic is not immediately obvious. 3. **Best Practices:** Align the code with the standard coding conventions and idiomatic patterns for the specified programming language (e.g., PEP 8 for Python). 4. **Error Handling:** Implement or refine robust error handling mechanisms to gracefully manage potential issues (e.g., API failures, invalid inputs, network errors). 5. **Efficiency:** Identify and apply minor performance optimizations for critical sections of the script without introducing undue complexity. **Expected Output:** A single, complete code block containing the fully refactored trading script.
Discard Changes
Download
Save Prompt
Metadata
Target Engine
ChatGPT-5
Category
Chat / Conversation
Creative / AI
CLI / DevOps
Image Generation
3D / Frames
Design / Visual
Writing / Article
Code / Engineering
Workspace
None (Personal)
Tags
Visibility
Public