إنشاء روبوت تداول أوتوماتيكي للذهب XAUUSD باستراتيجية بسيطة

Specification

كيف يعمل هذا الروبوت؟

يستخدم متوسطين متحركين: سريع (Fast) وبطيء (Slow).

• شراء (Buy): عندما يقطع المتوسط السريع المتوسط البطيء نحو الأعلى.

• بيع (Sell): عندما يقطع المتوسط السريع المتوسط البطيء نحو الأسفل.

• الكود (انسخه وضعه في MetaEditor):

خطوات تشغيل الروبوت:

افتح منصة MetaTrader 5.

.

اضغط على F4 لفتح محرر MetaEditor.

.

من القائمة الجانبية، اضغط بيمين الماوس على مجلد Experts واختر New File -> Expert Advisor.

.

سمِّ الروبوت (مثلاً Gold_Bot) ثم اضغط Finish.

.

امسح الكود الموجود وضع الكود الذي كتبته لك أعلاه.

.

اضغط على زر Compile في الأعلى وتأكد من عدم وجود أخطاء (Errors).

.

عُد إلى منصة الميتا تريدر، ستجد الروبوت في نافذة Navigator تحت قسم Expert Advisors.

.

اسحب الروبوت وضعه على شارت الذهب (XAUUSD).

.

هام جداً: تأكد من تفعيل زر "Algo Trading" في أعلى المنصة ليتحول للون الأخضر.

ملاحظات ضرورية قبل البدء:

هذا الروبوت تجريبي: هو مجرد هيكل تعليمي. الذهب يحتاج إلى إضافة "إدارة مخاطر" (Stop Loss و Take Profit) و "فلتر أوقات" ليكون مربحاً.

.

الاختبار (Backtest): لا تضعه أبداً في حساب حقيقي قبل عمل "Strategy Tester" لمدة لا تقل عن 6 أشهر على بيانات تاريخية.

.

إدارة المخاطر: في حال أردت إضافة "وقف خسارة"، يمكنك تعديل دالة trade.Buy لتشمل مستويات الأسعار، وهو أمر حيوي جداً لتجنب تصفير الحساب.

//+------------------------------------------------------------------+
//|                                                Gold_Bot_Test.mq5 |
//|                                  Copyright 2023, Your Name Here  |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>

CTrade trade;

input int FastMA = 10;      // فترة المتوسط السريع
input int SlowMA = 20;      // فترة المتوسط البطيء
input double LotSize = 0.01; // حجم الصفقة

int handleFast, handleSlow;

int OnInit() {
   handleFast = iMA(_Symbol, _Period, FastMA, 0, MODE_SMA, PRICE_CLOSE);
   handleSlow = iMA(_Symbol, _Period, SlowMA, 0, MODE_SMA, PRICE_CLOSE);
   return(INIT_SUCCEEDED);
}

void OnTick() {
   double fast[], slow[];
   CopyBuffer(handleFast, 0, 0, 2, fast);
   CopyBuffer(handleSlow, 0, 0, 2, slow);

   // منطق التقاطع:
   // تقاطع صعودي (شراء)
   if(fast[1] > slow[1] && fast[0] <= slow[0]) {
      trade.Buy(LotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_ASK), 0, 0);
   }
   // تقاطع هبوطي (بيع)
   if(fast[1] < slow[1] && fast[0] >= slow[0]) {
      trade.Sell(LotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_BID), 0, 0);
   }
}

Responded

1
Developer 1
Rating
(19)
Projects
24
8%
Arbitration
9
33% / 33%
Overdue
1
4%
Loaded
2
Developer 2
Rating
(22)
Projects
21
10%
Arbitration
4
25% / 75%
Overdue
0
Free
3
Developer 3
Rating
(454)
Projects
718
34%
Arbitration
35
69% / 9%
Overdue
22
3%
Working
4
Developer 4
Rating
(33)
Projects
36
33%
Arbitration
5
0% / 80%
Overdue
0
Working
Published: 2 codes
5
Developer 5
Rating
(217)
Projects
369
33%
Arbitration
34
41% / 29%
Overdue
108
29%
Free
Published: 1 code
6
Developer 6
Rating
(62)
Projects
90
29%
Arbitration
24
13% / 58%
Overdue
7
8%
Working
7
Developer 7
Rating
(104)
Projects
127
24%
Arbitration
23
30% / 52%
Overdue
8
6%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(1)
Projects
2
0%
Arbitration
0
Overdue
1
50%
Working
10
Developer 10
Rating
(6)
Projects
5
0%
Arbitration
4
25% / 75%
Overdue
2
40%
Free
11
Developer 11
Rating
(28)
Projects
31
45%
Arbitration
1
100% / 0%
Overdue
3
10%
Free
12
Developer 12
Rating
(31)
Projects
33
42%
Arbitration
0
Overdue
3
9%
Free
13
Developer 13
Rating
(42)
Projects
47
60%
Arbitration
2
100% / 0%
Overdue
1
2%
Free
Published: 5 codes
14
Developer 14
Rating
(3)
Projects
1
100%
Arbitration
3
0% / 100%
Overdue
0
Free
15
Developer 15
Rating
(274)
Projects
403
28%
Arbitration
40
40% / 50%
Overdue
1
0%
Free
16
Developer 16
Rating
(13)
Projects
20
40%
Arbitration
3
0% / 67%
Overdue
3
15%
Free
17
Developer 17
Rating
(1)
Projects
1
0%
Arbitration
3
0% / 100%
Overdue
1
100%
Free
18
Developer 18
Rating
(3)
Projects
3
0%
Arbitration
0
Overdue
0
Free
19
Developer 19
Rating
(434)
Projects
638
53%
Arbitration
32
59% / 22%
Overdue
6
1%
Working
20
Developer 20
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
21
Developer 21
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
22
Developer 22
Rating
(3)
Projects
5
20%
Arbitration
1
100% / 0%
Overdue
2
40%
Free
23
Developer 23
Rating
(35)
Projects
53
74%
Arbitration
4
50% / 0%
Overdue
0
Free
24
Developer 24
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
25
Developer 25
Rating
(52)
Projects
58
59%
Arbitration
4
0% / 25%
Overdue
1
2%
Free
26
Developer 26
Rating
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
Published: 1 code
27
Developer 27
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Brotus AI 32+ USD
And let's talk about Linux and more about those technologies, ideas, those AI ideas.Let's make an AI technology summit for us base on wgat i wanna build and their example pictures of roadmapBoss can we take those idea all we've talked about base on technology, tech, UI...J.A.R.V.I.S...eDEX-UI into reality (solution) using laptop cause I think it give accces to build app amd more
# H4 Zone Retest EA (MQL5) An automated trading Expert Advisor (EA) for MetaTrader 5, developed in MQL5. The EA trades gold (XAUUSD) using a multi-timeframe breakout and retest strategy: it defines the first H4 candle of each day as a trading zone, detects breakouts on the M5 chart, waits for a retest, and executes trades with risk management, trailing stops, and optional news filtering. --- ## Features - H4 → M5
I require a custom EA and an accompanying custom indicator built in MQL5 for Meta Trader 4/5. The EA must be fully automated (Algo Trading); Telegram-Signal-Linked and named 'AMK Fx'
Hello, I'm looking for an expert who can help me acquire a secure, easy-to-use bot with Turkish language support for automated buying and selling in Forex, commodities, and cryptocurrencies, and who can also teach me how to set it up and use it
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation

Project information

Budget
30 - 80 USD