Page 1 of 7
System Requirements Document (SRD)
zen-institution
1. Introduction
Welcome to the System Requirements Document (SRD) for zen-institution, a project designed to create a robust, automated trading system based on Moving Average (MA) crossovers. This document outlines the functional and non-functional requirements, user personas, design concepts, and technical specifications for the Expert Advisor (EA) implementation in MQL5. The EA will focus on trading the XAUUSD symbol using the parameters provided by Murali Krishna, ensuring precision, risk management, and dynamic execution.
This SRD has been tailored to meet the needs of Murali Krishna, based in Qatar (QA), with specific locale considerations such as timezone (AST) and currency (QAR).
Page 2 of 7
2. System Overview
The zen-institution EA is an automated trading system designed for the MetaTrader 5 (MT5) platform. It leverages Moving Average (MA) crossovers (5-period and 20-period) on the 1-minute timeframe to generate buy and sell signals. The EA incorporates advanced filters, risk management protocols, and execution settings to optimize trading performance while minimizing risk. Key features include:
- ATR-based volatility shield
- High-impact news auto-filter
- Order flow liquidity threshold
- Momentum sensitivity
- Volatility spike protection
- Dynamic lot sizing and trade cycle management
- Selective re-run capability for regenerating the SRD
The system is designed for institutional-grade trading, ensuring reliability, scalability, and adaptability to changing market conditions.
3. Functional Requirements
Page 3 of 7
Story Points
- As a User, I should be able to trade based on MA crossovers (5 & 20) on the 1-minute timeframe.
- As a User, I should be able to filter trades based on ATR volatility shield (85).
- As a User, I should be able to automatically avoid trading during high-impact news events.
- As a User, I should be able to set a liquidity threshold (1.2) for order flow.
- As a User, I should be able to prioritize execution latency (1).
- As a User, I should be able to limit trades to a maximum spread of 500.
- As a User, I should be able to enable smart liquidity filtering for optimal execution.
- As a User, I should be able to set the initial lot size to 0.1 and apply a lot multiplier of 2 for subsequent trades.
- As a User, I should be able to limit execution slippage to 3.
- As a User, I should be able to enforce a minimum distance of 20 pips between trades.
- As a User, I should be able to set momentum sensitivity to 1.5 for trade confirmation.
- As a User, I should be able to limit trades to 7 per cycle.
- As a User, I should be able to enable volatility spike protection.
- As a User, I should be able to enforce a minimum candle size of $2 for valid trade signals.
- As a User, I should be able to set a daily equity target (0 for continuous trading).
- As a User, I should be able to disable or set a maximum floating loss threshold (0 to disable).
- As a User, I should be able to enable or disable dynamic trailing targets.
- As a User, I should be able to set emergency protection levels.
- As a User, I should be able to selectively re-run the SRD generation process to regenerate the document based on updated requirements.
4. User Personas
1. Trader
- Description: Primary user responsible for configuring and monitoring the EA.
- Goals: Optimize trading performance, minimize risk, and achieve consistent profitability.
- Pain Points: High market volatility, slippage, and execution delays.
- Key Features Needed: Customizable parameters, real-time alerts, and robust risk management.
Page 4 of 7
2. Administrator
- Description: Oversees system performance and ensures compliance with institutional policies.
- Goals: Ensure system reliability, scalability, and adherence to trading protocols.
- Pain Points: System downtime, lack of transparency, and insufficient reporting.
- Key Features Needed: Detailed logs, performance metrics, and emergency controls.
3. System Engineer
- Description: Responsible for maintaining and updating the SRD and EA logic.
- Goals: Ensure the SRD reflects the latest requirements and supports selective re-run capability.
- Pain Points: Managing frequent updates and ensuring consistency across versions.
- Key Features Needed: Selective re-run functionality for regenerating the SRD.
5. Visuals Colors and Theme
Color Palette
The zen-institution EA will feature a sleek, professional color palette inspired by the precision and clarity of institutional trading:
- Background: #1E1E2F (Deep Midnight Blue)
- Surface: #2A2A40 (Slate Gray)
- Text: #E5E5E5 (Soft White)
- Accent: #FFD700 (Gold - representing XAUUSD)
- Muted Tones: #737373 (Neutral Gray)
6. Signature Design Concept
Page 5 of 7
Interactive Trading Dashboard
The homepage of the zen-institution EA will feature a dynamic trading dashboard with the following elements:
- Live Market Visualization: A real-time candlestick chart with overlays for the 5-period and 20-period moving averages. The chart will animate smoothly, showing MA crossovers as glowing points of interest.
- Interactive Filters: Users can toggle ATR shields, news filters, and other parameters via sliding controls that visually update the chart.
- Trade Cycle Animation: A circular progress bar will represent the current trade cycle, filling dynamically as trades are executed.
- Gold Accents: The dashboard will incorporate subtle gold highlights to reflect the XAUUSD symbol, creating a luxurious and professional aesthetic.
- Micro-Interactions: Buttons and sliders will have hover effects, such as glowing edges and subtle vibrations, to enhance user engagement.
This design will make the EA visually compelling while ensuring functionality and ease of use.
7. Non-Functional Requirements
- Performance: The EA must execute trades within 100ms of signal generation.
- Scalability: The system should support multiple symbols and timeframes if expanded.
- Reliability: The EA must maintain 99.9% uptime during trading hours.
- Security: All user data and trading logs must be encrypted.
- Compatibility: The EA must be compatible with MetaTrader 5 and adhere to MQL5 standards.
- Selective Re-run Capability: The system must allow users to regenerate the SRD based on updated requirements.
8. Tech Stack
Frontend
- Not applicable (EA operates within MetaTrader 5).
Page 6 of 7
Backend
- Python for auxiliary tools (e.g., news filtering API).
- FastAPI for real-time data feeds.
Database
- MySQL for storing logs and performance metrics.
AI Models
- Claude 4.6 Opas for coding assistance and academic analysis.
- Google Nano Banana for generating visual assets (e.g., dashboard icons).
Orchestration
- Docker for local development and testing.
- Kubernetes for server-side orchestration (if expanded to institutional use).
9. Assumptions and Constraints
Assumptions
- The EA will operate primarily on the XAUUSD symbol.
- Users will have access to MetaTrader 5 and a compatible broker.
- High-impact news events will be identifiable via external APIs.
- Selective re-run functionality will be triggered manually by the user.
Page 7 of 7
Constraints
- The EA must adhere to MQL5 coding standards.
- Execution speed may depend on broker latency and server performance.
- The system will not support manual trading overrides.
- Selective re-run capability is limited to SRD regeneration and does not affect EA execution.
10. Glossary
- EA (Expert Advisor): Automated trading system for MetaTrader platforms.
- MA (Moving Average): A technical indicator used to smooth price data.
- ATR (Average True Range): A measure of market volatility.
- Slippage: The difference between expected and actual trade execution prices.
- Lot Size: The quantity of an asset traded in a single transaction.
- Cycle: A series of trades executed within a defined set of parameters.
- Selective Re-run Capability: A feature allowing users to regenerate the SRD based on updated requirements.
This concludes the updated System Requirements Document for zen-institution. Let me know if further refinements are needed, Murali!
No comments yet. Be the first!