AN EA BASED ON UT-BOT-ALERT LOGIC

MQL5 Uzmanlar

İş tamamlandı

Tamamlanma süresi: 16 gün
Geliştirici tarafından geri bildirim
Good client, Solid communication
Müşteri tarafından geri bildirim
Programed well done

Şartname

An MT5 Expert Advisor that implements UT-Bot ATR trailing logic, flips position on opposite signals (close buy when sell appears, close sell when buy appears), and adds multi-layer filters, trend confirmation, risk management, and robustness features so it performs well on volatile pairs XAUUSD and BTCUSD.


1 — Core design & signal rules
  • Trail calculation (internal, no external indicator required):

    • ATR-based trailing line (UT Bot style).

    • Inputs: ATR_Period (default 10), ATR_Multiplier (default 2.0).

    • Calculate basic upper/lower, finalUpper/finalLower with persistence, determine trend (UP/DOWN) and trail value.

  • Signal (action taken only at bar close):

    • Buy when Close > trail and trend == UP .

    • Sell when Close < trail and trend == DOWN .

  • Flip behavior:

    • On opposite signal, always close the current position.

    • If ReverseOnOppSignal == true and filters pass → open the opposite position immediately.

    • If ReverseOnOppSignal == false → close only, do not enter new first.

  • Execution moment: Default = act only on new bar (bar-close). Optional intra-bar mode for advanced users (not recommended without careful testing).


2 — Robust entry filters (all must pass to open new trades)
  1. Session filter — TradeStartHour / TradeEndHour (default 03:00–18:00 server time).

  2. Spread filter — SymbolInfoInteger(SYMBOL_SPREAD) <= MaxSpreadPoints (default e.g., 30 points; user-configurable).

  3. Volatility filter — ATR * point >= MinATRPoints (default 0 to disable; set to avoid ultra-low volatility).

  4. Trend confirmation (high-quality filter) — Higher timeframe EMA rule:

    • HTF = H1 (configurable)

    • EMA_fast = 50 (HTF) optional: require EMA50 slope positive for buys, negative for sells.

    • Alternatively, ADX > ADX_Threshold (default 20) for trend strength.

  5. Candle body filter — require abs(Close - Open) >= MinBodyPoints to reduce fake signal entries.

  6. Daily trade cap / per-symbol cap — MaxTradesPerDay or MaxOpenTrades to limit churn.

  7. News filter (optional) — Integrate calendar (or allow developer to provide hook) to block high-impact events.

Important: Filters should not block the mandatory close on opposite signals — close must always be allowed. Filters only stop new entries.


3 — Trade management & sizing
  • Position policy: Single position per symbol (no hedging). Keep track by MagicNumber .

  • Lot sizing options (configurable):

    1. Fixed Lot (e.g., 0.02) — simple and safe for small accounts.

    2. Risk % per trade — compute lot from:
      Lot = (AccountBalance * RiskPercent/100) / (StopLossInMoneyPerLot)
      (EA must use instrument contract specifications to compute StopLossInMoneyPerLot precisely).

    3. ATR-scaled lot — scale position size by ATR to keep dollar volatility roughly constant.

  • Stop Loss / Take Profit:

    • Primary mode: No fixed SL/TP (UT Bot style) — close on opposite signal.

    • Safety mode: Catastrophic SL (recommended) — attach a hidden SL at CatSL = EntryPrice ± CatSL_ATR_Mult * ATR (default 6×ATR) to prevent extreme losses.

    • Optional: user can enable fixed SL/TP or trailing stop.

  • Partial close on flip: Option to partially close (e.g., close 50% when opposite signal, open reverse with remaining size or new sized position).

  • Max drawdown safeguard: StopTradingIfDrawdownPercentReached (pauses trading).


4 — Reliability & edge-case handling
  • Bar-close processing (default): check iTime change, then act — prevents repaint/false mid-bar actions.

  • Order retries: on trade send/close failure, retry N times with small delays; log errors.

  • Trade context busy: loop until free with timeout.

  • Slippage tolerance: configurable Slippage .

  • Requote handling: avoid infinite loops; fallback to market order attempts.

  • Logging & on-chart panel: show trail value, trend, spread, ATR, last action; log to file for analysis.

  • Unit tests / debug modes: add DebugMode to simulate entries without placing real trades.


