Overview
This prompt aims to guide developers in creating a trading script for a 1-minute chart. Programmers and traders will benefit from structured steps to efficiently implement and test their trading strategies.
Prompt Overview
Purpose: This script automates trading decisions based on a 1-minute chart strategy.
Audience: The intended users are traders seeking to implement automated trading strategies.
Distinctive Feature: It utilizes indicators like moving averages and RSI for real-time buy/sell signals.
Outcome: Users will achieve efficient trading execution with optimized logic and error handling.
Quick Specs
- Media: Text
- Use case: Draft Writing, Enhancement, Generation
- Industry: Consulting (Management, Strategy), Development Tools & DevOps, 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: Beginner
Variables to Fill
No inputs required — just copy and use the prompt.
Example Variables Block
No example values needed for this prompt.
The Prompt
Develop a trading script for executing buy and sell orders on a 1-minute chart, following the guidelines provided in the documentation link.
## Steps
1. Review Documentation:
Access the provided documentation link.
Focus on relevant sections to understand:
– The scripting environment
– Syntax
– Functions
– Suitable indicators for a 1-minute trading strategy
2. Identify and Gather Requirements:
Determine the necessary:
– Programming constructs
– Market indicators
– Conditions for generating buy/sell signals for a 1-minute timeframe strategy
Pay close attention to aspects enabling real-time processing and decision-making.
3. Script Drafting:
– Initialize the script for operating on 1-minute intervals.
– Implement basic conditions to trigger buy/sell orders, utilizing indicators such as:
– Moving averages
– RSI
– Price crossovers
– Ensure the script handles real-time data efficiently.
4. Refinement and Testing:
– Optimize the trading logic by adhering to best practices found in the documentation.
– Conduct thorough testing to refine and adjust the script for accuracy and efficiency.
## Output Format
– Begin with a comment block outlining the script’s purpose and functionality.
– Present the script code clearly, using proper syntax as dictated by the documentation, emphasizing core trading logic.
– Use comments throughout the code for better understanding and maintainability.
## Example
“`javascript
// This script facilitates trading on a 1-minute chart
// Moving average crossover strategy is used for buy/sell signals
var shortMA = calculateSMA(priceData, shortWindow);
var longMA = calculateSMA(priceData, longWindow);
if (shortMA > longMA) {
// Execute a buy order
executeBuyOrder();
} else if (shortMA < longMA) { // Execute a sell order executeSellOrder(); } ``` ## Notes - Ensure adaptation of the indicators and conditions specifically prescribed in the documentation. - Comply with any regulatory or exchange-specific rules outlined in the documentation. - Incorporate error handling and logging mechanisms to enhance the robustness of the script. [/prompt_box]
Screenshot Examples
How to Use This Prompt
- Copy the prompt provided above.
- Access the documentation link mentioned in the prompt.
- Gather requirements for the trading script based on the documentation.
- Draft the trading script using the identified indicators and conditions.
- Refine and test the script for accuracy and efficiency.
- Ensure proper commenting and formatting in the final script output.
Tips for Best Results
- Understand the Environment: Familiarize yourself with the scripting environment and syntax to ensure compatibility with the trading platform.
- Define Indicators: Choose appropriate indicators like moving averages and RSI that suit a 1-minute trading strategy for effective signal generation.
- Optimize Logic: Refine your trading logic by following best practices from the documentation to enhance performance and reliability.
- Test Thoroughly: Conduct extensive testing of the script to ensure accuracy in executing buy and sell orders under real-time conditions.
FAQ
- What is the first step in developing a trading script?
Review the provided documentation to understand the scripting environment and syntax. - Which indicators are suitable for a 1-minute trading strategy?
Moving averages, RSI, and price crossovers are effective indicators for this strategy. - What should be included in the script's comment block?
The comment block should outline the script's purpose and functionality clearly. - Why is testing important in script development?
Testing helps refine the script for accuracy and efficiency, ensuring optimal performance.
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.


