ตั้งค่า Expert Advisor บน MT5 — คู่มือติดตั้งฉบับสมบูรณ์ 2026

📅 2026-02-25 FOREX ⏱ 11 นาทีในการอ่าน By iCafeFX
🎁 เปิดบัญชี XM ฟรี →

Partner Code: cafefx · XM Official VIP Partner

Expert Advisor ใน MetaTrader 5 คืออะไร?

When I first started trading in 1997, the concept of automated trading was science fiction. Today, Expert Advisors (EAs) are the backbone of modern forex trading. An EA in MetaTrader 5 is essentially a program written in MQL5 programming language that can analyze market data and execute trades based on predefined rules.

ตั้งค่า Expert Advisor บน MT5 — คู่มือติดตั้งฉบับสมบูรณ์ 2026 — ภาพปก

MetaTrader 5 is the successor to the legendary MT4 platform, and it brings significant improvements for EA users. The MQL5 language is faster, supports multi-threaded strategy testing, includes a built-in economic calendar, and allows hedge and netting account types. If you are still on MT4, it is time to upgrade — and this guide will show you exactly how to set up your EAs on the new platform.

Expert Advisor (EA) คือโปรแกรมอัตโนมัติที่ทำงานบน MetaTrader 5 สามารถวิเคราะห์ตลาด สร้างสัญญาณ และเปิด/ปิดออเดอร์ได้โดยอัตโนมัติ EA ช่วยลดอารมณ์ในการเทรดและทำงาน 24 ชม.

EA มีหลายประเภท: Full Auto (เทรดเองทั้งหมด), Semi-Auto (วิเคราะห์แล้วแจ้งเตือน คุณตัดสินใจ), Utility (เครื่องมือช่วย เช่น Trailing Stop, Lot Calculator) EA Semi-Auto จาก XMSignal เป็นแบบ Semi-Auto ที่ใช้ Smart Money Concept

ก่อนติดตั้ง — รายการตรวจสอบ

สิ่งที่ต้องมีก่อนติดตั้ง EA: 1) บัญชี XM Zero (Partner Code: cafefx) 2) MT5 Desktop (ไม่ใช่ Web/Mobile) 3) VPS หรือคอมพิวเตอร์ที่เปิดตลอด 4) อินเทอร์เน็ตเสถียร

Hardware Requirements

Software Requirements

Account Setup

5) ไฟล์ EA (.ex5) ดาวน์โหลดจาก siamcafe.net/download 6) ความรู้พื้นฐานเกี่ยวกับ MT5 7) ทุนขั้นต่ำ $200 (แนะนำ $500+) 8) ความเข้าใจเรื่อง Risk Management

  1. Click our partner link to open XM's registration page
  2. Fill in your personal details (name, email, phone)
  3. Choose your account type:
    • Standard Account — Best for beginners, minimum $5, spreads from 1.0 pip
    • Ultra Low Account — Lower spreads from 0.6 pip, minimum $5
    • Zero Account — Raw spreads from 0.0 pip + commission, minimum $5, best for EA trading
  4. Verify your identity (passport or national ID + proof of address)
  5. Fund your account or switch to demo for testing
Pro Tip: For EA trading, I recommend the XM Zero account. The raw spreads mean your EA gets better entry prices, and the small commission ($3.50 per lot per side) is much less than the extra spread on Standard accounts. Over hundreds of trades, this difference adds up to thousands of dollars saved.

คู่มือติดตั้งทีละขั้นตอน

Step 1: Download and Install MetaTrader 5

Go to XM's website and download MT5 for your operating system. Run the installer, accept the terms, and let it complete. The first launch will download historical data, which may take a few minutes.

Step 2: Log In to Your Account

When MT5 opens for the first time, it will show a login dialog. Enter:

ขั้นตอนที่ 1: เปิด MT5 → File → Open Data Folder → MQL5 → Experts → วางไฟล์ .ex5 ลงไป ขั้นตอนที่ 2: ปิด MT5 แล้วเปิดใหม่ EA จะปรากฏใน Navigator

