EA_Gold_MNAKOO

MQL4 Uzman Danışmanlar

İş Gereklilikleri

//+------------------------------------------------------------------+
//| XAUUSD Automated Forex Robot                                     |
//| Enhanced Version with Error Handling and Improvements           |
//+------------------------------------------------------------------+
input int FastMA = 10;                 // Fast moving average period
input int SlowMA = 50;                 // Slow moving average period
input int RSI_Period = 14;             // RSI period
input double Overbought = 70;          // RSI overbought level
input double Oversold = 30;            // RSI oversold level
input double RiskPercent = 1.0;        // Risk per trade as a percentage of account equity
input double ATRMultiplier = 2.0;      // ATR multiplier for stop-loss
input double TrailingStop = 300;       // Trailing stop in points
input double MinLotSize = 0.01;        // Minimum lot size
input double LotStep = 0.01;           // Lot size increment
input int ATR_Period = 14;             // ATR period
input int MaxSlippage = 3;             // Maximum slippage in points
input int MAGIC_NUMBER = 123456;       // Unique identifier for trades
input string TradeComment = "XAUUSD Bot"; // Trade comment

//+------------------------------------------------------------------+
//| OnTick Function - Main Logic                                     |
//+------------------------------------------------------------------+
void OnTick() {
    // Calculate indicators
    static double fastMA, slowMA, rsi, atr;
    fastMA = iMA(NULL, 0, FastMA, 0, MODE_EMA, PRICE_CLOSE, 0);
    slowMA = iMA(NULL, 0, SlowMA, 0, MODE_EMA, PRICE_CLOSE, 0);
    rsi = iRSI(NULL, 0, RSI_Period, PRICE_CLOSE, 0);
    atr = iATR(NULL, 0, ATR_Period, 0);

    // Check for existing trades
    bool buyOpen = IsTradeOpen(OP_BUY);
    bool sellOpen = IsTradeOpen(OP_SELL);

    // Entry logic
    if (fastMA > slowMA && rsi > Oversold && rsi < 50 && !buyOpen) {
        // Buy Signal
        double sl = Bid - ATRMultiplier * atr;
        double tp = Bid + ATRMultiplier * atr * 2;
        double lotSize = CalculateLotSize(sl);
        OpenTrade(OP_BUY, lotSize, sl, tp);
    }

    if (fastMA < slowMA && rsi < Overbought && rsi > 50 && !sellOpen) {
        // Sell Signal
        double sl = Ask + ATRMultiplier * atr;
        double tp = Ask - ATRMultiplier * atr * 2;
        double lotSize = CalculateLotSize(sl);
        OpenTrade(OP_SELL, lotSize, sl, tp);
    }

    // Exit logic (Close trades when conditions reverse)
    if (buyOpen && (fastMA < slowMA || rsi >= Overbought)) {
        CloseTrade(OP_BUY);
    }

    if (sellOpen && (fastMA > slowMA || rsi <= Oversold)) {
        CloseTrade(OP_SELL);
    }

    // Manage Trailing Stop
    ManageTrailingStop();
}

//+------------------------------------------------------------------+
//| Calculate Lot Size Based on Risk                                 |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPrice) {
    double accountEquity = AccountEquity();
    double riskAmount = (RiskPercent / 100) * accountEquity;
    double stopLossDistance = MathAbs(Bid - stopLossPrice);
    double lotSize = riskAmount / (stopLossDistance * MarketInfo(Symbol(), MODE_TICKVALUE));

    // Adjust lot size to broker limits
    lotSize = MathMax(lotSize, MinLotSize);
    lotSize = NormalizeDouble(MathFloor(lotSize / LotStep) * LotStep, 2);
    return lotSize;
}

//+------------------------------------------------------------------+
//| Open Trade Function                                              |
//+------------------------------------------------------------------+
void OpenTrade(int tradeType, double lotSize, double stopLoss, double takeProfit) {
    double price = tradeType == OP_BUY ? Ask : Bid;
    int ticket = OrderSend(Symbol(), tradeType, lotSize, price, MaxSlippage, stopLoss, takeProfit, TradeComment, MAGIC_NUMBER, 0, Blue);
    if (ticket < 0) {
        int errorCode = GetLastError();
        Print("Error opening trade: ", errorCode, ". Retrying...");
        Sleep(1000); // Retry after 1 second
        ticket = OrderSend(Symbol(), tradeType, lotSize, price, MaxSlippage, stopLoss, takeProfit, TradeComment, MAGIC_NUMBER, 0, Blue);
        if (ticket < 0) {
            Print("Failed to open trade after retry. Error: ", GetLastError());
        }
    } else {
        Print("Trade opened: ", ticket);
    }
}