5 — Inputs to expose to user (recommended defaults)
  • MagicNumber = 123456

  • Timeframe = PERIOD_M15 (user-selectable; M5/M15/M30 suggested)

  • ATR_Period = 10

  • ATR_Multiplier = 2.0

  • ReverseOnOppSignal = true

  • TradeStartHour = 3

  • TradeEndHour = 18

  • MaxSpreadPoints = 30

  • MinATRPoints = 0

  • MinBodyPoints = 10 (points; 0 disables)

  • UseEMAConfirmation = true

  • EMA_HTF = PERIOD_H1

  • EMA_Period = 50

  • UseADXFilter = false

  • ADX_Period = 14

  • ADX_Threshold = 20

  • Lots = 0.02 (default fixed)

  • UseRiskPercent = false

  • RiskPercent = 1.0

  • UseCatSL = true

  • CatSL_ATR_Mult = 6.0

  • MaxTradesPerDay = 10

  • OneTradePerBar = true

  • Slippage = 3


6 — Recommended parameter sets (starter presets)

A — Conservative (small account / low risk)

  • Balance: small (≤ $500)

  • Lots = 0.01 or UseRiskPercent = true & RiskPercent = 0.5%

  • Timeframe = M15

  • ATR_Period = 10 , ATR_Mult = 2.0

  • UseEMAConfirmation = true (EMA50 H1)

  • UseCatSL = true , CatSL_ATR_Mult = 6

  • MaxTradesPerDay = 5

B — Balanced (most traders)

  • Balance: ~$1,000–5,000

  • UseRiskPercent = true , RiskPercent = 1.0%

  • Timeframe = M15 (XAU) / M5–M15 (BTC)

  • UseEMAConfirmation = true , ADX_Threshold = 20

  • MaxTradesPerDay = 10

C — Aggressive (experienced)

  • Balance: > $5,000

  • RiskPercent = 1.5–2%

  • Timeframe = M5 (more signals)

  • ReverseOnOppSignal = true

  • EnablePartialCloseOnFlip = true

  • MaxTradesPerDay = 20

Note: Always test on demo/live small balance before scaling.


7 — Backtesting & optimization plan (must be delivered)
  1. Historical backtest on both symbols, at least 3–5 years for XAUUSD, 2–3 years for BTCUSD (where data exists).

  2. Forward walk-forward testing: optimize on training window, validate on out-of-sample window.

  3. Monte Carlo / randomization: test sensitivity to slippage, spread, execution delay, and parameter jitter.

  4. Robustness checks: parameter stability, worst-case spread, max slippage, news days.

  5. Report to include: net profit, profit factor, max drawdown, CAGR, Sharpe-like measure, total trades, average trade length, win rate, expectancy.


8 — Acceptance criteria for delivery
  1. EA compiles in MetaEditor without errors; source .mq5 + compiled .ex5 provided.

  2. Implements UT Bot trail internally (no external indicator dependency).

  3. Correct flip behavior: closes opposite trade on opposite signal; opens reverse if ReverseOnOppSignal==true .

  4. Filters work as specified and block entries but never block closes.

  5. Safety features (CatSL, MaxDrawdownStop) work and are configurable.

  6. Works on XAUUSD and BTCUSD out-of-the-box using default presets.

  7. Includes basic GUI or logs showing active settings and last signal.

  8. Provide test reports: at minimum a backtest summary for each symbol and timeframe used.

  9. Provide short user guide (1–2 pages) explaining inputs and presets.


9 — Deliverables to ask the developer
  • Source code .mq5 and compiled .ex5 .

  • A 1–2 page PDF user manual with default presets (Conservative, Balanced, Aggressive).

  • Backtest result files (strategy tester reports) for XAUUSD and BTCUSD.

  • A short video (optional) showing EA loaded and running on demo account for basic verification.

  • Support period (e.g., 7–14 days) for bug fixes after delivery.


10 — Additional advanced ideas (v2+)
  • Implement machine-learned filter or pattern recognition for false-signal reduction.

  • Add position-scaling (pyramiding) limited to trend strength.

  • Integrate news API or timezone-aware economic calendar to pause trading.

  • Add correlation filter (avoid trading both XAU and BTC at same time if correlation spikes).

  • Implement trade simulator / sandbox mode inside EA.


