(Thought) Autonomous AI "Research Agent" for CommunityPower EA (MT5 + MCP)
The Goal
is to allow an LLM (like claude sonnet 4.5 / gemini3.0 or cli via Cursor/Antigravity/kilocode/other IDE) to:
- Read our complex
.setfiles intelligibly. - Understand the parameters by cross-referencing the official docs for CommunityPowerEA.
- Modify the strategy safely based on natural language (e.g., "Make this set news-neutral").
- (Future Phase) Run the backtest automatically and learn from the results with windows MCP. https://github.com/CursorTouch/Windows-MCP

The Challenge: Parsing .set Files
We all know the CommunityPower .set files use the custom MT5 optimization syntax:
Key=Value||Start||Step||Stop||Enabled
Example Raw Line:
Lot_Per_1000=0.01||0.01||0.001000||0.100000||N
If you feed this raw text to an AI, it gets confused by the optimization parameters (||...). It often hallucinates or breaks the file format when trying to edit it.
The Solution: A Custom MCP Parser To develop a Python-based MCP server that parses this syntax into a clean JSON structure that the AI can understand.
The Knowledge Gap (RAG Integration)
The EA uses numeric IDs for settings, which is hard for an AI to interpret.
- In File:
Oscillators_Indicator=3 - To AI: "Set Indicator to 3" (The AI doesn't know what 3 is).
Such integrating the documentation so the MCP Server presents this to the AI as:
- To AI:
Oscillators_Indicator=3 (Stochastic)
E.g:
def parse_cp_line(line):
"""
Converts: Lot_Per_1000=0.01||0.01||0.001||0.1||N
To: {'value': 0.01, 'opt_start': 0.01, 'opt_step': 0.001, ...}
"""
if "=" not in line or "||" not in line:
return None
key, properties = line.split("=", 1)
parts = properties.split("||")
# The AI primarily cares about the 'active_value'
return {
"parameter": key.strip(),
"active_value": parts[0],
"optimization_config": {
"start": parts[1],
"step": parts[2],
"stop": parts[3],
"enabled": parts[4]
}
}
Yeah, everyone is using LLMs now, even this thread was generated, wasn't it? Do you want my LLM to answer this? ;)
I don't think MT5 and CP EA are the best choice for automating this job. CP is powerful, right, but MT5 is not flexible enough to automate complex tasks.
Check out some open source projects on the web, there are many of them now.