I HAVE THE CODE ALREADY, BUT IT DOES NOT WORK, CAN YOU MAKE A FEW CHANGES FOR THE EXECUTION FOR THIS EA PLEASE.

Specification

// Input Parameters
input int TradeExecutionHour = 10; // Trade execution hour (server time)
input bool ManualLotSize = true; // Enable manual lot size adjustment
input bool RiskAllocation = true; // Enable percentage-based risk allocation
input double RiskPercentage = 2.0; // Percentage of risk per trade
input int CandleRangeCondition = 100; // Minimum candle range condition in points
input string Symbols = {"GER30.fin", "EURUSD", "GBPUSD"}; // Symbols to trade

// Global Variables
int ticketBuy, ticketSell;
double entryPointBuy, entryPointSell, stopLossBuy, stopLossSell, takeProfitBuy, takeProfitSell;
bool breakevenBuy = false, breakevenSell = false;

void OnTick()
{
    // Check trade execution time
    if (TimeHour(TimeCurrent()) == TradeExecutionHour)
    {
        // Check candle range condition
        if (CheckCandleRangeCondition())
        {
            // Calculate entry points
            CalculateEntryPoints();

            // Calculate lot size
            double lotSize = CalculateLotSize();

            // Place buy stop order
            ticketBuy = OrderSend(Symbol(), OP_BUYSTOP, lotSize, entryPointBuy, 2 * Point, stopLossBuy, takeProfitBuy);

            // Place sell stop order
            ticketSell = OrderSend(Symbol(), OP_SELLSTOP, lotSize, entryPointSell, 2 * Point, stopLossSell, takeProfitSell);
        }
    }

    // Check breakeven condition
    if (breakevenBuy && breakevenSell)
    {
        if (CheckBreakevenCondition())
        {
            // Move stop loss to breakeven
            MoveStopLossToBreakeven();
        }
    }
}

bool CheckCandleRangeCondition()
{
    double range = 0;
    for (int i = 0; i < 5; i++)
    {
        range += High[i] - Low[i];
    }
    range /= 5;
  
    return range >= CandleRangeCondition * Point;
}

void CalculateEntryPoints()
{
    double highestHigh = High[1];
    double lowestLow = Low[1];
  
    for (int i = 1; i <= 5; i++)
    {
        if (High[i] > highestHigh)
            highestHigh = High[i];
        if (Low[i] < lowestLow)
            lowestLow = Low[i];
    }
  
    entryPointBuy = highestHigh + 2 * Point;
    entryPointSell = lowestLow - 2 * Point;
    stopLossBuy = lowestLow - 2 * Point;
    stopLossSell = highestHigh + 2 * Point;
    takeProfitBuy = entryPointBuy + 3 * (entryPointBuy - stopLossBuy);
    takeProfitSell = entryPointSell - 3 * (stopLossSell - entryPointSell);
}

double CalculateLotSize()
{
    double lotSize = 0;
  
    if (ManualLotSize)
    {
        // Adjust the lot size manually for each trade
        // Add your own logic here
        lotSize = 0.01;
    }
    else if (RiskAllocation)
    {
        // Calculate lot size based on risk percentage
        double accountBalance = AccountBalance();
        double riskAmount = accountBalance * RiskPercentage / 100.0;
        double stopLossDistance = MathMax(stopLossBuy - entryPointBuy, entryPointSell - stopLossSell);
        lotSize = riskAmount / stopLossDistance;
    }
  
    return lotSize;
}

bool CheckBreakevenCondition()
{
    // Check if the price has reached 1 to 1 ratio
    // Add your own logic here
  
    return false;
}

void MoveStopLossToBreakeven()
{
    // Move stop loss to breakeven
    // Add your own logic here
}

Responded

