Overview
This prompt aims to guide programmers in adjusting an Expert Advisor’s entry logic while maintaining its core functionality. Programmers and traders using EAs will benefit from clearer and more effective trading strategies aligned with specific indicators.
Prompt Overview
Purpose: The purpose of this modification is to enhance the Expert Advisor’s entry logic using a specified indicator’s signals.
Audience: This content is intended for programmers and developers familiar with trading algorithms and Expert Advisors.
Distinctive Feature: The modification focuses solely on entry conditions, ensuring the original EA’s core logic remains intact.
Outcome: The EA will now place orders parallel to the indicator’s upper line, improving trading accuracy based on indicator signals.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Creative Writing & Storytelling, Development Tools & DevOps, Productivity & Workflow
- Techniques: Role/Persona Prompting, Self-Critique / Reflection, Structured Output
- Models: Claude 3.5 Sonnet, Gemini 2.0 Flash, GPT-4o, Llama 3.1 70B
- Estimated time: 10-20 minutes
- Skill level: Intermediate
Variables to Fill
- [placeOrder();] – Placeorder();
- [placeOrderParallelToIndicatorLine();] – Placeorderparalleltoindicatorline();
- [placeOrderOriginalWay();] – Placeorderoriginalway();
Example Variables Block
- [placeOrder();]: Example Placeorder();
- [placeOrderParallelToIndicatorLine();]: Example Placeorderparalleltoindicatorline();
- [placeOrderOriginalWay();]: Example Placeorderoriginalway();
The Prompt
Adjust the existing Expert Advisor (EA) to modify only its entry logic based on a specified indicator’s signals, while preserving the EA’s overall trading logic.
**Detailed Instructions:**
– Preserve the original EA’s core logic and functionality.
– Change only the entry conditions by incorporating the indicator’s order placement function.
– The indicator plots an upper line; when this upper line is present, the EA should place orders parallel to this indicator line.
– Ensure that the order placement aligns correctly with the indicator’s upper line position.
– Maintain code clarity and ensure no other EA components are altered.
**Steps:**
1. Analyze the original EA’s entry logic to understand how and where orders are placed.
2. Integrate the provided indicator’s order placement function into the EA’s entry conditions.
3. Implement logic to detect when the indicator plots the upper line.
4. Modify the order placement so that when the upper line is detected, orders are placed parallel to that line.
5. Test to confirm that only the entry logic is altered and that the EA behavior aligns with indicator signals.
**Output Format:**
Provide the modified EA code snippet or full code with the updated entry logic clearly commented. Highlight where changes were made to incorporate the indicator’s signals and order placement parallel to the indicator’s upper line.
**Notes:**
– Do not modify exit logic, risk management, or other non-entry parts of the EA.
– Ensure the integration respects the indicator’s update frequency and data availability.
– The ‘parallel to indicator’ placement means orders are aligned in price or time dimension relative to the upper line plotted by the indicator.
**Example:**
“`
// Original EA entry logic snippet
// if(condition) [placeOrder();]
// Modified entry logic snippet
// if(indicatorPlotsUpperLine()) [placeOrderParallelToIndicatorLine();]
// else [placeOrderOriginalWay();]
“`
Screenshot Examples
How to Use This Prompt
- [EA_CORE_LOGIC]: Original trading logic of the EA.
- [ENTRY_CONDITIONS]: Conditions for placing new orders.
- [INDICATOR_UPPER_LINE]: Indicator’s upper line signal detection.
- [ORDER_PLACEMENT]: Function for executing trade orders.
- [PARALLEL_PLACEMENT]: Orders aligned with indicator’s upper line.
- [CODE_CLARITY]: Maintain clear and understandable code.
- [TESTING]: Verify only entry logic is modified.
- [RISK_MANAGEMENT]: Original risk settings remain unchanged.
Tips for Best Results
- Understand Existing Logic: Carefully review the original EA’s entry conditions to identify how orders are currently placed.
- Integrate Indicator: Incorporate the indicator’s order placement function into the EA, ensuring it only affects entry conditions.
- Detect Upper Line: Implement logic to check for the presence of the indicator’s upper line before placing any orders.
- Test Thoroughly: After modifications, rigorously test the EA to ensure only the entry logic has changed and that it behaves as expected with the indicator signals.
FAQ
- What is an Expert Advisor in trading?
An Expert Advisor (EA) is a software program that automates trading decisions in financial markets. - How do you modify an EA's entry logic?
You analyze the existing logic, then integrate new conditions based on indicators while preserving core functionality. - What does 'parallel to indicator line' mean?
It means placing orders at prices aligned with the upper line of the specified indicator. - Why is testing important after modifying an EA?
Testing ensures that changes work as intended and do not negatively impact the EA's overall 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.


