Техническое задание

HI

i want some one to make the following MQL5 code work for me. the code has errors.


#include <Trade\Trade.mqh> // Include the trade library


// Define input parameters

input double lotSize = 0.1;    // Lot size for trading

input int stopLoss = 50;       // Stop Loss in pips

input int takeProfit = 100;    // Take Profit in pips


//+------------------------------------------------------------------+

//| Expert initialization function                                   |

//+------------------------------------------------------------------+

int OnInit()

{

    // Subscribe to OnTrade() event

    EventSetMillisecondTimer(60);  // Set a timer to check conditions every 60 milliseconds

    return(INIT_SUCCEEDED);

}


//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

{

    // Deinitialization function (if needed)

    EventKillTimer();  // Kill the timer when deinitializing

}


//+------------------------------------------------------------------+

//| Expert tick function                                             |

//+------------------------------------------------------------------+

void OnTick()

{

    // Nothing to do here for conditions check, as we use OnTrade()

}


//+------------------------------------------------------------------+

//| Expert trade event handler                                       |

//+------------------------------------------------------------------+

void OnTrade()

{

    // Calculate the open and close prices of the previous day

    double prevDayOpen = iOpen(Symbol(), PERIOD_D1, 1);

    double prevDayClose = iClose(Symbol(), PERIOD_D1, 1);


    // Check for Rule 1: Previous day was an uptrend

    if (prevDayClose > prevDayOpen)

    {

        // Check if the current open price is between the previous day's open and close prices

        double currentOpen = iOpen(Symbol(), PERIOD_D1, 0);

        if (currentOpen > prevDayOpen && currentOpen < prevDayClose)

        {

            // Buy if the price breaks above the previous day's close price

            double currentHigh = iHigh(Symbol(), PERIOD_D1, 0);

            if (currentHigh > prevDayClose)

            {

                // Place a Buy order

                double openPrice = SymbolInfoDouble(_Symbol, SYMBOL_ASK);

                double stopLossPrice = openPrice - stopLoss * _Point;

                double takeProfitPrice = openPrice + takeProfit * _Point;


                int ticket = OrderSend(_Symbol, OP_BUY, lotSize, openPrice, 3, 0, 0, "", 0, clrNONE, 0, clrNONE);

                if (ticket > 0)

                {

                    // Order placed successfully - set Stop Loss and Take Profit

                    OrderSend(_Symbol, OP_SELL, lotSize, openPrice, 0, stopLossPrice, takeProfitPrice, "", 0, clrNONE, 0, clrNONE);

                }

            }

        }

    }


    // Check for Rule 2: Opposite of Rule 1

    if (prevDayClose < prevDayOpen)

    {

        // Check if the current open price is between the previous day's open and close prices

        double currentOpen = iOpen(Symbol(), PERIOD_D1, 0);

        if (currentOpen > prevDayOpen && currentOpen < prevDayClose)

        {

            // Sell if the price breaks below the previous day's close price

            double currentLow = iLow(Symbol(), PERIOD_D1, 0);

            if (currentLow < prevDayClose)

            {

                // Place a Sell order

                double openPrice = SymbolInfoDouble(_Symbol, SYMBOL_BID);

                double stopLossPrice = openPrice + stopLoss * _Point;

                double takeProfitPrice = openPrice - takeProfit * _Point;


                int ticket = OrderSend(_Symbol, OP_SELL, lotSize, openPrice, 3, 0, 0, "", 0, clrNONE, 0, clrNONE);

                if (ticket > 0)

                {

                    // Order placed successfully - set Stop Loss and Take Profit

                    OrderSend(_Symbol, OP_BUY, lotSize, openPrice, 0, stopLossPrice, takeProfitPrice, "", 0, clrNONE, 0, clrNONE);

                }

            }

        }

    }

}


Откликнулись

