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

명시

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

응답함

1
개발자 1
등급
(1)
프로젝트
1
0%
중재
3
33% / 67%
기한 초과
0
무료
2
개발자 2
등급
(89)
프로젝트
112
24%
중재
11
45% / 18%
기한 초과
8
7%
작업중
3
개발자 3
등급
(355)
프로젝트
484
51%
중재
24
54% / 25%
기한 초과
5
1%
로드됨
4
개발자 4
등급
(63)
프로젝트
68
25%
중재
12
42% / 42%
기한 초과
4
6%
무료
5
개발자 5
등급
(2441)
프로젝트
3076
66%
중재
77
48% / 14%
기한 초과
340
11%
무료
6
개발자 6
등급
(248)
프로젝트
444
34%
중재
56
36% / 38%
기한 초과
163
37%
로드됨
7
개발자 7
등급
(11)
프로젝트
16
25%
중재
0
기한 초과
1
6%
무료
8
개발자 8
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
9
개발자 9
등급
(37)
프로젝트
59
27%
중재
25
20% / 52%
기한 초과
10
17%
작업중
10
개발자 10
등급
(63)
프로젝트
194
73%
중재
4
100% / 0%
기한 초과
1
1%
무료
11
개발자 11
등급
(10)
프로젝트
16
25%
중재
3
67% / 33%
기한 초과
1
6%
작업중
12
개발자 12
등급
(11)
프로젝트
11
0%
중재
4
25% / 50%
기한 초과
2
18%
무료
13
개발자 13
등급
(72)
프로젝트
80
10%
중재
36
8% / 53%
기한 초과
6
8%
작업중
14
개발자 14
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
15
개발자 15
등급
(568)
프로젝트
641
41%
중재
21
57% / 29%
기한 초과
47
7%
작업중
16
개발자 16
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
17
개발자 17
등급
(58)
프로젝트
66
6%
중재
27
19% / 37%
기한 초과
4
6%
로드됨
비슷한 주문
I need to fix the alerts of my SMC Order Blocks indicator, which is a custom indicator created for me some time ago. This custom indicator already has several types of alerts built-in, but I need to fix specific ones while keeping the other existing alerts unchanged, as those do not have any errors. The alert is for a specific Order Blocks pattern. This indicator graphically provides a zigzag, and from there, CHoCH
Mobile robot 50 - 100 USD
I want a profitable scalping EA robot for mt5 and mobile phones (licence key should be provided).the video link attached below indicates how the EA robot should operate it.it analyses the market before taking trades and it trades candle to candle .also coding samples are provided on the video .it should be applicable to all timeframes.it should trade indices(Nas100,US30,S&p500,GER30,)
Martingale EA for MT5 30 - 100 USD
Criteria: Only one trade at a time. Cannot open another trade if one is running Trade on EURUSD only, once job is completed I will be happy to schedule more for other pairs You choose entry strategy and criteria win rate must be above 50% in long term backtest of EURUSD Every trade has got TP and SL Trades to last about a day, few trades a week, at least 10 pips gain per trade, so that it can be launched on normal
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
Hi Guys, I am looking to someone that can generate an indicator for MT4 as explained below. Basically I would need that the indicator point out the price that will close my position in stop out/margin call. The indicator should pick automatically the level of trade out for the broker (which can be different from a broker to another broker) It should write (ideally on the bottom on the left) the following information
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks

프로젝트 정보

예산
30 - 50 USD
VAT (21%): 6.3 - 10.5 USD
총: 36.3 - 60.5 USD
개발자에게
27 - 45 USD