Need skilled MQL5 programmers for regular work.

MQL5 Asesores Expertos

Tarea técnica

//+------------------------------------------------------------------+
//| ProTradingEA MT5                                                 |
//| Fully MT5-compliant with MACD, Trailing Stop, Break-Even         |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>
CTrade trade;

// Optional override
input string SymbolOverride = ""; // leave blank to auto-detect

struct EASettings
{
    int FastMAPeriod;
    int SlowMAPeriod;
    int RSIPeriod;
    double RSIOverbought;
    double RSIOversold;
    int MACDFast;
    int MACDSlow;
    int MACDSignal;
    double RiskPercent;
    double ATRMultiplierSL;
    double ATRMultiplierTP;
    int ATRPeriod;
    int TrailingStopPoints;
    bool TradeLondonNY;
    double PartialClosePercent;
    string NewsStartTimes;
    string NewsEndTimes;
};

EASettings settings;

double fastMA, slowMA;
double prevFastMA, prevSlowMA;

// MACD handles
int macdHandle;
double macdBuffer[], signalBuffer[], histBuffer[];

//+------------------------------------------------------------------+
//| Set defaults per symbol                                          |
//+------------------------------------------------------------------+
void SetDefaults()
{
    string sym = SymbolOverride != "" ? SymbolOverride : Symbol();

    if(sym == "EURUSD") settings = {10,50,14,70,30,12,26,9,1.0,1.0,2.0,14,200,true,50,"13:30,15:00","14:30,15:30"};
    else if(sym == "GBPUSD") settings = {12,55,14,70,30,12,26,9,1.0,1.2,2.2,14,250,true,50,"13:30,15:00","14:30,15:30"};
    else if(sym == "USDJPY") settings = {10,50,14,70,30,12,26,9,1.0,1.0,2.0,14,150,true,50,"13:30,15:00","14:30,15:30"};
    else settings = {10,50,14,70,30,12,26,9,1.0,1.0,2.0,14,200,true,50,"13:30,15:00","14:30,15:30"};
}

//+------------------------------------------------------------------+
//| Initialize EA                                                    |
//+------------------------------------------------------------------+
int OnInit()
{
    SetDefaults();

    // Create MACD handle
    macdHandle = iMACD(Symbol(), PERIOD_CURRENT, settings.MACDFast, settings.MACDSlow, settings.MACDSignal, PRICE_CLOSE);
    if(macdHandle == INVALID_HANDLE)
    {
        Print("Error creating MACD handle");
        return INIT_FAILED;
    }

    return INIT_SUCCEEDED;
}

//+------------------------------------------------------------------+
//| Calculate lot size based on risk                                  |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPoints)
{
    double balance = AccountInfoDouble(ACCOUNT_BALANCE);
    double riskAmount = balance * settings.RiskPercent / 100.0;

    double tickValue = SymbolInfoDouble(Symbol(), SYMBOL_TRADE_TICK_VALUE);
    double tickSize  = SymbolInfoDouble(Symbol(), SYMBOL_TRADE_TICK_SIZE);

    double lot = riskAmount / (stopLossPoints * tickValue / tickSize);

    double minLot = SymbolInfoDouble(Symbol(), SYMBOL_VOLUME_MIN);
    double maxLot = SymbolInfoDouble(Symbol(), SYMBOL_VOLUME_MAX);
    double step   = SymbolInfoDouble(Symbol(), SYMBOL_VOLUME_STEP);

    lot = MathMax(minLot, MathMin(maxLot, lot));
    lot = MathFloor(lot/step)*step;
    return NormalizeDouble(lot, 2);
}

//+------------------------------------------------------------------+
//| Check if trading is allowed (session + news filter)             |
//+------------------------------------------------------------------+
bool IsTradingAllowed()
{
    // Session filter
    if(settings.TradeLondonNY)
    {
        int hour = TimeHour(TimeCurrent());
        if(hour < 8 || hour > 17) return false;
    }

    // News filter
    string starts[], ends[];
    int startCount = StringSplit(settings.NewsStartTimes, ',', starts);
    int endCount   = StringSplit(settings.NewsEndTimes, ',', ends);

    if(startCount != endCount) return true; // skip if mismatched

    for(int i=0;i<startCount;i++)
    {
        int sh = StringToInteger(StringSubstr(starts[i],0,2));
        int sm = StringToInteger(StringSubstr(starts[i],3,2));
        int eh = StringToInteger(StringSubstr(ends[i],0,2));
        int em = StringToInteger(StringSubstr(ends[i],3,2));

        int curHour = TimeHour(TimeCurrent());
        int curMin  = TimeMinute(TimeCurrent());

        if((curHour > sh || (curHour == sh && curMin >= sm)) &&
           (curHour < eh || (curHour == eh && curMin <= em)))
           return false;
    }

    return true;
}