//+------------------------------------------------------------------+
//| Close Trade Function                                             |
//+------------------------------------------------------------------+
void CloseTrade(int tradeType) {
    for (int i = OrdersTotal() - 1; i >= 0; i--) {
        if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() == Symbol() && OrderType() == tradeType && OrderMagicNumber() == MAGIC_NUMBER) {
                int ticket = OrderClose(OrderTicket(), OrderLots(), tradeType == OP_BUY ? Bid : Ask, MaxSlippage, Red);
                if (ticket < 0) {
                    Print("Error closing trade: ", GetLastError());
                } else {
                    Print("Trade closed: ", ticket);
                }
            }
        }
    }
}

//+------------------------------------------------------------------+
//| Manage Trailing Stop Function                                    |
//+------------------------------------------------------------------+
void ManageTrailingStop() {
    for (int i = OrdersTotal() - 1; i >= 0; i--) {
        if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == MAGIC_NUMBER) {
                double newStopLoss;
                if (OrderType() == OP_BUY) {
                    newStopLoss = Bid - TrailingStop * Point;
                    if (newStopLoss > OrderStopLoss()) {
                        OrderModify(OrderTicket(), OrderOpenPrice(), newStopLoss, OrderTakeProfit(), 0, Blue);
                    }
                } else if (OrderType() == OP_SELL) {
                    newStopLoss = Ask + TrailingStop * Point;
                    if (newStopLoss < OrderStopLoss()) {
                        OrderModify(OrderTicket(), OrderOpenPrice(), newStopLoss, OrderTakeProfit(), 0, Blue);
                    }
                }
            }
        }
    }
}

//+------------------------------------------------------------------+
//| Check if Trade Exists                                            |
//+------------------------------------------------------------------+
bool IsTradeOpen(int tradeType) {
    for (int i = OrdersTotal() - 1; i >= 0; i--) {
        if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() == Symbol() && OrderType() == tradeType && OrderMagicNumber() == MAGIC_NUMBER) {
                return true;
            }
        }
    }
    return false;
}

