Alım-satım robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Facebook üzerinde bulun!
Fan sayfamıza katılın
Kodu ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Kodu beğendiniz mi? MetaTrader 5 terminalinde deneyin
Uzmanlar

EA Trend Follower - MetaTrader 5 için uzman

Syamsurizal Dimjati
Syamsurizal Dimjati
Hello traders, I design and develop high-quality indicators and Expert Advisors (EAs) for MT5 (since 2023), built to help you achieve more consistent and reliable trading results.
Görüntülemeler:
285
Derecelendirme:
(2)
Yayınlandı:
Güncellendi:
MQL5 Freelance Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

TREND Follower (DAILY)

is a lightweight, development-oriented Expert Advisor (EA) created as a base trading architecture for research, learning, experimentation, and further developmentThe EA is intentionally designed around a simple concept: follow the market direction using the relationship between price and the Parabolic SARIt is not presented as a fully optimized or finished trading system. Instead, it provides a clean and accessible foundation that developers can study, modify, test, and expand.

TrendFollower

Current Trading Strategy

TREND Follower uses a simple Parabolic SAR trend-following and reversal strategy:

  • Price above SAR → BUY direction
  • Price below SAR → SELL direction
// 6. SELL / BEARISH FLOW
// Original logic:
// If Quantum wants to go DOWN:
// Close BUY and open SELL.
   if(isQuantumDn) {
      //--- Close existing BUY
      if(hasBuy) {
         if(!trade.PositionClose(buyTicket)) {
            Print("SELL reversal blocked: failed to close BUY. ",
                  "Ticket=", buyTicket,
                  " Retcode=", trade.ResultRetcode(),
                  " Description=", trade.ResultRetcodeDescription());
            return;
         }
         //--- Refresh state after successful close
         hasBuy = false;
      }
      //--- Open SELL only when no EA SELL exists
      if(!hasSell) {
         OpenSell();
      }
   }
// 7. BUY / BULLISH FLOW
// Original logic:
// If Quantum wants to go UP:
// Close SELL and open BUY.
   else if(isQuantumUp) {
      //--- Close existing SELL
      if(hasSell) {
         if(!trade.PositionClose(sellTicket)) {
            Print("BUY reversal blocked: failed to close SELL. ",
                  "Ticket=", sellTicket,
                  " Retcode=", trade.ResultRetcode(),
                  " Description=", trade.ResultRetcodeDescription());
            return;
         }
         //--- Refresh state after successful close
         hasSell = false;
      }
      //--- Open BUY only when no EA BUY exists
      if(!hasBuy) {
         OpenBuy();
      }
   }

When the detected direction changes, the EA attempts to close the existing opposite position before opening a position in the new direction. This creates a straightforward follow-the-direction and reverse-on-change trading model.

Current Features

The current base version includes:

  • Parabolic SAR directional analysis
  • Fixed-lot position sizing
  • Maximum spread protection
  • Configurable trading hours
  • EA-specific Magic Number
  • Optional Stop Loss and Take Profit
  • Basic trade execution validation
  • Broker-compatible volume and order handling
  • Safer position reversal logic

These features provide basic execution and protection while keeping the original entry logic simple and transparent.

Development Potential

TREND Follower is designed to be extended rather than treated as a final system.

Test

Developers can build additional modules for:

  • Risk-based position sizing
  • ATR-based SL/TP and trailing protection
  • Break-even and partial exits
  • Higher-timeframe confirmation
  • Market structure and price-action analysis
  • Volatility and market-regime detection
  • Grid, layering, or recovery logic
  • AI and Machine Learning
  • Advanced signal scoring
  • Multi-symbol and portfolio management
  • Advanced execution and risk controls

The existing Parabolic SAR strategy can remain as the core signal while additional layers are developed around it.

Why This Code Is Shared

TREND Follower is published as a Development and Research Code BaseThe objective is to provide developers with a simple and understandable foundation:

Study → Modify → Test → Optimize → Extend

The code is intended to encourage further research, experimentation, and development within the MQL5 community.

Development & Risk Notice

This source code is provided for development, research, educational, and experimental purposesIt should not be considered a guaranteed profitable or production-ready trading system. Thorough backtesting, forward testing, and risk evaluation are strongly recommended before any live deployment. Trading financial instruments, including XAUUSD / Gold, involves substantial financial risk. Market volatility, spread, slippage, leverage, liquidity, execution conditions, and technical failures can result in significant losses. Users are solely responsible for evaluating, modifying, testing, and deciding how the code is used.


Final Perspective

TREND Follower provides a simple foundation built around one clear principle :

Observe the Parabolic SAR → Follow the detected direction → Reverse when the direction changes. The architecture is intentionally open for further development into more advanced trading, risk-management, market-analysis, adaptive, and AI-based systems.


 


PropFirm Risk Guardian MT5 – Account-Wide Risk Protection EA PropFirm Risk Guardian MT5 – Account-Wide Risk Protection EA

Account-wide MT5 risk protection EA for prop-firm and personal accounts. Monitors daily and overall drawdown, position losses, safety buffers, and automatically protects the account when configured limits are reached.

Spread Monitor for Scalpers Spread Monitor for Scalpers

Spread histogram in a sub-window with current/avg/max/min stats, cost per trade, and threshold alerts for scalpers.

Safe Risk Manager EA - Daily Loss, Break-Even and Trailing Stop Safe Risk Manager EA - Daily Loss, Break-Even and Trailing Stop

Educational MT5 hedging-account trade panel with risk sizing, spread protection, a persistent daily-loss lock, break-even and trailing stops.

News Filter for the Strategy Tester (DST-corrected calendar export) News Filter for the Strategy Tester (DST-corrected calendar export)

A real economic-calendar news filter that also works in backtests. Export the events once with a script, then block new entries around news both live and in the Strategy Tester. Fixes the one-hour DST shift of historical calendar times.