EA_Gold_MNAKOO

MQL4 Experts

Specification

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

Files:

Responded

1
Developer 1
Rating
(106)
Projects
133
43%
Arbitration
10
80% / 0%
Overdue
0
Free
2
Developer 2
Rating
(180)
Projects
213
27%
Arbitration
11
27% / 45%
Overdue
5
2%
Working
3
Developer 3
Rating
(20)
Projects
24
8%
Arbitration
1
0% / 100%
Overdue
0
Free
4
Developer 4
Rating
(261)
Projects
405
18%
Arbitration
25
48% / 28%
Overdue
23
6%
Busy
5
Developer 5
Rating
(9)
Projects
20
10%
Arbitration
3
67% / 33%
Overdue
5
25%
Free
6
Developer 6
Rating
(371)
Projects
522
53%
Arbitration
25
56% / 24%
Overdue
6
1%
Working
7
Developer 7
Rating
(3)
Projects
5
20%
Arbitration
1
0% / 0%
Overdue
1
20%
Free
8
Developer 8
Rating
(9)
Projects
8
0%
Arbitration
5
0% / 80%
Overdue
1
13%
Working
9
Developer 9
Rating
(65)
Projects
66
64%
Arbitration
0
Overdue
0
Working
10
Developer 10
Rating
Projects
1
0%
Arbitration
0
Overdue
1
100%
Working
11
Developer 11
Rating
(4)
Projects
2
0%
Arbitration
1
0% / 0%
Overdue
1
50%
Free
12
Developer 12
Rating
(121)
Projects
134
66%
Arbitration
36
25% / 56%
Overdue
22
16%
Free
13
Developer 13
Rating
(377)
Projects
399
71%
Arbitration
4
100% / 0%
Overdue
0
Loaded
14
Developer 14
Rating
(72)
Projects
104
15%
Arbitration
4
25% / 25%
Overdue
8
8%
Loaded
15
Developer 15
Rating
(514)
Projects
586
33%
Arbitration
32
41% / 41%
Overdue
9
2%
Busy
16
Developer 16
Rating
(1)
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
17
Developer 17
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
18
Developer 18
Rating
(59)
Projects
78
44%
Arbitration
22
14% / 64%
Overdue
8
10%
Free
Similar orders
ONE ORDER EXPERT ADVISOR MT5 (for STOCKS) - Magic number: - Max spread (points): - Max slippage (points): The EA open an order every day at an specific time: - Open Hour: - Open Min: The EA close the order every day at an specific time: - Close Hour: - Close Min: .............................................................................................................................. The orders will have a
I am interested in purchasing profitable, ready-made Expert Advisors (EAs) for resale purposes. Below are the details of what I am looking for: Profitability: Proven track record of consistent performance with verified results over a minimum of 6 month . Compatibility: Works with MetaTrader 4/5 Ease of Use: User-friendly with minimal configuration required. Documentation: Includes a detailed user guide/manual
The EA is for renting, $1000 dollars for rent, 12 months access on multiple accounts license permission, granted 4 weeks trial before purchase, excludes source code, works on any brokers,works on $12 or more account capital, also for prop firm trading, access to guidance any time. On gold and on mt4
Multi-Time Frame 50 EMA Cross Alert // Alert Condition for All Three Time Frames Aligning alertcondition(ma_15m_cross and ma_1h_cross and ma_4h_cross, title="50 EMA Cross All Time Frames", message="50 EMA crossed price on 15m, 1h, and 4h at the same time!")
Need to Integrate ATR Volatility with Signals Generated . Have a look at the picture attached , One of the condition is based on Moving Average Cross . NO Trading time (Filter) to be added : This will stop the expert to take any trades during the specified timings
Trade Opening Conditions: The EA will detect buy (green arrow) and sell (red arrow) signals from a specified custom indicator. Lot Size and Take Profit Configuration: Example of configurable lot sizes and associated take profits (TP): Entry 1: Lot size 0.20 – TP1 Entry 2: Lot size 0.30 – TP2 Entry 3: Lot size 0.20 – TP3 Entry 4: Lot size 0.10 – TP4 Entry 5: Lot size 0.50 – TP5 All trades should have their stop losses
serious inquires only must have at least 5 years of programming experience with C++ must be able to speak English well **meeting is required - to increase transparency ** simple breakout strategy
Price is not negotiable, 250USD is the max. I am looking for a developer with knowledge about SQL Databases, MQL5/MQL4, PHP and/or any website design. You will modify an already existing MT5 Expert advisor that will send data every X Seconds to the SQL database, and it will show on the website. The idea is one main admin dashboard where I can monitor all trading accounts with all the data included on the list below
I need a HIGH FREQUENCY TRADING (HFT) EA, that can be used to trade on live accounts of IC Market broker. The EA has to be highly profitable, giving a daily profit. Also, I want to set up a limit on the EA to avoid getting hyperactive ( According to MetaQuotes guidelines, an account is considered hyperactive when it exceeds 2,000 server messages per day.) I need something like this in this video;
MT5 EA 100 - 700 USD
We are in search for an MT5 EA that can work on small deposit accounts of capital minimum $200 (negotiable). The EA should be designed for our rebate/IB system of the brokers. We require the system to have enough operations completed by each day where the lots all add up to 0.50-1.00 lots each day. Its important the system is profitable as well and can scoop around 10-15% minimum gains each month. If you have

Project information

Budget
100+ USD

Customer

Placed orders1
Arbitrage count0