11 — Realistic performance expectations
  • Win rate typically 60-80% (trend systems vary).

  • Profit factor target after optimization: ≥ 1.5 (good), ≥ 2.0 (very good).

  • Max drawdown depends on risk settings — keep risk per trade low (≤ 1–1.5%) to maintain acceptable drawdown.

  • No guarantee — past backtest performance does not guarantee future live results. Always forward-test.



Yanıtlandı

1
Geliştirici 1
Derecelendirme
(25)
Projeler
31
13%
Arabuluculuk
13
0% / 77%
Süresi dolmuş
9
29%
Serbest
2
Geliştirici 2
Derecelendirme
(28)
Projeler
34
35%
Arabuluculuk
0
Süresi dolmuş
2
6%
Serbest
3
Geliştirici 3
Derecelendirme
(2)
Projeler
0
0%
Arabuluculuk
5
0% / 60%
Süresi dolmuş
0
Serbest
Benzer siparişler
{ "strategy_name": "M5 EMA Scalper", "timeframe": "M5", "indicators": { "ema_fast": 20, "ema_slow": 50, "rsi": 14, "atr": 14 }, "entry_rules": { "buy": [ "EMA20 > EMA50", "Price closes above EMA20", "RSI > 55" ], "sell": [ "EMA20 < EMA50", "Price closes below EMA20", "RSI < 45" ] }, "risk_management": { "risk_per_trade": 1.0, "stop_loss_atr": 1.5, "take_profit_rr": 2.0
Hola, traders e inversores: Desarrollamos soluciones de trading algorítmico para MetaTrader 4 y MetaTrader 5. Creamos bots, indicadores y herramientas a medida que convierten estrategias manuales en sistemas automáticos, configurables y orientados a una gestión de riesgo sólida. Hemos trabajado en automatizaciones que integran entradas y salidas por reglas, cálculo de lotaje, control de drawdown, filtros de horario y
Hello All, can someone help me to make an EA base on MACD, https://www.mql5.com/en/code/14669 and RSI. If you are able to make this than please get me in touch, i will appreciated Thanks and best Regards Kodj007
EA 45 - 205 USD
If EMA20 > EMA50 AND RSI > 55 AND No Open Position THEN Buy SL = 50 pips TP = 100 pips If Profit > 30 pips Move SL to Break Even If Profit > 50 pips Enable Trailing Stop
I am looking for an experienced MQL5 developer to modify an existing Expert Advisor by adding an automated hedging module. The existing EA is fully functional and already manages trade entries and exits. The objective of this enhancement is to introduce a risk management feature that automatically opens a hedge position when an existing trade reaches a predefined unrealized loss in USD. The hedge should remain active
automatic robo sell at bollinger band upwards breach and rsi should above 80 and buy when bollinger breach downwards and rsi is below 30, rsi shoould works only on Gold trade and none ofhe trades
Hello, I need a custom Expert Advisor for MetaTrader 5. I am trading from mobile only. **Account & Style:** - Capital: $5,000 - $10,000 - Risk: Moderate/Balanced - Trading Style: Scalping **Pairs & Timeframe:** - Symbols: EURUSD and XAUUSD - Timeframe: M5 **Strategy:** - BUY: RSI(14) < 30 AND Price > 20 EMA - SELL: RSI(14) > 70 AND Price < 20 EMA - Only 1 trade per symbol at a time - No Martingale / No Grid **Risk
am an auto trader that for Sierra chart that works but needs some cleaning up. I need some features added to it like two parent studies with different take profit, stops, quantities and also a parent study to add to the position with its own take profit, stops, quantities
We are seeking an experienced MQL4/MQL5 programmer to develop a high-performance, fully automated Expert Advisor (EA). The bot must execute a sophisticated multi-currency hedging strategy across correlated forex pairs. Key Responsibilities Develop Multi-Currency Logic : Build an EA capable of scanning and trading multiple currency pairs simultaneously from a single chart or setup. Implement Hedging Strategy : Code
I am seeking an elite, top-tier quantitative programmer to engineer a professional multi-strategy software suite for XAU/USD (Gold). This project will be executed under a single contract workspace, cleanly structured across sequential development milestones: Milestone 1: (M30/H1/H4 Swing Architecture) 2: (M1/M5/M15 High-Frequency Velocity Architecture) 3: (Integration Phase):(Unified All-In-One Parent Class Execution

Proje bilgisi

Bütçe
30 - 40 USD
Son teslim tarihi
from 1 to 2 gün