Step 3: Locate the Data Folder

ขั้นตอนที่ 3: เปิดกราฟที่ต้องการ (เช่น XAUUSD H1) → ลาก EA จาก Navigator ไปวางบนกราฟ ขั้นตอนที่ 4: ในหน้า Settings ตั้งค่าตาม Guide → กด OK ขั้นตอนที่ 5: ตรวจสอบว่า AutoTrading เปิดอยู่ (ปุ่มเขียวบนแถบเครื่องมือ)

  1. In MT5, go to File → Open Data Folder
  2. A Windows Explorer window will open showing something like: C:\Users\YourName\AppData\Roaming\MetaQuotes\Terminal\ABCD1234\
  3. Navigate into MQL5Experts
  4. This is your EA folder. Bookmark it or note the path.

Step 4: Copy the EA File

  1. Download the EA Semi-Auto .ex5 file from SiamCafe.net/download
  2. Copy (or drag) the .ex5 file into the MQL5/Experts folder
  3. If the EA comes with additional files (.set files for presets, .dll files for libraries), copy those to their respective folders:
    • .set files → MQL5/Presets
    • .dll files → MQL5/Libraries

Step 5: Restart and Attach

  1. Close and reopen MT5 (this is mandatory — MT5 only scans for new EAs at startup)
  2. In the Navigator panel (View → Navigator if hidden), expand Expert Advisors
  3. You should see "EA_Semi_Auto" (or similar name) in the list
  4. Open a chart for the pair you want to trade (e.g., EURUSD, H1 timeframe)
  5. Double-click the EA name in Navigator, or drag it onto the chart
  6. A properties dialog will appear — configure settings (see next section)
  7. Click OK

Step 6: Enable Algorithmic Trading

  1. Go to Tools → Options → Expert Advisors tab
  2. Enable: "Allow algorithmic trading"
  3. Enable: "Allow DLL imports" (needed for news filter and other features)
  4. Click OK
  5. On the main toolbar, click the Algo Trading button (it should turn green)
  6. Check the top-right corner of your chart — you should see a smiley face icon, indicating the EA is active

วิธีตั้งค่า EA เพื่อประสิทธิภาพสูงสุด

สำหรับทอง (XAUUSD): ใช้ H1 Timeframe | RiskPercent = 1.0 | ATR Period = 14 | SL Multiplier = 1.5 สำหรับ Forex: ใช้ H1 หรือ H4 | RiskPercent = 1.5 | ATR Period = 14

ตั้งค่า Expert Advisor บน MT5 — คู่มือติดตั้งฉบับสมบูรณ์ 2026 — ภาพประกอบ 1

General Tab

Inputs Tab — Key Parameters

ParameterDefaultMy Recommendation
RiskPercent1.00.5 for beginners, 1.0 for experienced
MaxSpread3.02.0 for majors, 5.0 for gold
TakeProfit_Pips50Leave default — EA uses dynamic TP
StopLoss_Pips30Leave default — EA uses structure-based SL
UseNewsFiltertrueAlways keep ON
TradingSessionsLondon_NYLondon_NY for beginners, All for advanced
MaxOpenTrades32 for beginners, 3-5 for experienced
MagicNumber12345Change if running multiple instances

แก้ปัญหา — 10 ปัญหา EA ที่พบบ่อยและวิธีแก้

