指定


*Strategy:*

- Buy when the 50-day moving average crosses above the 200-day moving average
- Sell when the 50-day moving average crosses below the 200-day moving average

*Code:*
```
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
int OnInit()
{
   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Script deinit function                                            |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   ObjectDelete(_MA50);
   ObjectDelete(_MA200);
}

//+------------------------------------------------------------------+
//| Script tick function                                              |
//+------------------------------------------------------------------+
void OnTick()
{
   double ma50 = iMA(Symbol(), PERIOD_CURRENT, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
   double ma200 = iMA(Symbol(), PERIOD_CURRENT, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
   
   if (ma50 > ma200 && OrderSend(_Symbol, OP_BUY, 0.1, Ask, 3, Bid-20*Point, Bid+20*Point, "MyOrder", 0, 0, Green) == ORDER_RETCODE_DONE)
   {
      Comment("Buy order executed");
   }
   
   else if (ma50 < ma200 && OrderSend(_Symbol, OP_SELL, 0.1, Bid, 3, Ask-20*Point, Ask+20*Point, "MyOrder", 0, 0, Red) == ORDER_RETCODE_DONE)
   {
      Comment("Sell order executed");
   }
}

//+------------------------------------------------------------------+
//| Script deinit function                                            |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   ObjectDelete(_MA50);
   ObjectDelete(_MA200);
}
```
This code creates a simple moving average crossover strategy, buying when the 50-day MA crosses above the 200-day MA and selling when it crosses below.

応答済み

1
開発者 1
評価
(4)
プロジェクト
4
0%
仲裁
1
0% / 0%
期限切れ
0
2
開発者 2
評価
(33)
プロジェクト
38
21%
仲裁
5
0% / 60%
期限切れ
0
3
開発者 3
評価
(39)
プロジェクト
65
34%
仲裁
4
25% / 50%
期限切れ
9
14%
仕事中
4
開発者 4
評価
(78)
プロジェクト
246
74%
仲裁
7
100% / 0%
期限切れ
1
0%
パブリッシュした人: 1 article
5
開発者 5
評価
(2676)
プロジェクト
3415
68%
仲裁
77
48% / 14%
期限切れ
343
10%
パブリッシュした人: 1 code
6
開発者 6
評価
(7)
プロジェクト
8
13%
仲裁
6
33% / 33%
期限切れ
0
7
開発者 7
評価
(61)
プロジェクト
83
45%
仲裁
27
11% / 70%
期限切れ
8
10%
8
開発者 8
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
9
開発者 9
評価
(1156)
プロジェクト
1462
63%
仲裁
21
57% / 10%
期限切れ
43
3%
10
開発者 10
評価
(369)
プロジェクト
455
55%
仲裁
24
54% / 17%
期限切れ
31
7%
取り込み中
11
開発者 11
評価
(574)
プロジェクト
945
47%
仲裁
309
58% / 27%
期限切れ
125
13%
類似した注文
Hi, I would like to commission an Expert Advisor (EA) for MetaTrader 5 (MT5) based on the Smart Money Concepts (LuxAlgo) indicator, which is available in the MQL5 Market. Below are the detailed specifications for the EA: 1. General Parameters & Symbol Trading Asset: Gold (XAUUSD) Timeframe: 5-Minute (M5) Indicator Integration: Integration with "Smart Money Concepts (LuxAlgo - Smart Money Concepts)" via
We are looking for an experienced MQL5 developer who also has real trading experience to build our existing trading strategy into a fully automated MT5 Expert Advisor (EA). We already have our entry and exit trading rules documented . We are not looking for someone to invent a strategy for us. We need someone who understands trading well enough to understand our rules, discuss them with us in normal trading terms
I need a professional MQL5 developer to build a high-performance custom MetaTrader 5 (MT5) indicator for multi-timeframe trading (M5, M15, M30), optimized for highly volatile assets like XAUUSD, US30, and BTCUSD. CRITICAL ARCHITECTURE REQUIREMENT: The indicator must run SILENTLY in the background. It must ONLY send Mobile Push Notifications and Laptop Pop-Up Alerts. Absolutely NO lines, arrows, shapes, or panels
Please produce working mq5 source code for an indicator that shows 2 draggable horizontal chart lines that are initially plotted at the high and low of the previous candle. The indicator should alert during the candle (not the finish), once only per candle and 1./ play a sound and print a "Buy" alert as the ask price passes above the horizontal line whether in its initial position or a new dragged
i have indicator for Trading View, also copy for NT, i need someone to improve and check the NT version (indicator is simple is volume density koncept)…. when i put same settings on TV version and NT version i have diffrerent results, but this can be because diffrent market data or fact that TV sending tick info in blocks , not tick by tick like NT8 on both. I(ndicator base on counting volume) so besied that is it
Bobolink 1 30+ USD
I need a trading robot that can automatically analyse the market, identify trading opportunities, manage trades, and use clear risk controls. The robot should be reliable, easy to monitor, and suitable for testing before real trading
VEE STRATEGY ROBOT 30 - 200 USD
//+------------------------------------------------------------------+ //| M5 Trend Pullback EA | //| Exness / MT5 | //| Forex + XAUUSD | //| Risk: 0.5% per trade | //+------------------------------------------------------------------+ #property strict #property version "1.00" #property description "M5 EMA50/EMA200 + RSI + ATR Trend Pullback EA" #include <Trade/Trade.mqh> CTrade trade;
Please may someone assist me with the indicator attached, it has a SERIOUS BUG issue in the sense that when I load it, and activate the template (attached as well) MT4 ALWAYS freezes and then eventually disconnects automatically, ALL THE TIME. It even gets worse to an extent that after disconnecting a number of times mt4 ends up not loading anymore, UNTIL I remove the indicator. Please I WILL NEED A DEMO (FOR A DAY)
I am looking for an experienced MQL5 developer to build a fully automated MT5 Expert Advisor for XAUUSD. The trading rules are already defined. I need the developer to implement them accurately in MQL5, not redesign the strategy. Main requirements: XAUUSD Multi-timeframe logic: H1 direction, M15 setup, M5 entry Entry only after candle-close confirmation No repainting / closed-bar logic Configurable Stop Loss and Take
I have an existing order-flow engine for NinjaTrader 8, approximately 25,000 lines of C# code, currently using Rithmic Level 2 data. It detects absorption, iceberg orders, and other order-flow signals. We have also developed an initial bridge prototype ourselves and tested parts of the R|Trader Pro to NinjaTrader connection workflow, but we have not yet established a working MBO data connection. I am specifically

プロジェクト情報

予算
50+ USD
締め切り
最低 1 最高 4 日