Overview
This prompt aims to guide developers in enhancing an Expert Advisor’s market detection and adaptive trading strategies. Programmers and traders will benefit from improved trading performance and reduced risk in varying market conditions.
Prompt Overview
Purpose: The goal is to enhance the Expert Advisor’s ability to identify market types and adapt strategies accordingly.
Audience: This improvement targets traders and developers seeking to optimize automated trading performance in varying market conditions.
Distinctive Feature: The EA now utilizes real-time tick data analysis to classify market conditions as trending or ranging.
Outcome: The updated EA will improve trading precision and reduce losses by dynamically adjusting strategies based on market type.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Consulting (Management, Strategy), Fintech & Digital Banking, Machine Learning & Data Science
- Techniques: Decomposition, Plan-Then-Solve, 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
Improve the Expert Advisor (EA) to enhance its precision and intelligence by enabling it to identify the market type—either trending or ranging—using tick data. The EA should dynamically adapt its trading strategy based on the detected market condition to optimize performance and avoid adverse effects from different market phases.
# Steps
1. Analyze Tick Data
Determine the current market type (trend or range) through comprehensive analysis.
2. Implement Real-Time Logic
Develop logic within the EA to classify market conditions in real-time using tick analysis.
3. Dynamic Strategy Adjustment
Adjust trading algorithms dynamically based on the identified market type:
– Trending Markets: Employ trend-following strategies.
– Ranging Markets: Switch to range-based or mean-reversion strategies.
4. Maintain Precision
Ensure the EA maintains precision and minimizes false signals, regardless of the market phase.
5. Testing for Adaptability
Test the updated EA across various market conditions to verify its adaptability and intelligence.
# Output Format
Provide a detailed explanation of the enhancements made to the EA, including:
– Methodology: Describe the methodology used for market type detection based on tick data.
– Adaptation Mechanism: Explain how the EA adapts its trading strategies according to market conditions.
– Algorithm Changes: Detail any changes in the algorithm or code structure to support these features.
If applicable, include pseudocode or algorithmic descriptions that illustrate the implementation.
Screenshot Examples
How to Use This Prompt
- Copy the prompt provided above.
- Paste the prompt into your coding environment or documentation.
- Follow the steps outlined to enhance the Expert Advisor.
- Implement the suggested methodologies for market type detection.
- Test the EA across different market conditions for effectiveness.
- Document the changes and results for future reference.
Tips for Best Results
- Analyze Tick Data: Use statistical methods to classify market conditions by analyzing price movements and volatility in tick data.
- Implement Real-Time Logic: Create a real-time classification system within the EA that continuously monitors tick data to identify whether the market is trending or ranging.
- Dynamic Strategy Adjustment: Program the EA to switch between trend-following and mean-reversion strategies based on the detected market type for optimized trading performance.
- Testing for Adaptability: Conduct extensive backtesting and forward testing under various market conditions to ensure the EA’s strategies are effective and adaptable.
FAQ
- How does the EA analyze tick data for market type?
The EA uses statistical methods to assess price movements and volatility in tick data to classify market conditions. - What logic is implemented for real-time market classification?
The EA employs a combination of moving averages and volatility indicators to classify the market as trending or ranging. - How does the EA adjust its trading strategies?
In trending markets, it uses trend-following strategies; in ranging markets, it applies mean-reversion techniques. - What testing is done to ensure adaptability?
The EA is tested across diverse market conditions to evaluate its performance and adaptability in real-time trading.
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.