4) Error 'Trade is disabled' → เปิด Allow Algo Trading ใน EA Settings 5) SL/TP ไม่ถูกตั้ง → ตรวจ Minimum SL/TP Distance ของ Broker 6-10) ตรวจ Expert Log ใน Toolbox เพื่อดู Error Message แล้วแก้ตามนั้น

  1. "EA not found in Navigator" — Wrong folder. Make sure the .ex5 file is in MQL5/Experts, not MQL5/Indicators or MQL5/Scripts. Restart MT5.
  2. "Smiley face is gray/sad" — Auto trading is disabled. Click the Algo Trading button on the toolbar. Also check Tools → Options → Expert Advisors → Allow algorithmic trading.
  3. "Trade not allowed" error — Your account type may not support algorithmic trading, or Expert Advisors are disabled on your specific server. Contact XM support.
  4. "Not enough money" error — Your margin is insufficient for the position size the EA is trying to open. Either deposit more funds or reduce the RiskPercent setting.
  5. "Invalid stops" error — Your stop loss or take profit is too close to the current price. This usually happens with brokers that have minimum stop levels. XM has very low stop levels, so this is rare.
  6. EA runs but no trades — The EA might be waiting for a valid setup. Not every hour produces a trade signal. Check the Experts tab (bottom of MT5) for log messages. The EA will show "Scanning..." when active.
  7. EA places too many trades — Check MaxOpenTrades setting. Also verify the MagicNumber is unique if you run the EA on multiple charts.
  8. "DLL imports not allowed" — Go to Tools → Options → Expert Advisors and enable "Allow DLL imports."
  9. Slow execution — This is usually a network issue, not an EA issue. Check your ping to XM's server (Tools → Options → Server). If ping is over 200ms, consider a VPS closer to XM's data center.
  10. EA works on demo but not live — Some EAs have license restrictions. Our EA Semi-Auto works on both demo and live accounts without restrictions.

วิธี Backtest EA ใน MT5 Strategy Tester

เปิด Strategy Tester: View → Strategy Tester เลือก EA, Symbol (XAUUSD), Period (H1), Date Range (อย่างน้อย 1 ปี), Modeling (Every Tick) แล้วกด Start

  1. Open View → Strategy Tester (or press Ctrl+R)
  2. Select your EA from the dropdown
  3. Choose the symbol (e.g., EURUSD) and timeframe (e.g., H1)
  4. Set the date range — I recommend at least 1 year of data, ideally 2-3 years
  5. Set modeling to "Every tick based on real ticks" — This is the most accurate mode, exclusive to MT5
  6. Set initial deposit to match your planned live account size
  7. Click Start

อ่านผลลัพธ์: ดู Net Profit, Profit Factor (ควร >1.5), Max Drawdown (ควร <30%), Win Rate, Avg Win/Loss Ratio ถ้าผลดี ให้ทดสอบ Demo 1-3 เดือนก่อนเทรดจริง

MetricGood RangeWhat It Means
Profit FactorAbove 1.5Total profit ÷ total loss. Higher = better
Max Drawdown %Under 20%Largest peak-to-valley decline. Lower = safer
Win Rate45-65%Percentage of profitable trades. Not the most important metric
Recovery FactorAbove 3Net profit ÷ max drawdown. Higher = more resilient
Sharpe RatioAbove 1.0Risk-adjusted return. Above 2.0 is excellent
Pro Tip: Do not be fooled by backtests showing 100% win rate or 1000% returns. These are almost always curve-fitted to historical data and will fail in live trading. A realistic, tradeable EA shows 50-60% win rate with a profit factor of 1.3-2.0 and max drawdown under 15%. That is what consistency looks like.

เทคนิคการ Optimize ขั้นสูง

Walk-Forward Optimization

The biggest mistake traders make is optimizing EA parameters on historical data and assuming they will work going forward. Walk-forward optimization solves this:

ตั้งค่า Expert Advisor บน MT5 — คู่มือติดตั้งฉบับสมบูรณ์ 2026 — ภาพประกอบ 2
  1. Divide your data into segments (e.g., 6 months optimization + 3 months testing)
  2. Optimize on the first segment, test on the second
  3. Slide the window forward and repeat
  4. Only use parameter sets that perform well across ALL test segments

Multi-Symbol Testing