//+------------------------------------------------------------------+
//| Manage positions: Trailing Stop, Break-Even, Partial Close       |
//+------------------------------------------------------------------+
void ManagePositions()
{
    if(!PositionSelect(Symbol())) return;

    double openPrice = PositionGetDouble(POSITION_PRICE_OPEN);
    double sl = PositionGetDouble(POSITION_SL);
    double tp = PositionGetDouble(POSITION_TP);
    double volume = PositionGetDouble(POSITION_VOLUME);
    long type = PositionGetInteger(POSITION_TYPE);
    double price = (type == POSITION_TYPE_BUY) ? SymbolInfoDouble(Symbol(), SYMBOL_BID) : SymbolInfoDouble(Symbol(), SYMBOL_ASK);

    // Trailing Stop
    if(type == POSITION_TYPE_BUY)
    {
        double newSL = price - settings.TrailingStopPoints * _Point;
        if(newSL > sl && newSL > openPrice)
            trade.PositionModify(Symbol(), newSL, tp);

        // Break-Even + Partial Close
        if(price - openPrice >= (tp - openPrice)/2 && sl < openPrice)
        {
            trade.PositionModify(Symbol(), openPrice, tp);
            double closeVol = volume * settings.PartialClosePercent / 100.0;
            trade.PositionClosePartial(Symbol(), closeVol);
        }
    }

    if(type == POSITION_TYPE_SELL)
    {
        double newSL = price + settings.TrailingStopPoints * _Point;
        if(sl == 0 || newSL < sl)
            trade.PositionModify(Symbol(), newSL, tp);

        // Break-Even + Partial Close
        if(openPrice - price >= (openPrice - tp)/2 && (sl == 0 || sl > openPrice))
        {
            trade.PositionModify(Symbol(), openPrice, tp);
            double closeVol = volume * settings.PartialClosePercent / 100.0;
            trade.PositionClosePartial(Symbol(), closeVol);
        }
    }
}

//+------------------------------------------------------------------+
//| OnTick                                                            |
//+------------------------------------------------------------------+
void OnTick()
{
    if(!IsTradingAllowed()) return;

    // MAs
    fastMA = iMA(NULL,0,settings.FastMAPeriod,0,MODE_SMA,PRICE_CLOSE,0);
    slowMA = iMA(NULL,0,settings.SlowMAPeriod,0,MODE_SMA,PRICE_CLOSE,0);
    prevFastMA = iMA(NULL,0,settings.FastMAPeriod,0,MODE_SMA,PRICE_CLOSE,1);
    prevSlowMA = iMA(NULL,0,settings.SlowMAPeriod,0,MODE_SMA,PRICE_CLOSE,1);

    // RSI
    double rsi = iRSI(NULL,0,settings.RSIPeriod,PRICE_CLOSE,0);

    // MACD
    if(CopyBuffer(macdHandle,0,0,1,macdBuffer) <= 0) return; // Main
    if(CopyBuffer(macdHandle,1,0,1,signalBuffer) <= 0) return; // Signal
    double macdHist = macdBuffer[0] - signalBuffer[0];

    // ATR for SL/TP
    double atr = iATR(NULL,0,settings.ATRPeriod,0);
    double slPoints = settings.ATRMultiplierSL * atr / _Point;
    double tpPoints = settings.ATRMultiplierTP * atr / _Point;

    double lot = CalculateLotSize(slPoints);
    bool hasPosition = PositionSelect(Symbol());

    // BUY signal
    if(prevFastMA < prevSlowMA && fastMA > slowMA && rsi < settings.RSIOverbought && macdHist > 0 && !hasPosition)
    {
        double price = SymbolInfoDouble(Symbol(), SYMBOL_ASK);
        double sl = price - slPoints*_Point;
        double tp = price + tpPoints*_Point;
        trade.Buy(lot,Symbol(),price,sl,tp);
    }

    // SELL signal
    if(prevFastMA > prevSlowMA && fastMA < slowMA && rsi > settings.RSIOversold && macdHist < 0 && !hasPosition)
    {
        double price = SymbolInfoDouble(Symbol(), SYMBOL_BID);
        double sl = price + slPoints*_Point;
        double tp = price - tpPoints*_Point;
        trade.Sell(lot,Symbol(),price,sl,tp);
    }

    // Manage open positions
    ManagePositions();
}

