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

Spécifications

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

يستخدم متوسطين متحركين: سريع (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);
   }
}

Répondu

1
Développeur 1
Évaluation
(19)
Projets
23
9%
Arbitrage
6
33% / 50%
En retard
1
4%
Occupé
2
Développeur 2
Évaluation
(22)
Projets
21
10%
Arbitrage
4
25% / 75%
En retard
0
Gratuit
3
Développeur 3
Évaluation
(448)
Projets
710
34%
Arbitrage
34
71% / 9%
En retard
22
3%
Gratuit
4
Développeur 4
Évaluation
(32)
Projets
35
34%
Arbitrage
5
0% / 80%
En retard
0
Travail
Publié : 2 codes
5
Développeur 5
Évaluation
(216)
Projets
368
33%
Arbitrage
34
41% / 29%
En retard
108
29%
Travail
Publié : 1 code
6
Développeur 6
Évaluation
(60)
Projets
87
29%
Arbitrage
24
13% / 58%
En retard
7
8%
Chargé
7
Développeur 7
Évaluation
(104)
Projets
125
24%
Arbitrage
23
26% / 52%
En retard
8
6%
Travail
8
Développeur 8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Développeur 9
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Travail
10
Développeur 10
Évaluation
(6)
Projets
5
0%
Arbitrage
3
33% / 67%
En retard
2
40%
Gratuit
11
Développeur 11
Évaluation
(28)
Projets
31
45%
Arbitrage
1
100% / 0%
En retard
3
10%
Gratuit
12
Développeur 12
Évaluation
(17)
Projets
19
26%
Arbitrage
0
En retard
3
16%
Gratuit
13
Développeur 13
Évaluation
(38)
Projets
41
59%
Arbitrage
1
100% / 0%
En retard
1
2%
Travail
Publié : 5 codes
14
Développeur 14
Évaluation
(3)
Projets
1
100%
Arbitrage
3
0% / 100%
En retard
0
Gratuit
15
Développeur 15
Évaluation
(273)
Projets
402
27%
Arbitrage
40
40% / 50%
En retard
1
0%
Gratuit
16
Développeur 16
Évaluation
(13)
Projets
20
40%
Arbitrage
3
0% / 67%
En retard
3
15%
Gratuit
17
Développeur 17
Évaluation
(1)
Projets
1
0%
Arbitrage
3
0% / 100%
En retard
1
100%
Gratuit
18
Développeur 18
Évaluation
(3)
Projets
3
0%
Arbitrage
0
En retard
0
Gratuit
19
Développeur 19
Évaluation
(433)
Projets
633
54%
Arbitrage
32
53% / 22%
En retard
6
1%
Chargé
20
Développeur 20
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
21
Développeur 21
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
22
Développeur 22
Évaluation
(3)
Projets
5
20%
Arbitrage
1
100% / 0%
En retard
2
40%
Gratuit
23
Développeur 23
Évaluation
(35)
Projets
53
74%
Arbitrage
4
50% / 0%
En retard
0
Gratuit
24
Développeur 24
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
25
Développeur 25
Évaluation
(52)
Projets
58
59%
Arbitrage
4
0% / 25%
En retard
1
2%
Gratuit
26
Développeur 26
Évaluation
Projets
0
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
Publié : 1 code
27
Développeur 27
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
I need a professional MT5 Expert Advisor (EA) built with clean, modular code. This is an advanced strategy combining liquidity concepts, controlled DCA, hedge protection, and strict risk management. Core Requirements: Entry Logic (ALL must align): Liquidity sweep (Previous Day High/Low breakout and return) EMA50 and EMA200 trend alignment Higher timeframe bias (H1 or H4) RSI confirmation Bollinger Band entry Filters
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

Informations sur le projet

Budget
30 - 80 USD