Buy and sell moving average

MQL5 Esperti

Specifiche

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

Con risposta

1
Sviluppatore 1
Valutazioni
(146)
Progetti
172
23%
Arbitraggio
7
29% / 43%
In ritardo
4
2%
In elaborazione
2
Sviluppatore 2
Valutazioni
(2086)
Progetti
2646
61%
Arbitraggio
113
45% / 26%
In ritardo
418
16%
In elaborazione
3
Sviluppatore 3
Valutazioni
(18)
Progetti
24
42%
Arbitraggio
0
In ritardo
0
In elaborazione
4
Sviluppatore 4
Valutazioni
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
5
Sviluppatore 5
Valutazioni
(5)
Progetti
6
17%
Arbitraggio
0
In ritardo
0
Gratuito
6
Sviluppatore 6
Valutazioni
(343)
Progetti
466
52%
Arbitraggio
22
50% / 27%
In ritardo
5
1%
Caricato
7
Sviluppatore 7
Valutazioni
(512)
Progetti
773
63%
Arbitraggio
33
27% / 45%
In ritardo
23
3%
Gratuito
8
Sviluppatore 8
Valutazioni
Progetti
0
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
9
Sviluppatore 9
Valutazioni
(1130)
Progetti
1432
62%
Arbitraggio
21
57% / 10%
In ritardo
43
3%
Gratuito
10
Sviluppatore 10
Valutazioni
(350)
Progetti
553
32%
Arbitraggio
24
67% / 8%
In ritardo
16
3%
Gratuito
11
Sviluppatore 11
Valutazioni
(14)
Progetti
18
67%
Arbitraggio
2
50% / 50%
In ritardo
3
17%
Gratuito
12
Sviluppatore 12
Valutazioni
(87)
Progetti
109
25%
Arbitraggio
9
44% / 22%
In ritardo
8
7%
In elaborazione
13
Sviluppatore 13
Valutazioni
(4)
Progetti
6
0%
Arbitraggio
4
25% / 75%
In ritardo
0
Gratuito
14
Sviluppatore 14
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
15
Sviluppatore 15
Valutazioni
(42)
Progetti
62
8%
Arbitraggio
12
58% / 42%
In ritardo
1
2%
Gratuito
16
Sviluppatore 16
Valutazioni
(61)
Progetti
186
73%
Arbitraggio
4
100% / 0%
In ritardo
1
1%
Gratuito
17
Sviluppatore 17
Valutazioni
(24)
Progetti
31
16%
Arbitraggio
7
29% / 43%
In ritardo
4
13%
In elaborazione
18
Sviluppatore 18
Valutazioni
(1092)
Progetti
1448
45%
Arbitraggio
49
73% / 12%
In ritardo
36
2%
Gratuito
19
Sviluppatore 19
Valutazioni
(13)
Progetti
18
28%
Arbitraggio
2
0% / 100%
In ritardo
4
22%
In elaborazione
20
Sviluppatore 20
Valutazioni
(5)
Progetti
6
50%
Arbitraggio
1
0% / 0%
In ritardo
0
In elaborazione
21
Sviluppatore 21
Valutazioni
(36)
Progetti
45
36%
Arbitraggio
0
In ritardo
0
Gratuito
22
Sviluppatore 22
Valutazioni
(76)
Progetti
99
36%
Arbitraggio
0
In ritardo
3
3%
In elaborazione
23
Sviluppatore 23
Valutazioni
(124)
Progetti
158
42%
Arbitraggio
20
60% / 20%
In ritardo
8
5%
Gratuito
24
Sviluppatore 24
Valutazioni
(478)
Progetti
507
53%
Arbitraggio
10
60% / 20%
In ritardo
3
1%
Gratuito
25
Sviluppatore 25
Valutazioni
(4)
Progetti
4
0%
Arbitraggio
2
0% / 100%
In ritardo
1
25%
Gratuito
26
Sviluppatore 26
Valutazioni
(563)
Progetti
932
47%
Arbitraggio
302
59% / 25%
In ritardo
124
13%
Caricato
Ordini simili
Hi man, How are u? I have an EA and I need to check few aspects of the code, if It works fine? I am looking for an expert coder, who can understand mt4 language and help us to solve this out. This job will hardly take about 3-4 hours max for an experienced coder, when explained detail. Also, I would like to give this to someone, who can understand and speak English well. Also, the coder should be able to come via
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA. THREE TYPES OF ENTRIES 1: AGGRESSIVE 2: DIVERGENCE 3
Indicator in use: Bollinger Bands Mechanism (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the lowest point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal; or if on Futures if the increment is .25 or .10 then this is used) 2. Enter sell ONLY on the next candle if price breaks
Indicator in use: Bollinger Bands Mechanism: (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal) 2. Enter sell ONLY on the next candle if price breaks below the trigger candle LOW (using the e.g. above- if next candle price
hey guys, im looking for an auto mt5 license system through a web app i have already, i simply want it so a unique license key is generated for memebers, they input this onto the EA input and then it checks if its valid. active license per user capped at 5. i already have an mt5 coder and dec team for the app so i dont know if youd prefer to intergrate onto the webapp yourself or simply provide the code and doc so my
I need a simple panel to execute both buy and sell operations with very basic things like stopp loss take profit that functions for both market orders such as buy stop sell stop buy limit sell limit I don't care about colors or design I just want how you can do it what interests me most are the functions
I want to create an EA that can take bids according to information of a logic I have developed to give indication of a BUY or SELL opportunity. The EA will then be able to activate the BUY at the lowest possible position once the indicator clears it for a BUY and take bid upwards or identify the highest point and clears it for a SELL and take bids downwards. As you can see from example of JULY 2024 data to see how
We are seeking a skilled developer who can convert a Tradingview indicator written in Pinescript to a NinjaTrader indicator written in C#. The goal is to create a profitable trading strategy using this indicator. The successful candidate will have expertise in both Pinescript and C# programming languages, as well as a strong understanding of trading indicators and strategies. The main responsibilities will include
I am seeking an experienced MQL5 developer to create a user-friendly manual Grid Trading Expert Advisor (EA) with the following key features: Dynamic Grid Trading: Adjustable Grid Distance: Traders can manually input grid distance in pips via an intuitive, movable table. Take Profit Management: Fixed TP for the initial positions (e.g., first 5 trades). Stop-Loss (Optional): Traders can choose to use a stop-loss with
I want have the possibility to increase lotsize not alone by Lot-multiplier rather I want add a fix-lot increase for excample for 0,05 lot. I want have this for buy / sell and hedge-buy and hedge sell

Informazioni sul progetto

Budget
100+ USD
Per lo sviluppatore
90 USD