İş Gereklilikleri

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);

                }

            }

        }

    }

}


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(249)
Projeler
313
28%
Arabuluculuk
33
27% / 64%
Süresi dolmuş
10
3%
Serbest
2
Geliştirici 2
Derecelendirme
(139)
Projeler
181
24%
Arabuluculuk
23
22% / 39%
Süresi dolmuş
13
7%
Serbest
3
Geliştirici 3
Derecelendirme
(325)
Projeler
505
19%
Arabuluculuk
32
44% / 31%
Süresi dolmuş
34
7%
Yüklendi
4
Geliştirici 4
Derecelendirme
(44)
Projeler
58
3%
Arabuluculuk
7
0% / 57%
Süresi dolmuş
5
9%
Çalışıyor
5
Geliştirici 5
Derecelendirme
(194)
Projeler
241
34%
Arabuluculuk
10
50% / 50%
Süresi dolmuş
8
3%
Çalışıyor
Yayınlandı: 1 makale, 8 kod
6
Geliştirici 6
Derecelendirme
(252)
Projeler
258
30%
Arabuluculuk
0
Süresi dolmuş
3
1%
Serbest
Yayınlandı: 2 kod
7
Geliştirici 7
Derecelendirme
(271)
Projeler
400
27%
Arabuluculuk
39
41% / 49%
Süresi dolmuş
1
0%
Serbest
8
Geliştirici 8
Derecelendirme
(154)
Projeler
192
58%
Arabuluculuk
10
80% / 0%
Süresi dolmuş
0
Çalışıyor
Yayınlandı: 1 kod
9
Geliştirici 9
Derecelendirme
(85)
Projeler
168
44%
Arabuluculuk
3
67% / 0%
Süresi dolmuş
5
3%
Çalışıyor
Yayınlandı: 1 kod
10
Geliştirici 10
Derecelendirme
(37)
Projeler
59
27%
Arabuluculuk
26
19% / 54%
Süresi dolmuş
10
17%
Çalışıyor
Yayınlandı: 1 kod
11
Geliştirici 11
Derecelendirme
(1156)
Projeler
1462
63%
Arabuluculuk
21
57% / 10%
Süresi dolmuş
43
3%
Serbest
12
Geliştirici 12
Derecelendirme
(527)
Projeler
799
63%
Arabuluculuk
33
27% / 45%
Süresi dolmuş
23
3%
Serbest
Yayınlandı: 1 kod
13
Geliştirici 13
Derecelendirme
(43)
Projeler
66
12%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Serbest
14
Geliştirici 14
Derecelendirme
(548)
Projeler
632
33%
Arabuluculuk
39
38% / 49%
Süresi dolmuş
11
2%
Yüklendi
15
Geliştirici 15
Derecelendirme
(12)
Projeler
25
4%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
7
28%
Serbest
16
Geliştirici 16
Derecelendirme
(449)
Projeler
477
69%
Arabuluculuk
6
67% / 0%
Süresi dolmuş
2
0%
Serbest
17
Geliştirici 17
Derecelendirme
(152)
Projeler
228
80%
Arabuluculuk
22
27% / 50%
Süresi dolmuş
11
5%
Serbest
Yayınlandı: 24 makale, 1882 kod
18
Geliştirici 18
Derecelendirme
(45)
Projeler
76
20%
Arabuluculuk
7
0% / 86%
Süresi dolmuş
14
18%
Serbest
19
Geliştirici 19
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
2
100%
Serbest
20
Geliştirici 20
Derecelendirme
(45)
Projeler
46
24%
Arabuluculuk
34
9% / 85%
Süresi dolmuş
10
22%
Serbest
21
Geliştirici 21
Derecelendirme
(3)
Projeler
2
50%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Serbest
22
Geliştirici 22
Derecelendirme
(15)
Projeler
20
35%
Arabuluculuk
3
0% / 100%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
23
Geliştirici 23
Derecelendirme
(257)
Projeler
341
58%
Arabuluculuk
7
14% / 71%
Süresi dolmuş
9
3%
Serbest
24
Geliştirici 24
Derecelendirme
(3)
Projeler
1
0%
Arabuluculuk
5
0% / 100%
Süresi dolmuş
0
Serbest
25
Geliştirici 25
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
I am looking to purchase a proven scalping Expert Advisor with verified live account performance. Requirements: • Minimum 6 months live trading history • Proven profitability with controlled drawdown • Scalping strategy with Buy and Sell trades • Works on XAUUSD (Gold), MT5 preferred • Includes Stop Loss and Take Profit • Suitable for small accounts ($100) • Reasonable one time price Please share live performance
Trade Copier from MT4/ MT5 to MT4/ MT5 (local) , i am looking for some local copier where i can copy trade from meta trader 4 to meta trader 5 or meta trader 5 to meta trader 4 , looking for fast execution
I. YÊU CẦU DỰ ÁN Tôi đang tìm cách phát triển một hệ thống giao dịch tự động (Expert Advisor) được xây dựng trên nền tảng Smart Money Concepts (SMC), tích hợp Trí tuệ Nhân tạo (AI) và có cơ chế quản lý vốn tiên tiến. EA (Expert Advisor) phải được tối ưu hóa cho cả thị trường biến động mạnh như Vàng (XAUUSD) cũng như các thị trường ổn định, có xu hướng như EURUSD. Nó phải thân thiện với người mới bắt đầu nhưng cũng đủ
The indicator a bit inverted. But it doesn’t matter to me as long as the winrate make sense for investment. For brief details regarding the indicator. What should have been a sell, i inverted it into buy with sl and tp swapped(only change the name of sl and tp for visualisation , but the code still on right tp and sl) . And in script ive inverted the signal command code. But the trouble is the tp and sl cant be
Tuyển dụng chuyên gia MQL4 để tối ưu hóa và hoàn thiện hệ thống giao dịch tự động (EA) I. Tổng quan Tôi đang tìm kiếm một nhà phát triển MQL4 giàu kinh nghiệm để tinh chỉnh, tối ưu hóa và hoàn thiện một Expert Advisor (EA) được thiết kế riêng cho nền tảng MetaTrader 4 (MT4). Logic cốt lõi đã được phát triển; mục tiêu chính là nâng cao hiệu suất và đảm bảo tính ổn định sẵn sàng cho môi trường sản xuất. II. Yêu cầu kỹ
The EA should only set TP and SL( Both Optional, We can set one at the time or no one at the same time or both active at the same time) 1. We active trade ourself , But in The EA this should ask if what the the TP and SL in form of USD we need. We'll put the Exact Required profit and or loss. This EA should calculate and set the tps and Sls itself to all the trades, and when we change the USD profit from info meter
Pro EA 30+ USD
Hi, I want to build a trading robot specifically for passing a prop firm challenge. The EA should focus on strict risk management, low drawdown, and consistency suitable for prop firm rules. My current budget for this project is $30. Please let me know what is achievable within this budget and the strategy you recommend
Indicator Simple Moving Averages and Exponential Moving Average BUY SIGNALS SMA 7 High Crosses Above 20 EMA= LIME color Buy Signal at the low of next candle. SMA 7 High Crosses above 40 EMA= BLUE color Buy Signal at low of next candle. SMA 7 High Crossed above 200 EMA= YELLOW Color buy signal at the low of next candle. SELL SIGNALS SMA 7 Low Crosses below 20 Ema= LIME color Sell Signal at the high of next candle. SMA
I trade manually on M1 chart (XAUUSD) with fractals and alligator. When there is a price break on fractal (or some fractals that form a price level) or a price level created by multiple candles spikes, I enter 2 trades (0.02 lots), and 2 trades (0.04 lots). If I go in profit (5/10€), I close in profit. But if I go in loss with DD, at this point starts the management: every price level (important level) created by
Phahla fx boto 30+ USD
99.99% signal accuracy 10-15 trades distribution all currency trade and meta AI assistance on loss[advice] stop and start robot cyber security firewall protection activation code: 20060605TLP20 Please create a trading bot with any logo with the name elevation

Proje bilgisi

Bütçe
30+ USD