Turn this code into an ea

MQL4 Esperti

Lavoro terminato

Tempo di esecuzione 14 giorni
Feedback del dipendente
Thanks for the job
Feedback del cliente
Best developer I've worked with. Keen to continue with him in future. Thank you

Specifiche

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

Con risposta

1
Sviluppatore 1
Valutazioni
(137)
Progetti
162
22%
Arbitraggio
7
29% / 43%
In ritardo
4
2%
Occupato
2
Sviluppatore 2
Valutazioni
(41)
Progetti
54
4%
Arbitraggio
5
0% / 60%
In ritardo
4
7%
Gratuito
3
Sviluppatore 3
Valutazioni
(42)
Progetti
62
8%
Arbitraggio
12
58% / 42%
In ritardo
1
2%
Gratuito
4
Sviluppatore 4
Valutazioni
(197)
Progetti
201
27%
Arbitraggio
0
In ritardo
3
1%
Gratuito
5
Sviluppatore 5
Valutazioni
(103)
Progetti
160
33%
Arbitraggio
11
18% / 36%
In ritardo
0
Caricato
6
Sviluppatore 6
Valutazioni
(97)
Progetti
135
52%
Arbitraggio
4
50% / 50%
In ritardo
0
In elaborazione
7
Sviluppatore 7
Valutazioni
(455)
Progetti
514
33%
Arbitraggio
26
38% / 46%
In ritardo
7
1%
Caricato
8
Sviluppatore 8
Valutazioni
(298)
Progetti
427
26%
Arbitraggio
18
61% / 33%
In ritardo
26
6%
Gratuito
9
Sviluppatore 9
Valutazioni
(68)
Progetti
79
9%
Arbitraggio
34
9% / 53%
In ritardo
6
8%
Caricato
10
Sviluppatore 10
Valutazioni
(58)
Progetti
178
71%
Arbitraggio
4
100% / 0%
In ritardo
1
1%
In elaborazione
11
Sviluppatore 11
Valutazioni
(13)
Progetti
16
38%
Arbitraggio
2
50% / 50%
In ritardo
0
Gratuito
12
Sviluppatore 12
Valutazioni
(4)
Progetti
6
0%
Arbitraggio
4
25% / 75%
In ritardo
0
Gratuito
13
Sviluppatore 13
Valutazioni
(568)
Progetti
641
41%
Arbitraggio
21
57% / 29%
In ritardo
47
7%
In elaborazione
14
Sviluppatore 14
Valutazioni
(769)
Progetti
1033
44%
Arbitraggio
50
8% / 50%
In ritardo
117
11%
Gratuito
Ordini simili
I would like to find someone who has already created a trading robot before. Im also looking for someone who can creat a bot that goes with time and structure
I am urgently in need of an expert full time programmer who can code an ea from scratch, Programming a well automated expert advisor from the existing strategy and make it work exactly more details will be provided in chat room thanks
Hello, I have implemented the method how to read the Toolbox Journal in MQL4, but this method does not work in MT5, because in MT5 the listview has LVS_OWNERDATA style. If you know or have a solution for MT5, without reading it from the log file, then please apply to this job. Regards, TradingProFX
I would need a robot that will automatically enter buy and sell positions based on the renko chart. The trend is to be determined on the basis of Elliot Waves. Individual peaks and troughs are determined by the TMA centerband Indicator. The buy position is entered when a higher low appears via the buy signal of the TMA indicator A sell position is entered when a lower high appears via the sell signal of the TMA
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
Modify My EA 30+ USD
good day coder i want to add additional indicator to my ea The Coder should be able to code indicator to EA i will only send you source code if you can proof the indicator can be coded into ea all other features will be discussed inside but the major part is this peculiar indicator i am available for discussion My time zone is GMT+1 Source code will be release and tested on live market i trade from monday to sunday
Hello , By slippage control on Take profit and stoploss functions the ea won't implement different results of TP and Stoploss on volatile markets, target is to produce exact numbers of sl and tp on live executions .A coder who has done this type of job will be the choice . lot sizing will be added to EA
Use indicator provided to produce support and resistance levels, and enter trade if price reaches s/r level which user has specified in settings. TP and SL should also come from user settings. TP and SL options should be s/r levels. EA trade should only be opened if there is a trade already open from another EA, based on magic number. EA should check for magic number from other EA, and only enter trade if there is a
1. Idea uruchomienia jest następująca : wejście na rynek ma miejsce, gdy główna linia MACD przecina się z linią sygnałową zgodnie z aktualnym uruchamianiem trendu . 2. Trend jest ustalany na podstawie średniej kroczącej wykładniczej z określonym okresem (InpMATrendPeriod). Jeśli bieżąca wartość EMA jest większa od sieci, trend jest postrzegany jako rosnący (ema_current > ema_previous). Alternatywnie, jeśli

Informazioni sul progetto

Budget
40+ USD
Per lo sviluppatore
36 USD
Scadenze
a 1 giorno(i)