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

Specifiche

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

Con risposta

1
Sviluppatore 1
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
2
50% / 50%
In ritardo
0
Gratuito
2
Sviluppatore 2
Valutazioni
(106)
Progetti
129
25%
Arbitraggio
25
28% / 56%
In ritardo
8
6%
Gratuito
3
Sviluppatore 3
Valutazioni
(434)
Progetti
640
53%
Arbitraggio
34
62% / 21%
In ritardo
6
1%
In elaborazione
4
Sviluppatore 4
Valutazioni
(64)
Progetti
68
25%
Arbitraggio
12
42% / 42%
In ritardo
4
6%
Gratuito
5
Sviluppatore 5
Valutazioni
(2674)
Progetti
3412
68%
Arbitraggio
77
48% / 14%
In ritardo
342
10%
In elaborazione
Pubblicati: 1 codice
6
Sviluppatore 6
Valutazioni
(319)
Progetti
566
35%
Arbitraggio
82
30% / 45%
In ritardo
204
36%
In elaborazione
7
Sviluppatore 7
Valutazioni
(11)
Progetti
16
25%
Arbitraggio
1
0% / 100%
In ritardo
1
6%
Gratuito
8
Sviluppatore 8
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
9
Sviluppatore 9
Valutazioni
(37)
Progetti
59
27%
Arbitraggio
26
19% / 54%
In ritardo
10
17%
In elaborazione
Pubblicati: 1 codice
10
Sviluppatore 10
Valutazioni
(78)
Progetti
246
74%
Arbitraggio
7
100% / 0%
In ritardo
1
0%
Gratuito
Pubblicati: 1 articolo
11
Sviluppatore 11
Valutazioni
(11)
Progetti
18
28%
Arbitraggio
4
50% / 50%
In ritardo
1
6%
Gratuito
12
Sviluppatore 12
Valutazioni
(11)
Progetti
11
0%
Arbitraggio
5
20% / 60%
In ritardo
2
18%
Gratuito
13
Sviluppatore 13
Valutazioni
(72)
Progetti
80
10%
Arbitraggio
38
8% / 58%
In ritardo
6
8%
Gratuito
14
Sviluppatore 14
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
15
Sviluppatore 15
Valutazioni
(568)
Progetti
641
41%
Arbitraggio
25
48% / 36%
In ritardo
46
7%
In elaborazione
16
Sviluppatore 16
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
17
Sviluppatore 17
Valutazioni
(75)
Progetti
80
6%
Arbitraggio
46
11% / 54%
In ritardo
7
9%
In elaborazione
Ordini simili
*JOB TITLE:* `MQL5 EA: 8-Indicator Confluence Bot for XAUUSD, US30, NAS100, DE40 + News + DD Protection` *BUDGET:* $300 - $400 *TIMELINE:* 10 - 14 days *PLATFORM:* MetaTrader 5 *ATTACHMENTS:* `Indicators.zip` = 10 indicators + 5 screenshots with all settings --- *1. CORE TRADING LOGIC - ON CANDLE CLOSE ONLY* *BUY when ALL conditions are TRUE:* 1. Price > 200 SMA 2. `Reversal Indicator` = UP arrow/dot 3. Majority
Hi, I Wanne have a trading robot that give me signals for short buy and sell. And only for all currency in forex trading and also can use it on mt5
the bot will be used for xauusd scalp trading , want the bor follow the trading indicator will SL and open another opposite order where i can customize the SL margin and risk management
​1. General Overview: I am looking for an experienced developer to build (or debug/optimize) an MQL5 Expert Advisor. The EA will primarily trade Gold (XAU/USD) and US Indices (US30, US100). ​2. Platform & Broker Requirements: ​Platform: MetaTrader 5 (MQL5) ​Broker: Must be fully compatible with XM Broker execution. ​Account Types: Must support both Standard and Micro lot sizing seamlessly. ​3. Technical & Skill
I Have an existing Mql5 Expert advisor (source code), I want a professional programmer to help me Modify the EA... so that it can stop taking new trades once it Gets to a Pacific Lots Size or Floating loss
Hi, can you define entry conditions based on 100 or 200 trades? If you need more history, i can give you more trades. It is EURUSD with great results! If you can do it, contact me
take your time better make it for days and have good bot than never benefits both of us. Make the bot have zero errors and backtest it for a 2 year period
Wise Legend 30 - 500 USD
I want this robot to alert me on a good entry point on the trading flat form ether to buy or to sell. And also alert me when to close the market. And alert me on market continuations
I have an existing MT5 Expert Advisor with the original MQ5 source code. I need an experienced MQL5 developer to review, debug and professionally improve the existing EA, not build an unrelated EA from scratch. The EA is mainly for XAUUSD and already contains entry signals, EMA filters, automatic lot sizing, basket profit management, spread/margin protection, news filtering and recovery logic. The main problem is the
I buy EA for USDEUR or XAUUSD for FTMO with proven backtest. Send me images with backtest reports where daily max dd is 1% on 200k account. I can buy several eas if you have them with proofs. Need images of backtesting for 5 years

Informazioni sul progetto

Budget
30 - 50 USD