支持中心 帮助文档 联系我们
📱 微信: 18391752892 | 💬 QQ: 3313198376 | ✈️ Telegram | 📧 fishfx123@gmail.com
EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34% EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34%

Whale RSI and SMA

👤 作者: Mustafa Ozkurkcu

4.5 分

¥0.00

📌 版本: v1.0
📥 下载: 0
⭐ 评分: 4.5

📝 产品详情

Whale RSI and SMA

作者Mustafa Ozkurkcu
版本v1.0
激活数0

This Expert Advisor is a reversal-style system that combines a 50-centered RSI extreme filter with a 200 SMA proximity rule. It evaluates signals only on a new bar of the selected timeframe and uses closed-bar data (shift=1) to reduce noise and avoid “in-bar” flicker.

How the Strategy Works

On every new candle (for InpTF ), the EA follows this logic:

  1. Compute RSI thresholds around 50
    A single parameter creates both buy/sell levels:

    • BuyLevel = 50 − InpRSIThresholdDist

    • SellLevel = 50 + InpRSIThresholdDist
      Example: Dist = 20 → BuyLevel = 30, SellLevel = 70

  2. Require price to be near the 200 SMA
    The distance between the last closed candle’s close and the SMA must be within a maximum range:

    • Distance (points) = abs(close1 − sma1) / _Point

    • Must be ≤ InpMaxDistPoints
      If the distance is also ≤ InpAggroDistPoints, the trade is considered Aggressive and uses a tighter SL buffer.

  3. Optional confirmation filters

    • EMA Trend Filter (optional)
      If enabled:

      • Longs require close1 > ema1

      • Shorts require close1 < ema1

    • Volume Filter (optional)
      If enabled, the last closed bar’s tick volume must be at least:

      • avg_tick_volume(lookback) * InpVolMultiplier

  4. One-position rule (per symbol + magic)
    If there is already an open position on the same symbol with the same InpMagic , the EA will not open a new one.

  5. Stop/Target calculation + broker rule normalization

    • SL is set using last closed bar’s high/low plus a buffer.

    • TP is either Risk/Reward based or Bollinger Middle based (with fallback).

    • SL/TP are then adjusted to comply with StopsLevel / FreezeLevel / Spread plus InpExtraStopBufferPts .

Entry Rules

BUY (Long) Conditions

A Buy is triggered when all are true:

  • RSI(shift=1) < BuyLevel

  • abs(close1 − sma1) in points ≤ InpMaxDistPoints

  • If EMA filter is enabled: close1 > ema1

Stop-Loss (SL)

  • SL = low1 − SL_Buffer(points)

Take-Profit (TP)

  • If InpUseRRTP = true :

    • risk = entry − SL

    • TP = entry + risk * InpRR

  • Else (BB middle mode):

    • TP = BB_Middle

    • If BB_Middle is not valid (≤ entry), it falls back to RR TP.

SELL (Short) Conditions

A Sell is triggered when all are true:

  • RSI(shift=1) > SellLevel

  • close1 < sma1 (explicit in the code)

  • (sma1 − close1) in points ≤ InpMaxDistPoints

  • If EMA filter is enabled: close1 < ema1

Stop-Loss (SL)

  • SL = high1 + SL_Buffer(points)

Take-Profit (TP)

  • If InpUseRRTP = true :

    • risk = SL − entry

    • TP = entry − risk * InpRR

  • Else (BB middle mode):

    • TP = BB_Middle

    • If BB_Middle is not valid (≥ entry), it falls back to RR TP.

Input Parameters (All Variables Explained)

Timeframe / Core Indicators

  • InpTF: Signal timeframe used for all calculations (default: M5).

  • InpRSIPeriod: RSI period (default: 14).

  • InpSMAPeriod: SMA period (default: 200).

RSI Threshold Logic (Centered at 50)

  • InpRSIThresholdDist: Distance from 50 to define extremes.

    • BuyLevel = 50 − dist

    • SellLevel = 50 + dist
      Notes: The EA clamps the value into [0, 50] .

SMA Distance + Aggressive vs Cautious SL Buffer

  • InpMaxDistPoints: Maximum allowed distance from SMA (points).

  • InpAggroDistPoints: If distance is within this tighter band, trade is Aggressive.

  • InpSLBufferAggroPts: SL buffer (points) used in Aggressive mode.

  • InpSLBufferCautPts: SL buffer (points) used in Cautious mode.

Optional EMA Trend Filter

  • InpUseEMAFilter: Enable/disable EMA trend filter.

  • InpEMAPeriod: EMA period (default: 50).

Optional Volume Filter (Tick Volume)

  • InpUseVolumeFilter: Enable/disable tick volume confirmation.

  • InpVolLookback: Bars used to compute average tick volume (closed bars).

  • InpVolMultiplier: Required multiplier vs average (e.g., 1.2 = 20% above average).

Take-Profit Mode

  • InpUseRRTP:

    • true → Risk/Reward TP

    • false → Bollinger middle TP (fallback to RR if invalid)

  • InpRR: Risk/Reward ratio (default: 2.0).

  • InpBBPeriod: Bollinger Bands period (default: 20).

  • InpBBDeviation: Bollinger deviation (default: 2.0).

Trading / Execution / Safety

  • InpLots: Requested lot size (normalized to symbol min/max/step).

  • InpSlippagePoints: Max slippage (points).

  • InpMagic: Magic number to track EA positions.

  • InpExtraStopBufferPts: Extra safety buffer (points) added to broker minimum stop distance.
    The EA effectively enforces:
    min_stop_distance = max(StopsLevel, FreezeLevel) + Spread(points) + InpExtraStopBufferPts

Notable Operational Behavior

  • Runs only once per new bar on InpTF (no tick-by-tick entries).

  • Uses closed-bar signals ( shift=1 ) for RSI/MA/candle values.

  • One open position at a time per symbol and InpMagic .

  • Broker-rule compliant stops: SL/TP are adjusted to meet minimum distances; if not possible, the trade is skipped.

  • Trade comments label entries as Aggro or Caut depending on SMA distance.


安全须知

本产品仅通过 MQL5.com 官方渠道获取。其他渠道版本可能缺少完整功能和技术支持。

EA 配置

交易品种XAUUSD
时间框架H1 (推荐)
推荐经纪商IC Markets, IC Trading
最低存款$300 / 0.01手

📸 截图预览