Han respondido

1
Desarrollador 1
Evaluación
(569)
Proyectos
660
32%
Arbitraje
43
44% / 44%
Caducado
11
2%
Trabajando
2
Desarrollador 2
Evaluación
(256)
Proyectos
319
29%
Arbitraje
34
26% / 65%
Caducado
10
3%
Libre
3
Desarrollador 3
Evaluación
(7)
Proyectos
7
0%
Arbitraje
2
50% / 0%
Caducado
1
14%
Trabaja
4
Desarrollador 4
Evaluación
(106)
Proyectos
173
25%
Arbitraje
23
9% / 78%
Caducado
16
9%
Trabaja
5
Desarrollador 5
Evaluación
(8)
Proyectos
9
11%
Arbitraje
0
Caducado
0
Libre
6
Desarrollador 6
Evaluación
(150)
Proyectos
159
43%
Arbitraje
3
33% / 33%
Caducado
1
1%
Trabajando
7
Desarrollador 7
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
8
Desarrollador 8
Evaluación
(2)
Proyectos
2
0%
Arbitraje
0
Caducado
0
Libre
9
Desarrollador 9
Evaluación
(25)
Proyectos
33
24%
Arbitraje
3
33% / 33%
Caducado
4
12%
Trabaja
10
Desarrollador 10
Evaluación
(162)
Proyectos
288
35%
Arbitraje
18
22% / 61%
Caducado
42
15%
Trabaja
11
Desarrollador 11
Evaluación
(61)
Proyectos
89
28%
Arbitraje
24
13% / 58%
Caducado
7
8%
Trabaja
12
Desarrollador 12
Evaluación
(17)
Proyectos
19
26%
Arbitraje
0
Caducado
3
16%
Libre
13
Desarrollador 13
Evaluación
(16)
Proyectos
20
0%
Arbitraje
10
0% / 80%
Caducado
6
30%
Libre
14
Desarrollador 14
Evaluación
(313)
Proyectos
559
35%
Arbitraje
80
31% / 44%
Caducado
203
36%
Libre
15
Desarrollador 15
Evaluación
(104)
Proyectos
125
24%
Arbitraje
23
26% / 52%
Caducado
8
6%
Trabaja
16
Desarrollador 16
Evaluación
(6)
Proyectos
5
0%
Arbitraje
3
33% / 67%
Caducado
2
40%
Libre
17
Desarrollador 17
Evaluación
(119)
Proyectos
169
38%
Arbitraje
9
78% / 22%
Caducado
15
9%
Libre
18
Desarrollador 18
Evaluación
(278)
Proyectos
373
72%
Arbitraje
19
32% / 47%
Caducado
14
4%
Libre
Ha publicado: 14 ejemplos
19
Desarrollador 19
Evaluación
(13)
Proyectos
20
40%
Arbitraje
1
0% / 100%
Caducado
1
5%
Libre
20
Desarrollador 20
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
21
Desarrollador 21
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
22
Desarrollador 22
Evaluación
(381)
Proyectos
490
23%
Arbitraje
60
53% / 25%
Caducado
56
11%
Trabajando
23
Desarrollador 23
Evaluación
(27)
Proyectos
31
55%
Arbitraje
3
33% / 33%
Caducado
0
Trabaja
24
Desarrollador 24
Evaluación
(362)
Proyectos
435
54%
Arbitraje
20
55% / 15%
Caducado
30
7%
Trabaja
25
Desarrollador 25
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
26
Desarrollador 26
Evaluación
(21)
Proyectos
26
27%
Arbitraje
0
Caducado
2
8%
Libre
27
Desarrollador 27
Evaluación
(2660)
Proyectos
3380
68%
Arbitraje
77
48% / 14%
Caducado
342
10%
Libre
Ha publicado: 1 ejemplo
28
Desarrollador 28
Evaluación
Proyectos
1
100%
Arbitraje
0
Caducado
0
Libre
29
Desarrollador 29
Evaluación
(225)
Proyectos
285
41%
Arbitraje
15
13% / 47%
Caducado
67
24%
Libre
30
Desarrollador 30
Evaluación
(8)
Proyectos
9
0%
Arbitraje
2
0% / 50%
Caducado
1
11%
Trabaja
31
Desarrollador 31
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
32
Desarrollador 32
Evaluación
(298)
Proyectos
477
40%
Arbitraje
105
40% / 24%
Caducado
81
17%
Trabajando
Ha publicado: 2 ejemplos
33
Desarrollador 33
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
34
Desarrollador 34
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
35
Desarrollador 35
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
I need a professional MQL5 developer to finalize a Gold (XAUUSD) trading bot. The core layering and support-filter logic is already drafted. Key Requirements: Refine a hybrid Martingale/Layering volume calculation (1-10 / 11-20 reset logic). Implement a robust "Safety Mode" based on Daily Low price breaks. Ensure precise 6:00 AM Server Time reset for logic variables. Add professional error handling (Slippage
I want a gold order management ea that should be like the below... Pending orders When I open one manual order, ea should be able to set 3 pending orders at x amount of pips below (if buy order) or above (if sell order) manual order entry. So like this Pending order 1 true or false Pending order pips away: 20. Pending order lot size:0.3 Pending order 2 true or false Pending order pips away: 40 Pending order lot
EA SPECIFICATION SHEET OBJECTIVE: Build a transparent, non-martingale, non-grid breakout EA for XAUUSD that trades only high‑quality breakouts during London + New York sessions. 1. TRADING INSTRUMENT - XAUUSD only - MT4 platform - 5‑digit ECN broker 2. CORE STRATEGY LOGIC (BREAKOUT + CONFIRMATION) A trade is allowed ONLY when ALL conditions are true: - Candle closes beyond previous high/low (no wick breakouts) -
I am looking to develop a custom Expert Advisor (EA) for MetaTrader (MT4/MT5) based on a defined technical analysis strategy and flexible risk management rules. The EA should operate on a chart and timeframe that I manually specify, with the ability to adapt its behavior dynamically when the timeframe is changed. Core Strategy Logic The EA will execute trades based on predefined technical analysis zones
MT5 Manager API 30+ USD
make an api for mt5 and a trade copier eith the api thst uses local computer no cloud trader api ea mt5 that saves all trade data nd logs time and entry and exit tp sl logs delted pending order api that uses market execution not pending orfer
Hello, we have an existing EA, and are building a new one. We want our EA to connect via API to an AI provider like Chat GPT, Claude, or perplexity. Can you connect a meta trader EA to an AI agent? if you can then i would like to speak. The system is quite simple, for example the EA would ask perplexity where the support is on EURUSD then place a trade, thank you, Rob
Hi, Im looking to purchase or build an EA that can open many trades or big lot size to churn out IB commission, it doesnt have to be super profitable but will need to have the number of trades on going in order to earn IB commission. Source code is required upon purchase. If you have any EA or strategy that are gearing towards this, let me know and i would be glad to purchase it. Please share the demo trial for me to
I currently have unfinished work. It’s a project to connect MetaTrader with the BingX platform. At the moment, I have implemented a service that retrieves a custom symbol in BingX, and it works well. However, some specifications still need to be adjusted regarding how the data is received. Otherwise, prices and other values are accurate. The only issue is that for the strategy tester, it is always necessary to
Modify an existing EA 30 - 50 USD
This is to modify my Semi Auto EA -Looking for developer modify my existing EA to Pending Order EA (BS/BL/SL/SS). Relevent with Heiken Ashi Smooth ,Moving Average , Acceleration. Concept MAster and Slave. Ready to give previous soucre code as guide. Work to do - 1)To modify this EA to Pending Order. 2) to add new feature - Risk Management/moneymanagement 3) To modify 4 slave to 7 slave will give the previous to
BTC 5 Minutes scalping 50 - 100 USD
import { useState, useEffect, useRef } from "react"; const INIT_LOT = 0.01; const TP_MOVE = 200; const SL_MOVE = 120; const START_BALANCE = 1000; const MAX_LOT = 5.12; const TICK_MS = 1200; function ema(arr, n) { if (arr.length < n) return null; const k = 2 / (n + 1); let e = arr.slice(0, n).reduce((s, v) => s + v, 0) / n; for (let i = n; i < arr.length; i++) e = arr[i] * k + e * (1 - k); return e; } function

Información sobre el proyecto

Presupuesto
30 - 200 USD
IVA (20%): 6 - 40 USD
Total: 36 - 240 USD
Para el ejecutor
27 - 180 USD
Plazo límite de ejecución
de 1 a 31 día(s)

Cliente

Encargos realizados1
Número de arbitrajes0