Turn this code into an ea

MQL4 Experts

Trabalho concluído

Tempo de execução 14 dias
Comentário do desenvolvedor
Thanks for the job
Comentário do cliente
Best developer I've worked with. Keen to continue with him in future. Thank you

Termos de Referência

//---- input parameters
extern int MAPeriod = 20;
extern double StopLoss = 10;
extern double TakeProfit = 20;

//---- global variables
int ticket = 0;
double ma = 0.0;

//---- initialization function
int init()
{
    // set up the chart
    SetIndexBuffer(0, ma);
    SetIndexStyle(0, DRAW_LINE);
    SetIndexShift(0, 0);
    SetIndexPeriod(0, MAPeriod);

    return(0);
}

//---- start function
int start()
{
    // identify the trend
    ma = iMA(NULL, 0, MAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
    double slope = ma - iMA(NULL, 0, MAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
    int trend = 0;
    if (slope > 0) {
        trend = 1; // bullish
    } else if (slope < 0) {
        trend = -1; // bearish
    }

    // look for entry and exit points
    double price = Ask;
    if (trend > 0 && price < ma) {
        ticket = OrderSend(Symbol(), OP_BUY, 0.01, price, 3, Bid - StopLoss * Point, Bid + TakeProfit * Point, "Buy", 0, 0, Green);
    } else if (trend < 0 && price > ma) {
        ticket = OrderSend(Symbol(), OP_SELL, 0.01, price, 3, Ask + StopLoss * Point, Ask - TakeProfit * Point, "Sell", 0, 0, Red);
    }

    // monitor the trade
    if (ticket > 0) {
        if (OrderSelect(ticket, SELECT_BY_TICKET)) {
            if (OrderCloseTime() == 0) {
                if (trend > 0) {
                    double stoploss = Bid - StopLoss * Point;
                    if (OrderStopLoss() < stoploss) {
                        bool modified = OrderModify(ticket, OrderOpenPrice(), stoploss, OrderTakeProfit(), 0, Green);
                        if (!modified) {
                            Alert("Error modifying stop loss: ", GetLastError());
                        }
                    }
                } else if (trend < 0) {
                    double stoploss = Ask + StopLoss * Point;
                    if (OrderStopLoss() > stoploss) {
                        bool modified = OrderModify(ticket, OrderOpenPrice(), stoploss, OrderTakeProfit(), 0, Red);
                        if (!modified) {
                            Alert("Error modifying stop loss: ", GetLastError());
                        }
                    }
                }
            }
        }
    }

    return(0);
}

Respondido

1
Desenvolvedor 1
Classificação
(150)
Projetos
178
24%
Arbitragem
7
29% / 43%
Expirado
4
2%
Carregado
2
Desenvolvedor 2
Classificação
(41)
Projetos
54
4%
Arbitragem
5
0% / 60%
Expirado
4
7%
Livre
3
Desenvolvedor 3
Classificação
(42)
Projetos
62
8%
Arbitragem
12
58% / 42%
Expirado
1
2%
Livre
4
Desenvolvedor 4
Classificação
(202)
Projetos
206
27%
Arbitragem
0
Expirado
3
1%
Livre
5
Desenvolvedor 5
Classificação
(108)
Projetos
168
33%
Arbitragem
12
25% / 33%
Expirado
0
Trabalhando
6
Desenvolvedor 6
Classificação
(97)
Projetos
135
52%
Arbitragem
4
50% / 50%
Expirado
0
Trabalhando
7
Desenvolvedor 7
Classificação
(474)
Projetos
536
33%
Arbitragem
27
41% / 44%
Expirado
8
1%
Ocupado
8
Desenvolvedor 8
Classificação
(298)
Projetos
427
26%
Arbitragem
18
61% / 33%
Expirado
26
6%
Livre
9
Desenvolvedor 9
Classificação
(71)
Projetos
80
10%
Arbitragem
36
8% / 53%
Expirado
6
8%
Trabalhando
10
Desenvolvedor 10
Classificação
(61)
Projetos
188
73%
Arbitragem
4
100% / 0%
Expirado
1
1%
Trabalhando
11
Desenvolvedor 11
Classificação
(15)
Projetos
18
39%
Arbitragem
2
50% / 50%
Expirado
0
Trabalhando
12
Desenvolvedor 12
Classificação
(4)
Projetos
6
0%
Arbitragem
4
25% / 75%
Expirado
0
Livre
13
Desenvolvedor 13
Classificação
(568)
Projetos
641
41%
Arbitragem
21
57% / 29%
Expirado
47
7%
Trabalhando
14
Desenvolvedor 14
Classificação
(769)
Projetos
1033
44%
Arbitragem
50
8% / 50%
Expirado
117
11%
Livre
Pedidos semelhantes
My requirements are these. I am asking for a powerful EA indicator and robot to combat the ups and downs during trading in the market, also for all market conditions to bring a high value of profit in the business in the market during trading
Make me a template so I can make custom MT5 charts with one instrument versus another instrument. Example Gold/Bitcoin It gets the total of two individual instruments and divides by two. It will be a template that I can use over and over again. Thanks
Looking for good EA 50 - 200 USD
I'm looking for good EA which makes monthly 50-100% profit with low DD. If you have any such type of strategy or ideas please ping me . Once I test and satisfied with your strategy/idea I wll order same EA to develop for me
I wish to add a customisable varying pipstep as martingale takes deeper trades in. I have a current EA that I am happy with , apart from that is has a pipstep rate that you can only control them all with. I’m finding if I put it to 300 it is much safer and of course spreads out the open martingale trades better for market trend runaways, but I am missing the fast $1 TP scalping turnarounds (normally 120 pipstep)
I want to create an EA where we have impulse Candle with big body close and the next candle is a red candle. I want to take a buy order when there is a break of the high of the candle for long with 1:1.5 RR and the Stoploss is setup below the low. Please see the screenshots attached for long and short trades and let me know how you will implement it. I will need to have inputs for Risk% or static lots, RR changes
I want to create an EA MT5 that can 1. identify support and resistance (based on close candles) 2. mark snr breakout 3. multitimeframe breakout scanner 4. scan the valid setup that appears 5. available for manual marking, INFO SPREAD & TIME NEXT BAR 6. sends alert notification to Telegram I need a professional and experienced developer with fast and good work according to what I want. if you are interested I will
Hello developer i want to have ea that will user Indicator 1. RSI 2. MACD_Histogram 3. EMA6, EMA20 & EMA30 Buy Condition BUY 1 If RSI Line ( RSIPeriod 6) Cross Trend Line (EMAPeriod 9) from down to up and next Bullish Candle closed above EMA6 SL1 ( SL=10 pips below entry price) TP1 ( TP=10 PIPS AFTER ENTRY PRICE) BUY 2 If MACD Line ( SignalEMA 6) Cross Trend Line ( SignalEMA 6))from down to up and next Bullish Candle
EA Requirements No Risk Strategies like Martingale or Grid Must have nice entries and Exits Leverage 1:50 Profit 10% ( shown on inputs) Maxim Drawdown ( shown on inputs) Max Daily Loss 4% ( shown on inputs) All trades with Stop loss No trades During and After High Impact News( News Filter) No weekend Trades Profitable Back test for 1 year Trades Forex Mainly Gold EA Needs to have proven Results of Passing challenges
I am seeking a developer to replicate an Expert Advisor (EA) exactly as one I currently have in ex5. The replica must include the same features, functionality, and the identical design of the control panel. Only developers with proven expertise in MQL5 and EA design should apply. Please reach out only if you have significant experience in creating precise replicas of existing Expert Advisors
Hello, I got a include file developed for me which I runs and save all the FF news for the day in a variable. See the result of when we loop through the variable the result some of the columns/fields get. I am looking for a expert programmer to edit the include file, if possible so that I can get the same information from investing.com ( https://uk.investing.com/economic-calendar/ ) news calendar. Please note that I

Informações sobre o projeto

Orçamento
40+ USD
Desenvolvedor
36 USD
Prazo
para 1 dias