Need skilled MQL5 programmers for regular work.

MQL5 Experts

Specification

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

Responded

1
Developer 1
Rating
(569)
Projects
660
32%
Arbitration
43
44% / 44%
Overdue
11
2%
Loaded
2
Developer 2
Rating
(256)
Projects
319
29%
Arbitration
34
26% / 65%
Overdue
10
3%
Free
3
Developer 3
Rating
(7)
Projects
7
0%
Arbitration
2
50% / 0%
Overdue
1
14%
Working
4
Developer 4
Rating
(106)
Projects
173
25%
Arbitration
23
9% / 78%
Overdue
16
9%
Working
5
Developer 5
Rating
(8)
Projects
9
11%
Arbitration
0
Overdue
0
Free
6
Developer 6
Rating
(149)
Projects
158
42%
Arbitration
3
33% / 33%
Overdue
1
1%
Loaded
7
Developer 7
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
8
Developer 8
Rating
(2)
Projects
2
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(25)
Projects
33
24%
Arbitration
3
33% / 33%
Overdue
4
12%
Working
10
Developer 10
Rating
(162)
Projects
288
35%
Arbitration
18
22% / 61%
Overdue
42
15%
Working
11
Developer 11
Rating
(61)
Projects
88
28%
Arbitration
24
13% / 58%
Overdue
7
8%
Loaded
12
Developer 12
Rating
(17)
Projects
19
26%
Arbitration
0
Overdue
3
16%
Free
13
Developer 13
Rating
(16)
Projects
20
0%
Arbitration
10
0% / 80%
Overdue
6
30%
Free
14
Developer 14
Rating
(313)
Projects
559
35%
Arbitration
80
31% / 44%
Overdue
203
36%
Free
15
Developer 15
Rating
(104)
Projects
125
24%
Arbitration
23
26% / 52%
Overdue
8
6%
Working
16
Developer 16
Rating
(6)
Projects
5
0%
Arbitration
3
33% / 67%
Overdue
2
40%
Free
17
Developer 17
Rating
(119)
Projects
169
38%
Arbitration
9
78% / 22%
Overdue
15
9%
Free
18
Developer 18
Rating
(278)
Projects
373
72%
Arbitration
19
32% / 47%
Overdue
14
4%
Free
Published: 14 codes
19
Developer 19
Rating
(13)
Projects
20
40%
Arbitration
1
0% / 100%
Overdue
1
5%
Free
20
Developer 20
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
21
Developer 21
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
22
Developer 22
Rating
(381)
Projects
490
23%
Arbitration
60
53% / 25%
Overdue
56
11%
Loaded
23
Developer 23
Rating
(27)
Projects
31
55%
Arbitration
3
33% / 33%
Overdue
0
Working
24
Developer 24
Rating
(362)
Projects
435
54%
Arbitration
20
55% / 15%
Overdue
30
7%
Working
25
Developer 25
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
26
Developer 26
Rating
(21)
Projects
26
27%
Arbitration
0
Overdue
2
8%
Free
27
Developer 27
Rating
(2660)
Projects
3380
68%
Arbitration
77
48% / 14%
Overdue
342
10%
Free
Published: 1 code
28
Developer 28
Rating
Projects
1
100%
Arbitration
0
Overdue
0
Free
29
Developer 29
Rating
(225)
Projects
285
41%
Arbitration
15
13% / 47%
Overdue
67
24%
Free
30
Developer 30
Rating
(8)
Projects
9
0%
Arbitration
2
0% / 50%
Overdue
1
11%
Working
31
Developer 31
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
32
Developer 32
Rating
(298)
Projects
477
40%
Arbitration
105
40% / 24%
Overdue
81
17%
Loaded
Published: 2 codes
Similar orders
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
🚀 ADAPTIVE GRID HEDGE EA (FULL VERSION) 🧠 📌 GENERAL CONCEPT This Expert Advisor (EA) uses a strategy combining: Grid trading (order grid) Hedge (protection with opposite positions) Lot scaling (progressive) Loss compensation with profits Continuous operation (non-stop) Focus on: Small recurring profits High trade volume (rebate/IB) The system does not depend on direction, but rather on market oscillation . Main

Project information

Budget
30 - 200 USD
VAT (20%): 6 - 40 USD
Total: 36 - 240 USD
For the developer
27 - 180 USD
Deadline
from 1 to 31 day(s)

Customer

Placed orders1
Arbitrage count0