Need skilled MQL5 programmers for regular work.

MQL5 专家

指定

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

反馈

1
开发者 1
等级
(568)
项目
659
32%
仲裁
43
44% / 44%
逾期
11
2%
已载入
2
开发者 2
等级
(256)
项目
319
29%
仲裁
34
26% / 65%
逾期
10
3%
空闲
3
开发者 3
等级
(7)
项目
7
0%
仲裁
2
50% / 0%
逾期
1
14%
工作中
4
开发者 4
等级
(106)
项目
173
25%
仲裁
23
9% / 78%
逾期
16
9%
工作中
5
开发者 5
等级
(8)
项目
9
11%
仲裁
0
逾期
0
空闲
6
开发者 6
等级
(148)
项目
157
42%
仲裁
3
33% / 33%
逾期
1
1%
繁忙
7
开发者 7
等级
项目
0
0%
仲裁
0
逾期
0
空闲
8
开发者 8
等级
(2)
项目
2
0%
仲裁
0
逾期
0
空闲
9
开发者 9
等级
(25)
项目
33
24%
仲裁
3
33% / 33%
逾期
4
12%
工作中
10
开发者 10
等级
(162)
项目
288
35%
仲裁
18
22% / 61%
逾期
42
15%
工作中
11
开发者 11
等级
(61)
项目
88
28%
仲裁
24
13% / 58%
逾期
7
8%
已载入
12
开发者 12
等级
(17)
项目
19
26%
仲裁
0
逾期
3
16%
空闲
13
开发者 13
等级
(16)
项目
20
0%
仲裁
10
0% / 80%
逾期
6
30%
空闲
14
开发者 14
等级
(313)
项目
559
35%
仲裁
80
31% / 44%
逾期
203
36%
空闲
15
开发者 15
等级
(104)
项目
125
24%
仲裁
23
26% / 52%
逾期
8
6%
工作中
16
开发者 16
等级
(6)
项目
5
0%
仲裁
3
33% / 67%
逾期
2
40%
空闲
17
开发者 17
等级
(119)
项目
169
38%
仲裁
9
78% / 22%
逾期
15
9%
空闲
18
开发者 18
等级
(278)
项目
373
72%
仲裁
19
32% / 47%
逾期
14
4%
空闲
发布者: 14 代码
19
开发者 19
等级
(13)
项目
20
40%
仲裁
1
0% / 100%
逾期
1
5%
空闲
20
开发者 20
等级
项目
0
0%
仲裁
0
逾期
0
空闲
21
开发者 21
等级
项目
0
0%
仲裁
0
逾期
0
空闲
22
开发者 22
等级
(381)
项目
490
23%
仲裁
60
53% / 25%
逾期
56
11%
已载入
23
开发者 23
等级
(27)
项目
31
55%
仲裁
3
33% / 33%
逾期
0
工作中
24
开发者 24
等级
(362)
项目
435
54%
仲裁
20
55% / 15%
逾期
30
7%
工作中
25
开发者 25
等级
项目
0
0%
仲裁
0
逾期
0
空闲
26
开发者 26
等级
(21)
项目
26
27%
仲裁
0
逾期
2
8%
空闲
27
开发者 27
等级
(2660)
项目
3380
68%
仲裁
77
48% / 14%
逾期
342
10%
空闲
发布者: 1 代码
28
开发者 28
等级
项目
1
100%
仲裁
0
逾期
0
空闲
29
开发者 29
等级
(225)
项目
285
41%
仲裁
15
13% / 47%
逾期
67
24%
空闲
30
开发者 30
等级
(8)
项目
9
0%
仲裁
2
0% / 50%
逾期
1
11%
工作中
相似订单
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
I have a indicator working good but have some bug for arrow placement . budget is fixed 30 used . only experience developer apply. i want to arrow get put on just above the candle high and candle low
I need a professional MT5 Expert Advisor (EA) built with clean, modular code. This is an advanced strategy combining liquidity concepts, controlled DCA, hedge protection, and strict risk management. Core Requirements: Entry Logic (ALL must align): Liquidity sweep (Previous Day High/Low breakout and return) EMA50 and EMA200 trend alignment Higher timeframe bias (H1 or H4) RSI confirmation Bollinger Band entry Filters
I need a professional MQL5 developer. BEFORE I SHARE ANY DETAILS: 1. You must sign a PERPETUAL NDA with no expiration date 2. NDA includes €100,000 penalty for any breach 3. I require full .mq5 source code ownership 4. Developer must have 500+ completed jobs, 4.9+ rating Budget: €1500 EUR Duration: 14 days Start your application with "RULER" to prove you read this
i have a simple strategy can you please create the automated forex ea to execute my trading strategy? i need custom ea for tradingview and mt4/mt5 correction: i need a tradingview indicator created that tells me when to buy or sell. and ea in mt4/mt5

项目信息

预算
30 - 200 USD
VAT (20%): 6 - 40 USD
总计: 36 - 240 USD
开发人员
27 - 180 USD
截止日期
 1  31 天

客户

所下订单1
仲裁计数0