- Fonds propres
- Prélèvement
Distribution
| Symbole | Transactions | Sell | Buy | |
|---|---|---|---|---|
| US500 | 3 | |||
| BA.LSE | 1 | |||
| MSFT.NAS | 1 | |||
|
1
2
3
|
1
2
3
|
1
2
3
|
| Symbole | Bénéfice brut, USD | Perte, USD | Profit, USD | |
|---|---|---|---|---|
| US500 | -12 | |||
| BA.LSE | 0 | |||
| MSFT.NAS | 0 | |||
|
5
10
15
20
25
30
|
5
10
15
20
25
30
|
5
10
15
20
25
30
|
| Symbole | Bénéfice brut, pips | Perte, pips | Profit, pips | |
|---|---|---|---|---|
| US500 | -1.9K | |||
| BA.LSE | -250 | |||
| MSFT.NAS | -122 | |||
|
2K
4K
6K
|
2K
4K
6K
|
2K
4K
6K
|
- Charge de dépôt
- Prélèvement
Le dérapage moyen basé sur les statistiques d'exécution sur réel les comptes de divers courtiers est spécifié en pips. Elle dépend de la différence entre les cotations du fournisseur de "ICMarketsEU-MT5-5" et les cotations de l'abonné, ainsi que des délais d'exécution des commandes. Des valeurs inférieures signifient une meilleure qualité de copie.
|
ICMarketsEU-MT5-5
|
0.00 × 1 | |
📌 Product Description
SP500 EMA EA with Smart TSL & RSI
A professional, fully automated Expert Advisor designed specifically for high-precision SP500 index trading.
Built by Peter Dimitrov, this EA combines a reliable EMA crossover system, dynamic risk-based position sizing, RSI filtering, advanced smart trailing stop logic, and fully configurable trading sessions.
🔍 Strategy Overview
This Expert Advisor uses a robust trend-following logic based on the crossover of two EMAs (21 & 200 by default), combined with RSI filtering to avoid entering during overextended market conditions.
When a valid signal appears, the EA calculates the recent market low, determines an adaptive stop-loss distance, and automatically adjusts the lot size based on the trader’s Max Risk % setting. This ensures controlled and consistent risk management on every trade.
The integrated Smart Trailing Stop (TSL) mechanism dynamically follows price peaks and adjusts the stop-loss only when the conditions are optimal—ensuring trend trades are protected without reducing profit potential.
📈 Recommended Symbol & Timeframe
Symbol: SP500 / US500 / S&P 500 CFDs or futures
Timeframe: M30 (default)
Account Types: ECN, Raw Spread, low-spread accounts recommended
✨ Key Features
✔ EMA Crossover Trend Strategy
Entry triggered when the fast EMA crosses the slow EMA.
Uses previous bar values to avoid repainting.
Suitable for SP500 (US500) and other major indices.
✔ RSI Filter
Prevents buying into overbought conditions.
Fully configurable period & threshold.
✔ Smart Trailing Stop (TSL)
Moves the stop-loss only when new peaks are formed.
Respects broker stop levels and price precision.
Avoids micromodifications with built-in minimum movement threshold.
✔ Dynamic Risk Management
Risk per trade is automatically calculated from:
Recent market volatility
Stop-loss distance
MaxRiskPercent input
Lot size is adjusted to ensure consistent risk exposure.
✔ Configurable Trading Sessions
Trade only during specific hours (server time).
Helps avoid low-liquidity and high-spread periods.
✔ Clean, Optimized, Market-Ready Code
Uses MQL5 OOP trade library.
Handles all safety checks: indicators, margin, tick value, stop levels.
Includes protection for invalid data and abnormal conditions.
⚙ Input Parameters
| Parameter | Description |
|---|---|
| FastEMAPeriod | Fast EMA period (trend detection) |
| SlowEMAPeriod | Slow EMA period |
| RSIPeriod | RSI period |
| RSIThreshold | Avoid entries when RSI is above threshold |
| MaxRiskPercent | Automatic lot calculation per trade (percent of account balance) |
| RecentLowBars | Number of bars to scan for recent lows |
| TpMultiplier | Take profit based on stop-loss distance |
| Magic | Magic number for position tracking |
| TimeFrame | Indicator timeframe |
| StartHour / EndHour | Trading time window (server hours) |
| IsTsl | Enable/disable Smart Trailing Stop |
| MaxSpreadPoints | Maximum allowed spread in points (adaptive per symbol, e.g., higher for SP500) |
| NearCloseMinutes | Minutes before session end to block new entries |
| MaxModifyRetries | Maximum retries for modify/close per ticket within RetryWindowSec |
| RetryWindowSec | Time window (seconds) to count retries |
🧩 How It Works
Detects EMA cross (fast ↑ slow) using confirmed historical data.
Checks RSI to avoid overbought conditions.
Determines the most recent low and calculates stop-loss distance.
Computes the optimal lot size based on risk percentage.
Places a market BUY order with SL & TP.
Monitors the trade and dynamically updates stop-loss using Smart TSL.
Closes position if the reverse EMA cross appears.
🔒 Built-In Safety Features
SL/TP validation against broker stop levels
Margin and free margin checks
Tick size and tick value fallbacks
Automatic normalization of lot size
Indicator readiness validation
Weekend & low-liquidity session protection
📌 Notes
- For best results, use a broker with low spreads on the SP500 index.
- Optimization can be done on EMA periods, RSI threshold, and session hours.
- For the best performers, you can check the input settings in the screenshots.
- This Expert Advisor does not guarantee future profits.
- Тhe default input settings are based solely on historical testing and may require periodic adjustment by the user as market conditions evolve.