1
Разработчик 1
Оценка
(253)
Проекты
316
29%
Арбитраж
34
26% / 65%
Просрочено
10
3%
Свободен
2
Разработчик 2
Оценка
(139)
Проекты
181
24%
Арбитраж
23
22% / 39%
Просрочено
13
7%
Свободен
3
Разработчик 3
Оценка
(328)
Проекты
511
19%
Арбитраж
33
45% / 30%
Просрочено
34
7%
Загружен
4
Разработчик 4
Оценка
(44)
Проекты
58
3%
Арбитраж
6
0% / 67%
Просрочено
5
9%
Свободен
5
Разработчик 5
Оценка
(194)
Проекты
241
34%
Арбитраж
11
45% / 45%
Просрочено
8
3%
Работает
Опубликовал: 1 статью, 8 примеров
6
Разработчик 6
Оценка
(256)
Проекты
263
30%
Арбитраж
0
Просрочено
3
1%
Свободен
Опубликовал: 2 примера
7
Разработчик 7
Оценка
(273)
Проекты
402
27%
Арбитраж
40
40% / 50%
Просрочено
1
0%
Свободен
8
Разработчик 8
Оценка
(156)
Проекты
197
59%
Арбитраж
10
80% / 0%
Просрочено
0
Свободен
Опубликовал: 1 пример
9
Разработчик 9
Оценка
(85)
Проекты
169
44%
Арбитраж
3
67% / 0%
Просрочено
5
3%
Работает
Опубликовал: 1 пример
10
Разработчик 10
Оценка
(37)
Проекты
59
27%
Арбитраж
26
19% / 54%
Просрочено
10
17%
Работает
Опубликовал: 1 пример
11
Разработчик 11
Оценка
(1156)
Проекты
1462
63%
Арбитраж
21
57% / 10%
Просрочено
43
3%
Свободен
12
Разработчик 12
Оценка
(541)
Проекты
818
62%
Арбитраж
33
27% / 45%
Просрочено
23
3%
Свободен
Опубликовал: 1 пример
13
Разработчик 13
Оценка
(43)
Проекты
66
12%
Арбитраж
12
58% / 42%
Просрочено
1
2%
Свободен
14
Разработчик 14
Оценка
(566)
Проекты
655
33%
Арбитраж
41
41% / 46%
Просрочено
11
2%
Занят
15
Разработчик 15
Оценка
(12)
Проекты
25
4%
Арбитраж
1
0% / 0%
Просрочено
7
28%
Свободен
16
Разработчик 16
Оценка
(450)
Проекты
477
69%
Арбитраж
6
67% / 0%
Просрочено
2
0%
Свободен
17
Разработчик 17
Оценка
(152)
Проекты
228
80%
Арбитраж
22
27% / 50%
Просрочено
11
5%
Свободен
Опубликовал: 24 статьи, 1882 примера
18
Разработчик 18
Оценка
(45)
Проекты
76
20%
Арбитраж
7
0% / 86%
Просрочено
14
18%
Свободен
19
Разработчик 19
Оценка
(2)
Проекты
2
0%
Арбитраж
1
0% / 0%
Просрочено
2
100%
Свободен
20
Разработчик 20
Оценка
(45)
Проекты
46
24%
Арбитраж
34
9% / 85%
Просрочено
10
22%
Свободен
21
Разработчик 21
Оценка
(3)
Проекты
2
50%
Арбитраж
2
0% / 100%
Просрочено
0
Свободен
22
Разработчик 22
Оценка
(15)
Проекты
20
35%
Арбитраж
3
0% / 100%
Просрочено
0
Свободен
Опубликовал: 1 пример
23
Разработчик 23
Оценка
(257)
Проекты
341
58%
Арбитраж
7
14% / 71%
Просрочено
9
3%
Свободен
24
Разработчик 24
Оценка
(3)
Проекты
1
0%
Арбитраж
5
0% / 100%
Просрочено
0
Свободен
25
Разработчик 25
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
Похожие заказы
I am currently manual testing an additional indicator but, I have a few(3) paid(licensed) indicators that I use to trade with. I use one as a primary signal and the other 2 as confluence for entries. I want to backtest them together in order to have an auto/semi-auto data backed system. Would you be able to assist with this? Im am planning on fully engaging this project in 1-2 weeks from now. My indicators are on
OFFICIAL MQL5 SOFTWARE REQUIREMENTS SPECIFICATION (SRS) Project Name: "Quantum-Shield 2.0" Institutional EA Platform: MetaTrader 5 (MT5) Execution Logic: Fully Automated Instrument: GER40 (DAX) Timeframe: 10 Minutes 1. ARCHITECTURAL MANDATE The Expert Advisor must be a monolithic, high-performance C++ based MQL5 application. No DLLs, no external python bridges. The logic must be entirely self-contained. 2. SIGNAL
Hi All, I am looking for an EA which I have attached the video of. It places a buy stop and sell stop with 250 pips above and below current price for every minute with SL as 300 pips and TP as 500 pips. If any of of them triggers in the minute other will be cancelled, it will not place any pending orders till either of SL or TP is hit and places new set of pending orders the very next minute of SL or TP hit minute
Okay so basically this is a repair job of a strategy I hired a guy to do that doesn't quite workas I intended it to but is very close. So should be fairly simple to fix . I have enclosed a video file. Its important to understand that the take profit and stop loss were added by the guy who coded it but arent central to the strategy. The main thing is that the system must reference the prior bar and sell when the ow is
Specification I need a mt5 Expert advisor EA to manage intraday trades with strict risk management. The EA must -Handle between 5 to 8 clean trades a day max altogether throughout all 3 sessions. no big news trading times and no overnight trades -Use 1 % on forex pairs and up to 2% on XAUUSD risk per trade - Automatically calculate lot size based on stop loss -use fixed RR ratio [1:2] For forex pairs
I trade ES futures on the Ninja trader platform. I recently came across an indicator and wanted to check with you if you can build a similar indicator that works on Orenko or Ninja renko charts, and also combines support and resistance untouched. Below is the indicator, which will tell you market chop and to avoid. I want to include a support and
I have an existing TradingView Pine Script. I will provide the Pine Script source code after agreement. Goal: Convert the logic into MT5 (MQL5) and build an EA. Phase 1: Create MT5 indicator that matches TradingView signals (M15 only) Phase 2: Build EA with strict execution rules: max 4 trades total one trade per symbol gold lot limit (max 0.02 total) reversal logic (close then open opposite) no re-entry after manual
Requirements 1.Robot for Entry and Exit rules as per my indicators. 2.Back testing which can work on all time frames. 3.A system which i can modify later on as well according to my studies
I have been working on an EA that is based on Ichimoku cloud and SMC internal blocks for stop loss. ENTRY BUGS: 1. I have entries issues with the chenkou and price action. It is entering trades when chenkou is poking through the kumo. This shouldn't happen. There should be a candle close with chenkou above kumo or below. 2. Another entry issue with other criteria for tenkan and price action also these entries are
Looking for experience profitable manual traders that will be willing to trade my live mt5 account for profit share. Requirements Must have at least 6 months of profitable months. Min 10 percent monthly Send me investor credentials for mt5 or mt4 account. Can be trading Any instruments. Must reply with mt5 credentials or will disregard

Информация о проекте

Бюджет
30+ USD