ใช้ MT5 Optimizer: เลือก Optimization ใน Strategy Tester กำหนดช่วงของ Parameter ที่ต้องการทดสอบ (เช่น SL Multiplier 1.0-2.0 step 0.1) แล้วรัน

Real Tick Data

หลีกเลี่ยง Over-Optimization: ถ้า Parameter ที่ดีที่สุดต่างจาก Default มากเกินไป อาจเป็น Curve Fitting ให้เลือก Parameter ที่ทำงานได้ดีในหลาย Period ไม่ใช่แค่ Period เดียว

เคล็ดลับจากประสบการณ์ 29 ปี

EA Semi-Auto ดีกว่า Full Auto ตรงที่คุณควบคุมการตัดสินใจสุดท้าย EA วิเคราะห์ แต่คุณกดปุ่ม ลดโอกาสผิดพลาดจากสถานการณ์ที่ EA ไม่เข้าใจ

  1. Start with one pair — Master EUR/USD with your EA before adding more pairs. Each pair has its own personality and the EA may need different settings.
  2. Keep a performance spreadsheet — Track monthly returns, max drawdown, number of trades, and win rate. After 6 months, you will have meaningful data to evaluate.
  3. Update your EA regularly — We release updates to EA Semi-Auto when market conditions change significantly. Always use the latest version.
  4. Do not micro-manage — If you approved a trade, let the EA manage it. The biggest profit killers I see are traders who close winning trades too early because of fear.
  5. Schedule weekly reviews — Every Sunday, review the past week's trades. Look for patterns. Are certain sessions more profitable? Are there pairs where the EA underperforms? Use this data to refine your settings.

คำถามที่พบบ่อย

Where do I find the MQL5 Experts folder in MT5?

In MetaTrader 5, go to File → Open Data Folder. Then navigate to MQL5 → Experts. This is where all EA (.ex5) files must be placed. After copying, restart MT5 for the EA to appear in Navigator.

Why is my EA not showing in the Navigator panel?

Three common causes: (1) Wrong folder — must be in MQL5/Experts. (2) Wrong file extension — must be .ex5 for MT5. (3) You need to restart MT5 after copying.

Do I need a VPS to run an EA 24/7?

For semi-auto EAs like ours, a VPS is optional since you approve each trade manually. For fully automatic EAs, a VPS is recommended. XM offers a free VPS for qualified accounts.

Can I run multiple EAs on one MT5 account?

EA Semi-Auto ฟรีจริงไหม? ฟรีครับ ดาวน์โหลดจาก siamcafe.net/download ไม่มีค่าสมาชิก ไม่มี Hidden Fee

What happens if my internet disconnects while the EA is running?

ต้องเปิด MT5 ตลอดเวลาไหม? ใช่ ถ้าต้องการให้ EA ทำงาน แนะนำใช้ VPS เพื่อให้ MT5 เปิดตลอด 24/5

สรุป

Setting up an Expert Advisor on MetaTrader 5 is straightforward when you follow the right steps. The key is preparation — having the right account type, placing files in the correct folders, and configuring settings properly before going live.

ตั้งค่า Expert Advisor บน MT5 — คู่มือติดตั้งฉบับสมบูรณ์ 2026 — ภาพประกอบ 3

Remember: the EA is a tool, not a magic money machine. It works best when combined with proper risk management, realistic expectations, and ongoing monitoring. Start with a demo account, prove the system works for you, then transition to live trading with conservative risk settings.

With XM's excellent execution, tight spreads, and our EA Semi-Auto, you have everything you need to start your automated trading journey. The setup takes 15 minutes. The potential impact on your trading could last a lifetime.

Risk Disclosure: Forex and CFD trading involves substantial risk. Past performance does not guarantee future results. Always use proper risk management and never trade with money you cannot afford to lose.
🎁 เปิดบัญชี XM ฟรี →

Partner Code: cafefx · iCafeFX

Forex & Investment Network

🎁 เปิดบัญชี XM ฟรี →