إنشاء روبوت تداول أوتوماتيكي للذهب 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
23
9%
Arbitration
6
33% / 50%
Overdue
1
4%
Busy
2
Developer 2
Rating
(22)
Projects
21
10%
Arbitration
4
25% / 75%
Overdue
0
Free
3
Developer 3
Rating
(448)
Projects
710
34%
Arbitration
34
71% / 9%
Overdue
22
3%
Free
4
Developer 4
Rating
(32)
Projects
35
34%
Arbitration
5
0% / 80%
Overdue
0
Working
Published: 2 codes
5
Developer 5
Rating
(216)
Projects
368
33%
Arbitration
34
41% / 29%
Overdue
108
29%
Free
Published: 1 code
6
Developer 6
Rating
(60)
Projects
87
29%
Arbitration
24
13% / 58%
Overdue
7
8%
Loaded
7
Developer 7
Rating
(104)
Projects
125
24%
Arbitration
23
26% / 52%
Overdue
8
6%
Working
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Working
10
Developer 10
Rating
(6)
Projects
5
0%
Arbitration
3
33% / 67%
Overdue
2
40%
Free
11
Developer 11
Rating
(28)
Projects
31
45%
Arbitration
1
100% / 0%
Overdue
3
10%
Free
12
Developer 12
Rating
(17)
Projects
19
26%
Arbitration
0
Overdue
3
16%
Free
13
Developer 13
Rating
(38)
Projects
41
59%
Arbitration
1
100% / 0%
Overdue
1
2%
Working
Published: 5 codes
14
Developer 14
Rating
(3)
Projects
1
100%
Arbitration
3
0% / 100%
Overdue
0
Free
15
Developer 15
Rating
(273)
Projects
402
27%
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
(433)
Projects
633
54%
Arbitration
32
53% / 22%
Overdue
6
1%
Loaded
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
Greetings I need MT5 developer that has expertise in developing a custom indicator for mt5 boom and crash based on my exact details and requirements which would be discuss later. Kindly bid for this project if it is something you can handle for me
I need a fully functional Expert Advisor (EA) for MetaTrader 5 focused on trading XAUUSD (Gold). The strategy should be based on fast scalping entries using indicators such as RSI, Moving Averages, or similar confirmation tools. The EA must include fixed risk management (1%–2% per trade), automatic lot calculation, and stop loss/take profit settings. It should be optimized for low spread conditions and quick market
I need a professional developer to help me create an EA using RSI and Moving averages.The strategies are well organised and everything is in order. I will send all the details in the inbox
MT5 Indicator SMC 30 - 100 USD
Hello, I would like to clarify something before we proceed. I already have a base code prepared for the indicator. However, the code is not the final version and it still requires professional refinement, debugging, and optimization. Because of this, I am specifically looking for a highly experienced developer who can understand the full logic and structure of the system and improve it properly. Before I send you the
Project Overview I need assistance coding a hedging Expert Advisor (EA) that operates in "closed cycles" with a strict limit of five simultaneous open positions . EA Logic & Mechanism Initial Entry: Open a Buy position of 0.01 lots (Position A) with a Take Profit (TP) target of $1.00. Scenario 1: Price Drops (Hedging Step 1): If the price moves against the first trade, open two positions simultaneously: a Sell 0.02
Hello, I would like to clarify something before we proceed. I already have a base code prepared for the indicator. However, the code is not the final version and it still requires professional refinement, debugging, and optimization. Because of this, I am specifically looking for a highly experienced developer who can understand the full logic and structure of the system and improve it properly. Before I send you the
Powerful 30 - 100 USD
I really want a powerful developed EA that can generate a minimum of 10% every month without martingale, greed or any dangerous strategy for sale. Developer must provide the mql5 file or the raw file for modification etc
I already have a fully developed MT5 Expert Advisor with all required prop firm features, including: Risk management Daily loss & max drawdown limits Spread & slippage filters News filter Trade management system The EA structure is complete. 👉 What I need is a professional developer to replace ONLY the entry logic with a high-quality, rule-based trading strategy. 🚨 STRICT REQUIREMENT (READ CAREFULLY): I am NOT
SMC Price Action Pro 30 - 100 USD
Hello, I have a source code for an MT5 indicator that is open-source and belongs to me. However, it still requires professional improvements and some corrections. At the moment the indicator does not work as expected and there are several issues in the logic and performance that need to be fixed. Because of this, I am looking for a highly experienced MT5 developer who is comfortable working with existing code
Hello, I’m looking for an experienced developer who can help convert an existing cTrader indicator into a fully functional Quantower indicator . I already have the complete source code for the cTrader indicator (written in C#) , and I would like the same logic, behavior, and visual output to be accurately replicated in Quantower

Project information

Budget
30 - 80 USD