Overview
This prompt aims to guide users in creating a trading script for efficient buy and sell operations. Coders and traders will benefit from structured instructions and best practices for scripting.
Prompt Overview
Purpose: This script automates buy and sell operations on a 1-minute trading chart.
Audience: Designed for traders and developers familiar with scripting in financial markets.
Distinctive Feature: Utilizes moving averages and RSI for rapid execution of trades based on real-time data.
Outcome: A refined trading script that enhances efficiency and adheres to best practices in coding.
Quick Specs
- Media: Text
- Use case: Content Creation, Enhancement, Expansion & Elaboration
- Industry: Data & Analysis, Fintech & Digital Banking, General Business Operations
- Techniques: Decomposition, Role/Persona Prompting, Structured Output
- Models: Claude 3.5 Sonnet, Gemini 2.0 Flash, GPT-4o, Llama 3.1 70B
- Estimated time: 5-10 minutes
- Skill level: Intermediate
Variables to Fill
- [Indicator X] – Indicator X
- [Indicator Y] – Indicator Y
Example Variables Block
- [Indicator X]: Moving Average
- [Indicator Y]: Relative Strength Index
The Prompt
Create a trading script for executing buy and sell operations on a 1-minute chart based on the provided documentation.
### Steps
1. Visit the Documentation:
Access the provided link to read and understand the scripting environment by reviewing the necessary sections.
2. Identify Key Concepts:
Extract specific syntax, functions, or indicators from the documentation that are relevant for creating a buy/sell trading script.
3. Draft the Script:
– Initialize the Environment:
Set up the script environment specifically for a 1-minute chart.
– Code Trading Logic:
Implement basic trading logic to automatically trigger buy and sell operations.
Utilize indicators such as moving averages, RSI, or price crossovers suitable for rapid execution.
Ensure efficient processing of real-time data.
4. Refine and Optimize:
– Confirm that the script adheres to best practices outlined in the documentation.
– Conduct tests and refine the logic for precision and efficiency, optimizing for speed and resource management.
### Output Format
– Begin with a brief comment header that outlines the script’s purpose and functionality.
– Write the code using the correct syntax as derived from the documentation.
– Include clear and descriptive comments throughout the script for improved readability.
### Example
“`javascript
// Trading script for executing buy/sell orders on a 1-minute chart
// Implements a simple moving average crossover strategy
// Adjust parameters based on indicators like [Indicator X] and [Indicator Y] from the documentation
// Initialize environment setup for 1-minute chart …
// Code logic for buy/sell based on conditions…
// Handle real-time data stream…
// Provide logging and error handling…
“`
### Notes
– Customize indicators or market conditions using examples and suggestions from the documentation.
– Ensure the script complies with any legal or regulatory constraints specified within the documentation.
– Implement exception handling and comprehensive logging as part of scripting best practices.
Screenshot Examples
How to Use This Prompt
- [SCRIPT_ENVIRONMENT]: Setup for 1-minute trading chart.
- [TRADING_LOGIC]: Conditions for buy/sell operations.
- [INDICATORS]: Tools like moving averages and RSI.
- [REAL_TIME_DATA]: Processing live market information.
- [ERROR_HANDLING]: Managing exceptions and logging issues.
- [BEST_PRACTICES]: Adhering to scripting guidelines.
- [PARAMETERS]: Customizable settings for indicators.
- [TESTING]: Refining script for precision and efficiency.
Tips for Best Results
- Read the Documentation: Familiarize yourself with the scripting environment and key functions.
- Set Up the Environment: Initialize the script for a 1-minute chart to ensure accurate trading operations.
- Implement Trading Logic: Use indicators like moving averages and RSI to define buy/sell conditions for rapid execution.
- Optimize and Test: Refine the script for efficiency and accuracy, ensuring compliance with best practices and regulations.
FAQ
- What is the purpose of the trading script?
The script automates buy and sell operations on a 1-minute chart using trading indicators. - Which indicators can be used in the script?
Indicators like moving averages, RSI, and price crossovers are suitable for rapid execution. - What should be included in the script comments?
Comments should explain the script's purpose, functionality, and specific code logic for clarity. - How can the script be optimized?
Refine the logic for precision, ensure efficient data processing, and adhere to best practices.
Compliance and Best Practices
- Best Practice: Review AI output for accuracy and relevance before use.
- Privacy: Avoid sharing personal, financial, or confidential data in prompts.
- Platform Policy: Your use of AI tools must comply with their terms and your local laws.
Revision History
- Version 1.0 (February 2026): Initial release.


