Buy and sell moving average

MQL5 Uzman Danışmanlar

İş Gereklilikleri

// Define input parameters
input int fastEMA_Period = 10; // Fast EMA period
input int slowEMA_Period = 20; // Slow EMA period

// Define global variables
double fastEMA, slowEMA;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
    // Calculate initial EMAs
    fastEMA = iMA(Symbol(), 0, fastEMA_Period, 0, MODE_EMA, PRICE_CLOSE);
    slowEMA = iMA(Symbol(), 0, slowEMA_Period, 0, MODE_EMA, PRICE_CLOSE);

    return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{
    // Update EMAs
    fastEMA = iMA(Symbol(), 0, fastEMA_Period, 0, MODE_EMA, PRICE_CLOSE);
    slowEMA = iMA(Symbol(), 0, slowEMA_Period, 0, MODE_EMA, PRICE_CLOSE);

    // Generate buy signal when fast EMA crosses above slow EMA
    if (fastEMA > slowEMA)
    {
        Print("Buy signal! Fast EMA crossed above slow EMA.");
        // Implement your buy logic here
    }

    // Generate sell signal when fast EMA crosses below slow EMA
    else if (fastEMA < slowEMA)
    {
        Print("Sell signal! Fast EMA crossed below slow EMA.");
        // Implement your sell logic here
    }
}

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(137)
Projeler
160
23%
Arabuluculuk
7
0% / 43%
Süresi dolmuş
4
3%
Yüklendi
2
Geliştirici 2
Derecelendirme
(2077)
Projeler
2636
61%
Arabuluculuk
113
45% / 26%
Süresi dolmuş
418
16%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(17)
Projeler
22
36%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
4
Geliştirici 4
Derecelendirme
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
5
Geliştirici 5
Derecelendirme
(5)
Projeler
6
17%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
6
Geliştirici 6
Derecelendirme
(337)
Projeler
455
52%
Arabuluculuk
22
50% / 27%
Süresi dolmuş
5
1%
Yüklendi
7
Geliştirici 7
Derecelendirme
(508)
Projeler
764
63%
Arabuluculuk
33
27% / 45%
Süresi dolmuş
23
3%
Serbest
8
Geliştirici 8
Derecelendirme
Projeler
0
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
9
Geliştirici 9
Derecelendirme
(1127)
Projeler
1429
62%
Arabuluculuk
21
57% / 10%
Süresi dolmuş
43
3%
Serbest
10
Geliştirici 10
Derecelendirme
(345)
Projeler
543
32%
Arabuluculuk
24
67% / 8%
Süresi dolmuş
15
3%
Serbest
11
Geliştirici 11
Derecelendirme
(14)
Projeler
18
67%
Arabuluculuk
2
50% / 50%
Süresi dolmuş
3
17%
Serbest
12
Geliştirici 12
Derecelendirme
(85)
Projeler
105
24%
Arabuluculuk
8
38% / 25%
Süresi dolmuş
8
8%
Yüklendi
13
Geliştirici 13
Derecelendirme
(4)
Projeler
6
0%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
0
Serbest
14
Geliştirici 14
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
15
Geliştirici 15
Derecelendirme
(42)
Projeler
62
8%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Serbest
16
Geliştirici 16
Derecelendirme
(56)
Projeler
175
71%
Arabuluculuk
4
100% / 0%
Süresi dolmuş
1
1%
Serbest
17
Geliştirici 17
Derecelendirme
(22)
Projeler
28
11%
Arabuluculuk
6
33% / 50%
Süresi dolmuş
4
14%
Çalışıyor
18
Geliştirici 18
Derecelendirme
(1086)
Projeler
1437
45%
Arabuluculuk
48
73% / 13%
Süresi dolmuş
35
2%
Çalışıyor
19
Geliştirici 19
Derecelendirme
(13)
Projeler
18
28%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
4
22%
Serbest
20
Geliştirici 20
Derecelendirme
(4)
Projeler
4
50%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
21
Geliştirici 21
Derecelendirme
(32)
Projeler
40
38%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
22
Geliştirici 22
Derecelendirme
(60)
Projeler
79
34%
Arabuluculuk
0
Süresi dolmuş
3
4%
Çalışıyor
23
Geliştirici 23
Derecelendirme
(121)
Projeler
155
43%
Arabuluculuk
20
60% / 20%
Süresi dolmuş
8
5%
Çalışıyor
24
Geliştirici 24
Derecelendirme
(475)
Projeler
504
53%
Arabuluculuk
10
60% / 20%
Süresi dolmuş
3
1%
Serbest
25
Geliştirici 25
Derecelendirme
(4)
Projeler
4
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
1
25%
Serbest
26
Geliştirici 26
Derecelendirme
(563)
Projeler
932
47%
Arabuluculuk
301
59% / 25%
Süresi dolmuş
124
13%
Çalışıyor
Benzer siparişler
I have the bot just over half made, from another developer who let me down and decided they no longer wished to finish the project, so I have a basic example of the fundamentals of what it could look like, although multiple functions I require do not work, but I can show this to you on request. There are multiple features that I require, so please read the in depth requirement sheet on the attachment. Function: To
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. - Can recognize RSI. - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss below/above support/resistance, but risk must be fixed at a certain price. - Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
"I need an expert advisor (EA) based on stochastic divergence and candlestick formation. It should be able to identify both hidden and regular divergences. The EA should also include modified risk-reward ratios, modified timeframes, and a trailing stop loss. It is important that the EA is 100% accurate. Once an experienced developer applies, I will share the complete strategy."
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for
I need someone that can make expert advisor for backtesting purpose. The input file is History trade report export file from MQl5 the expert advisor should open position the exact time of open trade on the report. The same as the close time
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
Hello, send robot models with a solid strategy (to trade forex), I want to use it to make money for the week. It is important that you present me with your profitability graph and a test. I also want to hire him for future jobs
I am looking to develop an automated trading bot based on a strategy involving the crossing of four Simple Moving Averages (SMA). The bot should be capable of entering trades based on this strategy. Additionally, I would like to incorporate some custom diversions tailored for NinjaTrader
Seeking an experienced MQL5 developer to create a sophisticated Expert Advisor focused on harmonic pattern trading . The EA will be designed to identify and trade based on popular harmonic patterns in the forex market. Entry and Exit Logic: Develop smart entry and exit rules based on pattern completions and price action confirmations. Risk Management: Incorporate adjustable risk-per-trade settings and position sizing

Proje bilgisi

Bütçe
100+ USD
Geliştirici için
90 USD