# Selam

> Forensic trade analysis and market reconstruction tool for MT5/MQL5 developers and XAUUSD traders.

Selam is a paid AI agent skill on Agensi by Masree Mohd Yusof, in Trading & Investing. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $8.99 (one-time purchase)
- Creator: [Masree Mohd Yusof](https://www.agensi.io/creators/mae6876)
- Category: [Trading & Investing](https://www.agensi.io/skills/trading-investing)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/selam
- Tags: trading, mql5, metatrader, backtesting, data-analysis

## About this skill

Trading algorithms often fail because developers look at backtest summaries instead of raw market behavior. Selam solves this by providing a deep-dive forensic analysis of MT5 logs and raw price action. It bridges the gap between MQL5 code logic and the "trader's eye" needed to understand why a strategy actually wins or loses.

### What it does
- **Trade Autopsy** identifies the primary cause of losses using a 10-point evidence-based template.
- **Market Reconstruction** builds a narrative from OHLC data to identify high-timeframe structure, zones, and liquidity sweeps.
- **Engine Troubleshooting** audits MQL5 logs and EA code to find state-loss bugs, handle leaks, and execution errors.
- **Disciplined Tuning** conducts controlled experiments to optimize parameters like ATR-based stops and entry cooldowns without overfitting.
- **Missed Trade Analysis** scans logs to determine why specific setups were skipped by filters or session rules.

### How it works
1. **Log Ingestion** parses MT5 terminal, tester, and agent logs to build a complete Trade Register with MAE/MFE metrics.
2. **Chart Annotation** calculates candle anatomy including Body%, Wick%, and Relative Volume to find displacement clusters.
3. **Hypothesis Testing** runs one-change-at-a-time experiments, comparing results against a baseline to verify improvements.
4. **Validation** applies overfitting protection through out-of-sample testing and plateau analysis of parameter neighbors.

### Frameworks & tools
Specifically designed for MetaTrader 5 (MT5) and MQL5. Uses PowerShell for log filtering and Python for raw bar analysis via the `market_story.py` script.

### Why this beats prompting it yourself
Generic prompts often hallucinate price levels or miss technical MQL5 state bugs. This skill enforces a "Facts First" protocol that separates observation from interpretation, ensuring every conclusion is cited with log evidence or candle coordinates.

### Use cases
- Debugging why an EA entered a trade that a human trader would have skipped.
- Analyzing MT5 logs to find hidden execution issues like slippage or requotes.
- Stress-testing a strategy's sensitivity to spread widening and news events.
- Creating a weekly trading journal that segments performance by session and regime.

### Known limitations
Requires raw OHLC data or specific `[Ctx]` log tags for full accuracy. Visual chart reading is approximate without a visible scale.

## Requires

- Python
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Selam skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Which trading platforms and assets is Selam compatible with?

Selam is specifically optimized for MetaTrader 5 (MT5) and MQL5 development, with a specialized focus on XAUUSD (Gold) market dynamics and liquidity patterns.

### What technical components are included in the purchase?

The skill includes the core analysis engine, the market_story.py script for raw bar analysis, and a PowerShell utility for automated MT5 log filtering and ingestion.

### How does Selam's analysis differ from simply asking a standard LLM to review my trades?

Unlike generic AI prompts, Selam uses a 'Facts First' protocol that cross-references MQL5 code logic with raw OHLC data to ensure every trade autopsy is cited with specific log evidence rather than hallucinations.

### What specific data do I need to provide for the Forensic Trade Analysis to work?

To get the most accurate results, you should ensure your EA uses specific [Ctx] log tags and provide raw OHLC data in CSV format for the 'Market Reconstruction' features.

### Can Selam help me optimize my EA parameters without causing overfitting?

Yes, the 'Disciplined Tuning' module uses one-change-at-a-time experiments and plateau analysis of parameter neighbors to ensure your optimizations are robust and not just chasing historical noise.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