1
Developer 1
Rating
(1)
Projects
1
0%
Arbitration
2
50% / 50%
Overdue
0
Free
2
Developer 2
Rating
(104)
Projects
127
24%
Arbitration
23
30% / 52%
Overdue
8
6%
Working
3
Developer 3
Rating
(434)
Projects
638
53%
Arbitration
32
59% / 22%
Overdue
6
1%
Working
4
Developer 4
Rating
(64)
Projects
68
25%
Arbitration
12
42% / 42%
Overdue
4
6%
Free
5
Developer 5
Rating
(2671)
Projects
3405
68%
Arbitration
77
48% / 14%
Overdue
342
10%
Free
Published: 1 code
6
Developer 6
Rating
(318)
Projects
565
35%
Arbitration
81
31% / 44%
Overdue
204
36%
Free
7
Developer 7
Rating
(11)
Projects
16
25%
Arbitration
1
0% / 100%
Overdue
1
6%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(37)
Projects
59
27%
Arbitration
26
19% / 54%
Overdue
10
17%
Working
Published: 1 code
10
Developer 10
Rating
(77)
Projects
245
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 1 article
11
Developer 11
Rating
(11)
Projects
18
28%
Arbitration
4
50% / 50%
Overdue
1
6%
Free
12
Developer 12
Rating
(11)
Projects
11
0%
Arbitration
5
20% / 60%
Overdue
2
18%
Free
13
Developer 13
Rating
(72)
Projects
80
10%
Arbitration
38
8% / 58%
Overdue
6
8%
Free
14
Developer 14
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
15
Developer 15
Rating
(568)
Projects
641
41%
Arbitration
25
48% / 36%
Overdue
46
7%
Working
16
Developer 16
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
17
Developer 17
Rating
(75)
Projects
80
6%
Arbitration
46
11% / 54%
Overdue
7
9%
Working
Similar orders
I am looking for an experienced MQL5 developer to build a professional MetaTrader 5 (MT5) Expert Advisor (EA) for swing trading. Trading Pairs EUR/USD USD/JPY Timeframes Daily (D1) for trend identification. H4 for trade entries. Strategy The EA should: Detect Daily market structure (HH, HL, LH, LL) using confirmed swing highs and lows (not relying solely on ZigZag). Use DMI/ADX for trend confirmation. Open trades
Hello, I want an EA which does martingale and has hedge feature. You may be confused by what this mean entirely so reach out to me so we can talk in depth as what I have said here is very vague for someone to clearly understand. I am not paying a single dollar over $30, so don't apply if you don't agree with that. Thank you for taking your time to read this
أحتاج إلى مستشار خبير لمنصة MetaTrader 5 (MT5) مصمم كآلة حالة محدودة (FSM). يجب أن ينفذ أوامر السوق فقط بناءً على مستويات أسعار يحددها المستخدم. يجب ألا يستخدم أي مؤشرات أو تحليل فني أو أوامر معلقة أو ذكاء اصطناعي أو قرارات تداول تلقائية. يجب أن ينفذ المستشار الخبير ببساطة تسلسلًا محددًا مسبقًا لمستويات الأسعار كما يحددها المستخدم تمامًا، مع إدارة دقيقة للحالة، ودورة نشطة واحدة في كل مرة، ومعالجة الفجوات السعرية،
Message me please for the investor login. You will replicate the ea and I shall tell u some things about it, I am not paying over $100. You should have great skills. The EA can handle any market and shall not blow the account
TPO 30+ USD
Develop an MT5 EA that continuously follows market direction using one active market position and one opposite trailing pending stop order. EA must be able to work with manual trading, any MT5 indicators, Strategy Tester, Live Account, all VPS and Demo Account. EA able to trade forex, XAUUSD, Indices and Cryptocurrencies
Part 1: Project setup Input settings (risk, stop loss, take profit, EMA periods) Indicator initialization Trade management framework Part 2: Trading logic EMA crossover detection Buy/Sell entry rules One-trade-per-symbol check Part 3: Risk management Automatic lot size calculation Stop-loss and take-profit placement Trade execution and error handling Part 4: Final touches On-screen information Optimization
I am looking for an experienced MQL4 or MQL5 developer to build a high-frequency (HFT) latency arbitrage Expert Advisor for cryptocurrency trading between LMAX and IC Markets. I need someone who understands low-latency execution, price feeds, slippage, spreads, and fast order execution. The basic idea is that LMAX acts as the leading price feed while IC Markets is the execution broker. The EA should constantly
Can you Build a custom NinjaTrader 8 ChartStyle or BarsType called Optimized Footprint Bars. This project is urgent and i need someone that's wiiling to do his project with me kinldy bid for this. Thanks
Hello, I am reopening this project with a fully updated and clarified specification. I am looking for a high‑level MQL5 developer who can deliver a clean, stable, and professional Phase 1 version of my: Institutional‑Grade Multi‑Currency MT5 EA (A2SR + SMC + Smart Recovery + Smart Grid + Liquidity + Volatility + Safety Filters) This EA is not a simple indicator conversion or a basic strategy. It is a structured
I am looking for an expert MQL5 developer to build a robust, professional Expert Advisor for Gold (XAUUSD). The EA must be Event-Driven (OnTick) with no 'Sleep' functions, ensuring instant execution. ​Core Logic: ​Grid Strategy: Start with 0.02 Buy/Sell. Lot size sequence: 0.02, 0.03, 0.05, 0.09, 0.14, 0.26, 0.44, 0.75, 1.28, 2.18 (Max 10 steps). ​Dynamic TP: Total basket TP must update instantly upon new order

Project information

Budget
30 - 50 USD