Buy and sell moving average

MQL5 Experts

Specification

// 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
    }
}

Responded

1
Developer 1
Rating
(131)
Projects
152
22%
Arbitration
5
0% / 60%
Overdue
4
3%
Loaded
2
Developer 2
Rating
(2067)
Projects
2625
62%
Arbitration
113
45% / 26%
Overdue
418
16%
Working
3
Developer 3
Rating
(17)
Projects
22
36%
Arbitration
0
Overdue
0
Working
4
Developer 4
Rating
Projects
1
0%
Arbitration
0
Overdue
0
Free
5
Developer 5
Rating
(5)
Projects
6
17%
Arbitration
0
Overdue
0
Working
6
Developer 6
Rating
(331)
Projects
451
52%
Arbitration
22
50% / 27%
Overdue
5
1%
Loaded
7
Developer 7
Rating
(508)
Projects
764
63%
Arbitration
33
27% / 45%
Overdue
23
3%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
9
Developer 9
Rating
(1123)
Projects
1425
62%
Arbitration
21
57% / 10%
Overdue
43
3%
Free
10
Developer 10
Rating
(344)
Projects
540
32%
Arbitration
24
67% / 8%
Overdue
15
3%
Free
11
Developer 11
Rating
(14)
Projects
18
67%
Arbitration
2
50% / 50%
Overdue
3
17%
Free
12
Developer 12
Rating
(83)
Projects
103
24%
Arbitration
7
43% / 29%
Overdue
8
8%
Working
13
Developer 13
Rating
(4)
Projects
6
0%
Arbitration
4
25% / 75%
Overdue
0
Free
14
Developer 14
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
15
Developer 15
Rating
(42)
Projects
62
8%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
16
Developer 16
Rating
(56)
Projects
166
69%
Arbitration
4
100% / 0%
Overdue
1
1%
Free
17
Developer 17
Rating
(22)
Projects
27
11%
Arbitration
6
17% / 17%
Overdue
4
15%
Loaded
18
Developer 18
Rating
(1083)
Projects
1432
45%
Arbitration
48
73% / 13%
Overdue
35
2%
Working
19
Developer 19
Rating
(13)
Projects
17
24%
Arbitration
2
0% / 50%
Overdue
3
18%
Working
20
Developer 20
Rating
(4)
Projects
4
50%
Arbitration
0
Overdue
0
Free
21
Developer 21
Rating
(29)
Projects
37
41%
Arbitration
0
Overdue
0
Loaded
22
Developer 22
Rating
(52)
Projects
67
33%
Arbitration
0
Overdue
3
4%
Working
23
Developer 23
Rating
(121)
Projects
154
43%
Arbitration
20
60% / 20%
Overdue
7
5%
Working
24
Developer 24
Rating
(472)
Projects
501
52%
Arbitration
10
60% / 20%
Overdue
3
1%
Free
25
Developer 25
Rating
(4)
Projects
4
0%
Arbitration
2
0% / 50%
Overdue
1
25%
Working
26
Developer 26
Rating
(563)
Projects
931
47%
Arbitration
301
59% / 25%
Overdue
123
13%
Working
Similar orders
@page { size: 21cm 29.7cm; margin: 2cm } p { line-height: 115%; margin-bottom: 0.25cm; background: transparent } Hi, The task involves adding functions to an existing EA and correcting an error. The developer must have a thorough understanding of the following: Trailing Take Profit function Calculating a decreasing distance between orders Ability to code a function for Global Profit decrement/increment size in
The first section will describe the EAs trading strategy logic and features. The second section is an outline of the inputs that the EA should contain. 1. The idea of the trading system is as follows : This EA enters trades based on fibonacci retracement levels when other (MACD, RSI) conditions are met. It will use a MACD from a particular time frame to establish the swing high and swing lows which the fibonacci
Expert Advisor (EA) will provide automatic entry and exit using Black Dragon indicator as per the description below. Long (entry): on the first blue candle. Long (exit): on the first red candle, stop loss or take profit/break-even. Whatever happens first. Short (entry): on the first red candle. Short (exit): on the first blue candle, stop loss or take profit/break-even. Whatever happens first. Long (stop loss value)
1. **Timeframe and Liquidity:** Focus on the 5-minute timeframe for liquidity analysis.(timeframe for liquidity should be editble) 2. **Candlestick MSS:** Monitor 1-minute candlestick patterns for entry signals.(should be editble) 3. **Swing Points:** Identify swing points using the high and low of the last three candles.(ict swimg high and low) 4. **Sell Setup:** - Wait for a 5-minute candle to take out the swing
Hello Greetings. I have a custom tradingview strategy I would like to convert to Metatrader 5 ( mt5 ) . I have the source code a and with me. Kindly bid if it is what you can do for me and let discuss about the project. Thanks
I'm looking for a developer who has already working on a HFT tailored to pass prop firm challenges within a short period, maintaining a very low drawdown. Here is a link to a video demonstrating an existing EA executing the same strategy: https://youtu.be/N6NEcIpPzV4 Any developer having already worked on this type of project and able to provide quickly a test version is welcome to contact me
have trade signals i get by telegram messaging, i would like to have a robot designed to read those message for trade inputs and open and close trades base on the signals Ea must be able to scan my telegram Message app Read signals sent Open trades on the mt4 and manage them to close Read signals every one minute (user changeable input) I also need the programmer to teach me how to install and make the robot work
MACD EA 50+ USD
Hello Freelancers, I am seeking an experienced developer to create an Expert Advisor (EA) for MetaTrader 5 (MT5). The EA will be based on the MACD indicator and should adhere to the following specifications: EA Requirements: Trading Logic: 1. Long Trades: • Entry: Open a long trade when the MACD line crosses above the signal line below the zero level. • Exit: Close the long trade when the signal line crosses above
EA Configuration. FIBO ------------------------------------------------------------------- Magic: 123456 Stop: Real or Virtual Order: Pending / CLOSE / price== LOT Description: 0.01 ------------------------------------------------------------------- STOP: -0.25 ------------------------------------------------------------------- ENT_1: 1.00 Lot_1: 0.01 ENT_2: 0.50 Lot_2: 0.01 ENT_3: 1.00 Lot_3: 0.01
Hi I'm looking for a professional programmer to modify my EA the EA send signal alert to telegram and screen shot of the chart patterns my EA is dased to the harmonic pattern but I want to see on the screen shot the pattern of the harmonic pattern and on the chat as well

Project information

Budget
100+ USD
For the developer
90 USD