Dosyalar:

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(151)
Projeler
188
57%
Arabuluculuk
10
80% / 0%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
2
Geliştirici 2
Derecelendirme
(240)
Projeler
301
28%
Arabuluculuk
33
24% / 61%
Süresi dolmuş
9
3%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(33)
Projeler
38
21%
Arabuluculuk
5
0% / 60%
Süresi dolmuş
0
Serbest
4
Geliştirici 4
Derecelendirme
(321)
Projeler
499
19%
Arabuluculuk
33
42% / 30%
Süresi dolmuş
32
6%
Yüklendi
5
Geliştirici 5
Derecelendirme
(9)
Projeler
20
10%
Arabuluculuk
4
50% / 50%
Süresi dolmuş
5
25%
Serbest
6
Geliştirici 6
Derecelendirme
(428)
Projeler
622
54%
Arabuluculuk
29
55% / 24%
Süresi dolmuş
6
1%
Yüklendi
7
Geliştirici 7
Derecelendirme
(5)
Projeler
8
13%
Arabuluculuk
3
0% / 33%
Süresi dolmuş
2
25%
Serbest
Yayınlandı: 1 kod
8
Geliştirici 8
Derecelendirme
(12)
Projeler
13
23%
Arabuluculuk
7
0% / 71%
Süresi dolmuş
3
23%
Çalışıyor
9
Geliştirici 9
Derecelendirme
(102)
Projeler
105
60%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
10
Geliştirici 10
Derecelendirme
(3)
Projeler
6
17%
Arabuluculuk
0
Süresi dolmuş
3
50%
Serbest
11
Geliştirici 11
Derecelendirme
(4)
Projeler
2
0%
Arabuluculuk
5
0% / 80%
Süresi dolmuş
1
50%
Serbest
12
Geliştirici 12
Derecelendirme
(121)
Projeler
134
66%
Arabuluculuk
36
25% / 56%
Süresi dolmuş
22
16%
Serbest
Yayınlandı: 10 kod
13
Geliştirici 13
Derecelendirme
(462)
Projeler
483
75%
Arabuluculuk
5
80% / 0%
Süresi dolmuş
0
Çalışıyor
14
Geliştirici 14
Derecelendirme
(102)
Projeler
157
21%
Arabuluculuk
23
9% / 78%
Süresi dolmuş
16
10%
Çalışıyor
15
Geliştirici 15
Derecelendirme
(539)
Projeler
619
33%
Arabuluculuk
36
36% / 53%
Süresi dolmuş
11
2%
Meşgul
16
Geliştirici 16
Derecelendirme
(2)
Projeler
1
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
17
Geliştirici 17
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
18
Geliştirici 18
Derecelendirme
(59)
Projeler
81
43%
Arabuluculuk
27
11% / 70%
Süresi dolmuş
8
10%
Serbest
19
Geliştirici 19
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
Benzer siparişler
Hello, I’m looking for an experienced MT4 (MQL4) developer to convert the Lucky Reversal indicator from indicatorspot.com into a fully functional Expert Advisor (EA). Project Scope Code an MT4 EA that replicates the exact logic and signals of the Lucky Reversal indicator Trades should open and close automatically based on the indicator’s rules Must match indicator behavior 1:1 (no approximations) EA Requirements MT4
Looking for a developer to develop or provide past expert advisor that can cope with high impact news and high trends. needs to be mt5. Any strategy necessary. need to be able to backtest myself or see past results. Minimum profit per month 30% but needs to be very low drawdown. Can be one shot trade a day or a 1 min scalper ea. I will not be going to telegram to discuss further
🔹 COMPLETE DEVELOPMENT ASSIGNMENT Institutional Volume & Structure Indicator Platform: MT5 (preferred) OR TradingView (Pine Script v5) Type: Indicator only (NO EA, NO auto trading) Purpose: Institutional analysis for manual trading & manual backtesting 1. GENERAL REQUIREMENTS Indicator only (no orders, no strategy execution) No repainting Auto update + auto remove logic Clean, modular, performance-safe code User
specification High-Frequency Candle Momentum Scalper 1. Strategy Overview Core Logic: The EA identifies the current color of the active candle (Bullish or Bearish). Entry Trigger: It opens positions only after a specific duration of the candle has passed (e.g., after 30 seconds on a 1-minute candle) to confirm the direction. 2. Entry Logic (The "Half-Candle" Rule) Timeframe: M1 (Default, but adjustable). Time Filter
Looking for experience MT5 developer to build a rule-based EA using Volume Profile concept. Only developer with proven past experience working with Volume Profile indicator (ie, VAH, VAL, POC, session profiles or anchored profiles) will be considered. Interested developer must submit a screenshot or video clip of a past project involving Volume Profile, before being shortlisted. Specification will only be shared and
I need an Expert Advisor (EA) coded for MetaTrader 5 based on the following specifications: Objective: Autonomous trading on Bollinger Band breakouts, robust across trending and consolidating years. Architecture: Max 1 open trade at a time Ignore opposite signals if a trade is open Spread filter: always execute Indicators (Custom): Bollinger Bands (WMA, length 20, deviation 1.5, source: close) ATR (WMA, length 14)
I need a professional MQL5 developer to build a REAL-account XAUUSD (Gold) scalping Expert Advisor. Requirements: - MT5 only - Scalping on M1 timeframe - Works on REAL accounts (not demo-only) - Max spread & slippage filter - News filter - Auto lot (risk % adjustable) - One trade at a time Delivery: - Final EX5 file - Testing before full payment Please apply only if you have real experience with XAUUSD scalping
My expert already has the rest of the required features implemented . Bring in your support and resistance expert to save time . My expert already has money management , session filter etc . Trailing is threshold based . Please send a picture as well to show your expert on a live chart . Most specific is the 5m tf , to 1m execution
EA Update 100 - 150 USD
I need my current EA to be updated so that it doesn’t enter trades under certain conditions. And I need the current entry logic as market order to be changed to limit order. Further details can be discussed privately on google meet
Platform: - MetaTrader 4 (MT4) Type: - Expert Advisor (EA) Strategy rules: - Buy when fast EMA crosses above slow EMA - Sell when fast EMA crosses below slow EMA - EMA periods must be input parameters Trade settings: - Lot size: fixed (input parameter) - Stop Loss: fixed pips (input parameter) - Take Profit: fixed pips (input parameter) - One trade at a time only Risk & filters: - No trading during high spread -

Proje bilgisi

Bütçe
100+ USD