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

Termos de Referência

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

Respondido

1
Desenvolvedor 1
Classificação
(1)
Projetos
1
0%
Arbitragem
3
33% / 67%
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(85)
Projetos
105
24%
Arbitragem
8
38% / 25%
Expirado
8
8%
Carregado
3
Desenvolvedor 3
Classificação
(337)
Projetos
455
52%
Arbitragem
22
50% / 27%
Expirado
5
1%
Carregado
4
Desenvolvedor 4
Classificação
(63)
Projetos
68
25%
Arbitragem
12
42% / 42%
Expirado
4
6%
Livre
5
Desenvolvedor 5
Classificação
(2422)
Projetos
3042
66%
Arbitragem
77
48% / 14%
Expirado
340
11%
Trabalhando
6
Desenvolvedor 6
Classificação
(236)
Projetos
418
34%
Arbitragem
52
37% / 40%
Expirado
153
37%
Ocupado
7
Desenvolvedor 7
Classificação
(11)
Projetos
16
25%
Arbitragem
0
Expirado
1
6%
Livre
8
Desenvolvedor 8
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
9
Desenvolvedor 9
Classificação
(37)
Projetos
59
27%
Arbitragem
25
20% / 52%
Expirado
10
17%
Trabalhando
10
Desenvolvedor 10
Classificação
(56)
Projetos
175
71%
Arbitragem
4
100% / 0%
Expirado
1
1%
Livre
11
Desenvolvedor 11
Classificação
(10)
Projetos
15
27%
Arbitragem
3
67% / 33%
Expirado
0
Livre
12
Desenvolvedor 12
Classificação
(11)
Projetos
11
0%
Arbitragem
4
25% / 50%
Expirado
2
18%
Livre
13
Desenvolvedor 13
Classificação
(68)
Projetos
77
8%
Arbitragem
33
9% / 55%
Expirado
6
8%
Trabalhando
14
Desenvolvedor 14
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
15
Desenvolvedor 15
Classificação
(568)
Projetos
641
41%
Arbitragem
21
57% / 29%
Expirado
47
7%
Trabalhando
16
Desenvolvedor 16
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
17
Desenvolvedor 17
Classificação
(51)
Projetos
62
6%
Arbitragem
22
23% / 36%
Expirado
4
6%
Carregado
Pedidos semelhantes
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. (when it is up it is buy, when down it is sell) - Can recognize RSI. (Buy on oversold, Sell on overbought). - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5
Greetings, As the title suggests, I am trying to convert an indicator that calls itself via an iCustom call like this. iMAArray_Buffer[loop_1] = iCustom ( NULL , Selected_TF, MQLInfoString ( MQL_PROGRAM_NAME ), "calculate" , RPeriod, MType, MPeriod, 1 , shift); Full code will not be provided, only the position that needs fixing. I cannot get this working in MQL5 but the original code runs smoothly in MQL4. Please
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Greetings great developer, I am in search of a highly skilled developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further

Informações sobre o projeto

Orçamento
30 - 50 USD
IVA (21%): 6.3 - 10.5 USD
Total: 36.3 - 60.5 USD
Desenvolvedor
27 - 45 USD