Overview
This prompt aims to guide developers in modifying an Expert Advisor by adding a configurable input parameter for auto-minimize functionality. Programmers working with EAs will benefit from this clear instruction to enhance user control without altering existing logic.
Prompt Overview
Purpose: This addition allows users to control the auto-minimize feature of the EA trade panel.
Audience: This modification is intended for developers and traders using the EA who prefer customizable settings.
Distinctive Feature: The new input parameter, `AutoMinimize`, provides a straightforward toggle for the auto-minimize functionality.
Outcome: Users can now enable or disable auto-minimize without altering the core logic of the EA.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Development Tools & DevOps, Productivity & Workflow
- Techniques: Role/Persona Prompting
- 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
You are given an Expert Advisor (EA) trade panel that currently auto-minimizes based on built-in logic.
Your task is to add an input option (true/false) that allows the user to enable or disable this auto-minimize feature without changing any existing code or logic of the EA.
You must only add this option as a configurable input parameter; do not modify any core functionality, flow, or logic of the EA.
**Steps:**
1. Identify the portion of the EA where the auto-minimize behavior is triggered.
2. Without altering the logic, add an input parameter called `AutoMinimize` that accepts boolean values (true/false).
3. Use this input parameter as a toggle to control whether the EA auto-minimizes or not.
4. Ensure that the default behavior remains the same if the input is set to true.
5. No other code or logic should be changed besides adding this input and conditioning the auto-minimizing behavior on this input.
**Output Format:**
– Provide the exact input declaration syntax for the EA language (e.g., MQL4 or MQL5), including the new input parameter with a description.
– Then provide a code snippet showing how this parameter is used to toggle the auto-minimize functionality in the existing code snippet.
**Examples:**
**Input declaration:**
“`mql
input bool AutoMinimize = true; // Enable or disable auto-minimize of the trade panel
“`
**Usage snippet:**
“`mql
if (AutoMinimize)
{
// Existing auto-minimize code
}
“`
**Notes:**
– Do not change any logic or flow outside of adding this input and condition.
– The input should be user-friendly and clearly documented.
– Assume the user will integrate this code snippet into their existing EA manually, so keep changes minimal.
Screenshot Examples
How to Use This Prompt
- Copy the prompt provided above.
- Identify the EA code section for auto-minimize behavior.
- Add the input parameter for AutoMinimize as specified.
- Implement the toggle condition using the new parameter.
- Test the EA to ensure functionality remains unchanged.
- Document the changes for user clarity and ease of use.
Tips for Best Results
- Input Declaration:
input bool AutoMinimize = true; // Enable or disable auto-minimize of the trade panel - Usage Snippet:
if (AutoMinimize) { // Existing auto-minimize code } - Default Behavior: Ensure that if
AutoMinimizeis set to true, the EA continues to auto-minimize as before. - User-Friendly: Clearly document the purpose of
AutoMinimizefor easy understanding by users.
FAQ
- How do I add an input parameter in MQL?
Use the 'input' keyword followed by the type and variable name, e.g., 'input bool AutoMinimize'. - What should the default value of AutoMinimize be?
Set the default value to true to maintain existing functionality unless changed by the user. - Where should I place the AutoMinimize condition?
Place it around the existing auto-minimize logic to control its execution based on the parameter. - Can I modify existing EA logic while adding this feature?
No, you must only add the input and condition without altering any existing logic.
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.


