SmartTraderEA
30 USD
Descargado demo:
3
Publicado:
16 marzo 2026
Versión actual:
5.6
¿No ha encontrado el robot adecuado?
Encargue el suyo
en la bolsa Freelance.
Pasar a la bolsa
Encargue el suyo
en la bolsa Freelance.
Cómo comprar un robot comercial o indicador
Inicia el robot en el
hosting virtual
hosting virtual
Pruebe un indicador/robot comercial antes de comprarlo
¿Quieres ganar en el Market?
Cómo ofrecer un producto para que lo compren
Pueden dejar comentarios los usuarios que hayan comprado o alquilado el producto
Образец настройки, но возможны сотни вариантов использования.
Archivos adjuntos:
SmartTraderEA.EURUSDrfd.H4.last_year.set
9 kb
# User Manual for SmartTraderEA Expert Advisor (Version 5.6)
## 1. Introduction
**SmartTraderEA** is a multi-functional trading robot (Expert Advisor) for the MetaTrader 5 platform, combining five popular indicators into a single system. It allows you to:
- Trade based on signals from each indicator independently.
- Combine signals from all indicators into a single weighted signal.
- Flexibly configure risk, stop-loss, take-profit, trailing stop, partial close, and other parameters.
- Use filters to screen out unfavorable conditions (time, spread, flat market, volatility).
- Operate as a fully automatic robot or as a signal generator for manual trading.
This Expert Advisor is designed for experienced traders looking to automate their strategies and for those who want to test various combinations of indicators.
## 2. Installation
1. Copy the `SmartTraderEA.ex5` (or `.mq5`) file into the `MQL5/Experts` folder of your MetaTrader 5 terminal.
2. Restart the terminal or refresh the list of Expert Advisors in the Navigator.
3. Drag the Expert Advisor onto the chart of your desired symbol (e.g., EURUSD).
4. In the settings window, select the "Inputs" tab and set your preferred values (see Section 4).
5. Ensure that automated trading is enabled in the terminal (the "AutoTrading" button is active) and that the appropriate mode is enabled for the account.
6. Click "OK". The Expert Advisor will start working on the next new bar.
## 3. How It Works
The Expert Advisor is built on a modular architecture. Each module corresponds to one indicator:
- **RSI** (Relative Strength Index)
- **ADX** (Average Directional Index)
- **Moving Average**
- **Bollinger Bands**
- **Parabolic SAR**
For each module, you can configure the timeframe, indicator parameters, SL/TP multipliers based on ATR (Average True Range), maximum number of positions, and the signal threshold.
**Two Operating Modes** (set by the `UseWeightedSignal` parameter):
- **Independent Modules Mode** (`UseWeightedSignal = false`): Each module analyzes the market independently. If its signal exceeds its threshold, the Expert Advisor opens a position on behalf of that module (using its individual SL/TP and limits). Modules can trade simultaneously in different directions.
- **Single Weighted Signal Mode** (`UseWeightedSignal = true`): Signals from all enabled modules are multiplied by their assigned weights and summed. The resulting value is compared to the `CombinedSignalThreshold`. If the signal is strong enough, a position is opened on behalf of the combined "COMB" module with unified SL/TP and limits.
## 4. Input Parameters Description
Parameters are grouped for convenience.
### Group "Money Management"
| Parameter | Description |
|----------|----------|
| `RiskPercent` | Risk per trade as a % of the current balance. E.g., 1.0 means the loss if stopped out will not exceed 1% of the balance. If 0, the fixed lot (`FixedLot`) is used. |
| `FixedLot` | Fixed position volume (used if `RiskPercent <= 0`). |
| `MaxLotPercent` | Maximum lot size as a % of balance. Limits the risk per single trade. 0 – no limit. |
| `MaxBarsHold` | Maximum number of bars to hold a position. If a position is open longer, it is forcibly closed. 0 – disabled. |
| `GlobalMaxPositions` | Maximum total number of positions the Expert Advisor can open (across all modules). |
### Group "Main Symbol"
| Parameter | Description |
|----------|----------|
| `TradeSymbol` | The trading symbol (currency pair). |
### Group "Common Filters"
| Parameter | Description |
|----------|----------|
| `UseTimeFilter` | Enable time filter for trading. |
| `StartHour`, `EndHour` | Start and end hours for trading (in terminal time). If StartHour <= EndHour, trading is allowed in the interval [StartHour, EndHour). If StartHour > EndHour, trading is allowed from StartHour to midnight and from midnight to EndHour. |
| `MaxSpreadPips` | Maximum allowed spread in points. If the current spread is larger, a new trade is not opened. |
| `UseFlatFilter` | Enable flat market (range-bound) protection using the ADX indicator. |
| `MinADX` | Minimum ADX value for entry (recommended 25). |
| `TF_Filter` | Timeframe on which ADX is taken for the flat filter. |
### Group "Module Operation Mode"
| Parameter | Description |
|----------|----------|
| `UseWeightedSignal` | `false` – independent modules; `true` – single weighted signal. |
### Group "Module Weights (for weighted signal)"
| Parameter | Description |
|----------|----------|
| `WeightRSI`, `WeightADX`, `WeightMA`, `WeightBB`, `WeightPSAR` | Weights for the respective modules when calculating the weighted signal. Used only if `UseWeightedSignal = true`. |
### Group "Weighted Signal Parameters"
| Parameter | Description |
|----------|----------|
| `ATR_SL_Mult_COMB` | ATR multiplier for the combined module's stop-loss. SL = entry price ± ATR * multiplier. |
| `ATR_TP_Mult_COMB` | ATR multiplier for the combined module's take-profit. |
| `MaxPositions_COMB` | Maximum number of positions for the combined module. |
| `CombinedSignalThreshold` | Threshold for the weighted signal. If signal > threshold – buy, if < -threshold – sell. |
### Module Groups (RSI, ADX, MA, BB, PSAR)
Each group contains similar parameters. Let's use RSI as an example:
| Parameter | Description |
|----------|----------|
| `UseRSI` | Enable the RSI module. |
| `TF_RSI` | Timeframe for RSI calculation. |
| `RSIPeriod` | RSI period. |
| `UseVolatilityFilter_RSI` | Enable volatility filter for this module. |
| `MinVolatilityRatio_RSI` | Minimum ratio of current volatility (ATR) to the average. If the ratio is lower, the signal is blocked. |
| `MaxVolatilityRatio_RSI` | Maximum allowed ratio. |
| `ATR_SL_Mult_RSI` | ATR multiplier for the module's stop-loss. |
| `ATR_TP_Mult_RSI` | ATR multiplier for the module's take-profit. |
| `MaxPositions_RSI` | Maximum number of positions this module can have open simultaneously. |
| `SignalThreshold_RSI` | Signal threshold for the module. If signal > threshold – buy, < -threshold – sell. |
**For the MA module**, additional parameters: `MAPeriodFast`, `MAPeriodSlow`.
**For the BB module**: `BBPeriod`, `BBDev`.
**For the PSAR module**: `PSARStep`, `PSARMax`.
### Group "Trailing Stop"
| Parameter | Description |
|----------|----------|
| `UseTrailing` | Enable trailing stop. |
| `TrailingMode` | Mode: `TRAIL_FIXED_STEP` – fixed step from price; `TRAIL_PSAR` – based on Parabolic SAR; `TRAIL_MA` – based on moving average. |
| `TrailingStartATR` | Minimum profit in ATR to activate trailing (for fixed step mode only). |
| `TrailingStepATR` | Trailing step in ATR (offset from current price). |
| `TrailingMAPeriod` | MA period for `TRAIL_MA` mode. |
### Group "Dynamic Management"
| Parameter | Description |
|----------|----------|
| `UsePartialClose` | Enable partial closing of a position upon reaching a certain profit level. |
| `PartialCloseLevel` | Fraction of the take-profit level (e.g., 0.5 means at 50% of TP). |
| `PartialCloseFraction` | What portion of the position to close (e.g., 0.5 means half). |
| `UsePyramiding` | Allow adding to an existing position in the same direction. |
| `MaxPyramidLevel` | Maximum number of pyramiding levels (including the first position). |
### Group "Visualization"
| Parameter | Description |
|----------|----------|
| `ShowSignalsOnChart` | Draw arrows on the chart when a signal appears (green – buy, red – sell). |
| `ShowATRLevels` | Display SL and TP lines for open positions. |
### Group "ATR Periods and Volatility Filter"
| Parameter | Description |
|----------|----------|
| `ATRPeriod` | ATR period used for calculating stops/takes and the volatility filter. |
| `MinVolatilitySamples` | Minimum number of bars to accumulate average volatility. Before this value, the volatility filter is not applied (passes all signals). |
### Group "Commission"
| Parameter | Description |
|----------|----------|
| `CommissionPerLot` | Commission per one lot (in deposit currency). Used in risk calculation. |
| `CommissionBothSides` | If `true`, commission is counted twice (on open and close). |
### Group "Other"
| Parameter | Description |
|----------|----------|
| `MagicNumber` | Unique identifier for the Expert Advisor's orders. |
| `CommentOrder` | Comment for orders (the module name will be appended). |
## 5. Operating Modes in Detail
### Independent Modules Mode
- Each enabled module operates as a separate trading system.
- The module's signal is calculated based on its indicator and compared to its own threshold (`SignalThreshold_...`).
- If all filters and limits are satisfied, a position is opened with SL and TP calculated from ATR using the module's multipliers.
- Positions from different modules do not interfere with each other, but the total number is limited by `GlobalMaxPositions`.
- Pyramiding works within each module separately (you can add to a position of the same module).
### Weighted Signal Mode
- Signals from all enabled modules are multiplied by their respective weights, summed, and divided by the sum of weights. The result is a number between -1 and 1.
- If this number exceeds `CombinedSignalThreshold` (positive) or is less than `-CombinedSignalThreshold` (negative), a signal is generated.
- A position is opened with unified SL/TP (`ATR_SL_Mult_COMB`, `ATR_TP_Mult_COMB`), identified by the "COMB" module.
- Position limits are set by `MaxPositions_COMB` and the global `GlobalMaxPositions`.
- Pyramiding for this mode also works (you can add to the COMB position).
## 6. Risk and Money Management
- **Lot Calculation when `RiskPercent > 0`:**
Lot = (Risk in currency) / (distance to SL in points * point value + commission).
Risk in currency = `RiskPercent` / 100 * balance.
This ensures that if SL is hit, the loss does not exceed the specified percentage.
- **Margin Check:** Before opening a position, the EA checks if there is enough free margin. If not, the trade is not opened, and a message is printed in the log.
- **Maximum Lot** (`MaxLotPercent`) limits the position size as a percentage of balance (additional protection).
- **Position Limits:** The global limit (`GlobalMaxPositions`) and per-module limits (`MaxPositions_...`) prevent opening too many trades simultaneously.
## 7. Filters
- **Time Filter** restricts trading to specific hours. Useful for avoiding low-liquidity periods or major news events.
- **Spread** – protection against wide spreads (e.g., during news).
- **Flat Market Filter** – entry only when the trend is strong enough (ADX above `MinADX`).
- **Volatility Filter** – compares the current ATR to a smoothed average ATR for that module. If the ratio falls outside the `minRatio`..`maxRatio` range, the signal is ignored. This helps avoid abnormally high or low volatility. `MinVolatilitySamples` bars are used to accumulate the average (initial signals pass without filtering).
## 8. Dynamic Position Management
### Trailing Stop
Activates after the position has moved a sufficient distance (for fixed step). For PSAR and MA modes, trailing works immediately, but the stop is only moved if the new level is better than the old one and not closer than the minimum distance.
- **Fixed Step:** SL is moved to `TrailingStepATR` from the current price when profit exceeds `TrailingStartATR` * ATR.
- **PSAR:** SL is set to the Parabolic SAR level (from the previous bar).
- **MA:** SL is set to the moving average level.
### Partial Close
When the profit on a position reaches `PartialCloseLevel` of the full TP, the EA closes a portion of the position equal to `PartialCloseFraction` of the current volume. The remainder stays with the original TP. The volume is normalized according to the lot step.
### Pyramiding
Allows adding to an existing position of the same module and the same direction. The number of levels is limited by `MaxPyramidLevel`. For example, if `MaxPyramidLevel = 2`, you can have at most two positions from one module in the same direction. Each subsequent position is opened only if the previous one (of the same direction) exists.
### Time-based Exit
If a position is held longer than `MaxBarsHold` bars (on the chart's current timeframe), it is forcibly closed. This protects against getting stuck in prolonged flat markets or unfavorable movements.
## 9. Visualization
- **Signal Arrows** (`ShowSignalsOnChart = true`) appear on the chart at the moment a signal is formed (at the open of the bar following the signal bar). A green up arrow – buy signal, red down arrow – sell signal.
- **SL/TP Levels** (`ShowATRLevels = true`) are displayed for open positions as horizontal lines (red – SL, green – TP). Lines are extended to the right for convenience.
## 10. Hybrid Mode (Manual Trading Based on Signals)
If you want the EA to only show signals but not open trades automatically, do the following:
- Set `RiskPercent = 0` and `FixedLot = 0`. The calculated lot will be zero, and open commands will not be executed.
- Keep `ShowSignalsOnChart = true` to see the arrows.
- (Optionally) disable all other functions (trailing, partial close, etc.) if you don't need them, or they simply won't work as no positions are opened by the EA.
- Observe the arrows on the chart and make your own decision to enter trades manually.
This way, you get a powerful signal generator based on a combination of indicators while retaining full control over trade execution.
## 11. Recommendations for Optimization and Testing
- **Before running on a live account**, thoroughly test the EA in the MetaTrader 5 Strategy Tester on historical data for several years. Use "Every tick" mode for maximum accuracy.
- **Optimization:** Use the genetic algorithm. The built-in `OnTester` function returns a composite score considering many metrics (profit factor, win rate, Sharpe, Sortino, drawdown, VaR, drawdown duration, max consecutive losses, etc.). This helps select the most robust parameter sets.
- **Volatility Filter:** For new markets, you might need to increase `MinVolatilitySamples` so the average accumulates correctly.
- **Pyramiding and Partial Close** increase strategy complexity; test their impact on historical data.
## 12. Frequently Asked Questions (FAQ)
**Q: Why isn't the EA opening any trades?**
Check:
- Sufficient funds and margin.
- Position limits are not exceeded (`GlobalMaxPositions`, module limits).
- AutoTrading is enabled in the terminal.
- The correct symbol and timeframe are selected.
- Filters are not blocking (time, spread, flat, volatility). Check the Experts log for messages.
**Q: Which mode is better – independent modules or weighted signal?**
It depends on your strategy. Independent modules provide more diversification but can lead to simultaneous opposing positions. The weighted signal combines opinions, potentially reducing false signals. It's recommended to test both modes.
**Q: What do the arrows on the chart mean?**
They are signal visualizations. In independent mode, an arrow could correspond to any module. In weighted signal mode, it corresponds to the combined module's signal.
**Q: Can I use the EA on multiple charts simultaneously?**
Yes, but each chart must have its own `MagicNumber` to avoid order conflicts.
**Q: How is commission considered in lot calculation?**
The `CommissionPerLot` parameter sets the commission per lot (in deposit currency). If `CommissionBothSides = true`, the commission is doubled (for open and close). This amount is added to the risk, reducing the calculated lot size.
**Q: Why isn't partial close triggering?**
Ensure `UsePartialClose = true` and that the price has reached `PartialCloseLevel * TP`. Also check that the remaining volume after closing is not less than the minimum lot.
**Q: Can I disable automatic opening but keep trailing?**
No, trailing is only applied to positions opened by the EA (with its MagicNumber). If you open positions manually, trailing won't work. For hybrid mode, it's better to disable trailing altogether.
## 13. Conclusion
SmartTraderEA is a flexible and powerful tool for automating trading based on multiple indicators. It offers traders extensive possibilities for strategy configuration, risk management, and position control. With two operating modes and numerous filters, it can be adapted to various market conditions and trading styles.
Beginners are advised to start with the hybrid mode using signal visualization to get familiar with the EA's logic, then gradually move to automated trading with small risk.
Happy trading!
Está perdiendo oportunidades comerciales:
- Aplicaciones de trading gratuitas
- 8 000+ señales para copiar
- Noticias económicas para analizar los mercados financieros
Registro
Entrada
Usted acepta la política del sitio web y las condiciones de uso
Si no tiene cuenta de usuario, regístrese
