Trend Scalper premium zones
- Experts
- Versione: 1.14
- Attivazioni: 5
**Smart Trend Sniper EA**
Multi-symbol EA with two selective setups, volatility-targeted risk and hard portfolio guards.
**Overview**
Smart Trend Sniper is a multi-symbol Expert Advisor for MetaTrader 5. It scans every symbol in your Market Watch and waits for one of two specific setups. Each setup must pass several independent conditions before an order is sent, so on any single symbol most bars produce no trade.
Position size is calculated from a risk percentage and scaled to current volatility. Portfolio guards limit daily loss, drawdown and total exposure. The EA does not use martingale, grid or averaging into losing positions, and every position is opened with a stop loss.
**Trading Strategy**
The EA runs two independent models. Each uses its own magic number, so positions are tracked and managed separately.
Leg A — Mean reversion
- Long entry: price is above the 200-period SMA and RSI(2) is below 10.
- Short entry: price is below the 200-period SMA and RSI(2) is above 90.
- The 200-period SMA acts as a regime filter, so the leg only trades short-term extremes in the direction of the larger trend.
- Stop loss at 3 × ATR(14). Take profit at 2R as a backstop.
- The normal exit is a close back through the 5-period SMA, or a time stop after 10 bars, whichever comes first.
Leg B — Trend pullback
- Trend filter: EMA(50) above EMA(200) for longs, EMA(50) below EMA(200) for shorts.
- Long entry: price pulls back to EMA(20), closes back above it, closes above the open, and leaves a lower wick of at least 0.3 × ATR.
- Short entry: the mirror condition at EMA(20) with an upper rejection wick.
- Stop loss at 0.8 × ATR.
- At 1R, 50% of the position is closed and the stop moves to entry + 0.2R.
- The remaining position trails at 2 × ATR with a 3R target.
The two legs respond to opposite market conditions, so the EA can hold positions in different regimes at the same time on different symbols.
**Risk Management**
- Volatility-targeted sizing. When current ATR is above its 100-bar average, the risk percentage is reduced in proportion, with a floor at 40% of the configured ceiling.
- A stop loss is attached to every trade. Stop distance is calculated from ATR, not from a fixed number of points.
- Position size is based on account equity, not fixed lots.
- Portfolio caps. Maximum open positions, maximum per correlation group and maximum aggregate open risk can each be set independently. All three are disabled by default and must be configured by the user.
- Daily loss stop. When equity falls by the configured percentage from the day's starting value, all positions are closed and new entries are halted until the next trading day.
- Drawdown kill switch. When equity falls by the configured percentage from its peak, all positions are closed and trading stops.
- Spread filter. Entries are skipped when the spread exceeds the configured limit.
- Session filter. Non-crypto symbols are only traded inside the configured server hours.
- Broker-limit handling. Order volume is capped to the symbol's volume limit. Stops and targets are checked against the symbol's stops level and freeze level before they are sent. If a position is temporarily inside the freeze band, the exit is deferred and retried rather than sent and rejected.
**Account Compatibility**
The EA runs on both netting and hedging accounts. On a netting account it keeps a single net position per symbol and does not open opposing positions on the same instrument.
**Use on Prop Firm and Live Accounts**
The guard layer — daily loss stop, drawdown kill switch and exposure caps — is built for accounts with strict rules, including prop firm evaluations and funded accounts. The limits must be set to match the specific firm's rules. The EA does not guarantee that any evaluation will be passed.
**On-Chart Tools**
- Dashboard panel: equity, growth since start, today's result, closed trade count, win rate, open positions, aggregate open risk, and the current state of the guards.
- Analysis panel: the condition of both legs on the chart symbol, the volatility ratio, the risk percentage that would be used for a new trade, and what the EA is waiting for.
- Chart drawings: EMA(20) and SMA(200) levels, entry, stop and target lines for open positions, and arrows on signal bars.
**Inputs**
Risk and portfolio
| Parameter | Default | Description |
|---|---|---|
| InpRiskCeiling | 10.0 | Risk per trade as a percentage of equity. Acts as a ceiling; volatility targeting can reduce it. |
| InpUseVolTarget | true | Reduces risk when current ATR is above its 100-bar average. |
| InpMaxPositions | 0 | Maximum open positions across all symbols. 0 = no limit. |
| InpMaxPerGroup | 0 | Maximum positions per correlation group. 0 = no limit. |
| InpMaxOpenRiskPct | 0.0 | Maximum aggregate open risk as a percentage of equity. 0 = disabled. |
| InpMaxDailyLossPct | 8.0 | Daily loss limit. 0 = disabled. |
| InpMaxDDPct | 40.0 | Drawdown limit from peak equity. 0 = disabled. |
| InpMaxSpreadPoints | 50.0 | Maximum spread in points for entries. |
Leg A — Mean reversion
| Parameter | Default | Description |
|---|---|---|
| InpTradeA | true | Enable the mean-reversion leg. |
| InpA_RsiLen | 2 | RSI period. |
| InpA_BuyLevel | 10.0 | Long entry when RSI is below this value. |
| InpA_SellLevel | 90.0 | Short entry when RSI is above this value. |
| InpA_TrendLen | 200 | Trend filter SMA period. |
| InpA_ExitLen | 5 | Exit SMA period. |
| InpA_StopATR | 3.0 | Stop loss distance in ATR units. |
| InpA_TpR | 2.0 | Take profit in R multiples. |
| InpA_MaxBars | 10 | Time stop in bars. 0 = disabled. |
Leg B — Trend pullback
| Parameter | Default | Description |
|---|---|---|
| InpTradeB | true | Enable the trend-pullback leg. |
| InpB_PullLen | 20 | Pullback EMA period. |
| InpB_FastLen | 50 | Fast trend EMA period. |
| InpB_SlowLen | 200 | Slow trend EMA period. |
| InpB_StopATR | 0.8 | Stop loss distance in ATR units. |
| InpB_WickATR | 0.3 | Minimum rejection wick in ATR units. |
| InpB_Tp1R | 1.0 | First target in R multiples. Closes 50% of the position. |
| InpB_BeR | 0.2 | Breakeven offset in R multiples, applied after the first target. |
| InpB_RunR | 3.0 | Target for the remaining position in R multiples. |
| InpB_TrailATR | 2.0 | Trailing stop distance in ATR units. |
Execution
| Parameter | Default | Description |
|---|---|---|
| InpATRPeriod | 14 | ATR period used for stops and sizing. |
| InpSlippage | 20 | Maximum price deviation in points. |
| InpUseSession | true | Enable the session filter for non-crypto symbols. |
| InpSessionStart | 7 | Session start hour, server time. |
| InpSessionEnd | 21 | Session end hour, server time. |
| InpMagicA | 20261001 | Magic number for Leg A. |
| InpMagicB | 20261002 | Magic number for Leg B. |
Appearance
| Parameter | Default | Description |
|---|---|---|
| InpShowDashboard | true | Show the dashboard panel. |
| InpShowChartPanel | true | Show the analysis panel. |
| InpShowDrawings | true | Show price levels and signal arrows. |
| InpPanelX | 12 | Panel left offset in pixels. |
| InpPanelY | 24 | Panel top offset in pixels. |
| InpPanelBg | 24,24,38 | Panel background color. |
| InpPanelBorder | 58,58,88 | Panel border color. |
| InpAccent | 124,58,237 | Accent color. |
| InpTextMain | 229,231,235 | Main text color. |
| InpTextMuted | 156,163,175 | Secondary text color. |
| InpGreen | 34,197,94 | Positive value color. |
| InpRed | 239,68,68 | Negative value color. |
| InpAmber | 245,158,11 | Warning color. |
**Recommended Setup**
- Symbols: FX majors such as EURUSD and GBPUSD, metals such as XAUUSD, indices and crypto, provided your broker offers acceptable spreads.
- Attach the EA to a single chart. It trades every symbol in the Market Watch, so the chart symbol only affects the analysis panel and drawings.
- Review InpRiskCeiling before running on a live account. The default value is a ceiling, and 10% per trade is high for most accounts. A value between 0.5% and 1% per trade is a common starting point.
- Set InpMaxPositions and InpMaxOpenRiskPct when trading several correlated symbols at once.
- A VPS is recommended for continuous operation.
---
