Code Needed to Move Market Positions to Breakeven | MQL4 for Metatrader

MQL4 전문가

작업 종료됨

실행 시간 1 일
고객의 피드백
Fantastic Guy, went above and beyond, stayed with me until 8.30 pm GMT and finally got it sorted.
피고용인의 피드백
Brilliant customer - Looking forward to the next project.

명시

Hello,

I'm looking for an developer to implement a coding strategy to modify any market order positions to beak even when I profit 100 pips, the current code I have so far is below. However, I'm having trouble getting this to actually modify any orders. There are no errors in the journal so there shouldn't be anything wrong specifically with the code, but clearly one or more conditions are not being met without my knowledge.

If any developer could alter the code to so as my market positions move to breakeven,. this would be much appreciated. 

			for(int s=OrdersTotal()-1;s>=0;s--)
                        {
                        if(OrderSelect(s,SELECT_BY_POS,MODE_TRADES)==true)
                           {
                           double   anAskPrice  =  MarketInfo(Symbol(),MODE_ASK);
                           double   tick        =  MarketInfo(Symbol(),MODE_TICKSIZE);
                           double   anOpenPrice =  OrderOpenPrice();
                           double   aCurrentSL  =  OrderStopLoss();
                           double   aNewSLPrice =  OrderOpenPrice();
                           double   tp          =  OrderTakeProfit();
                           int      pnlPoints   =  int((anOpenPrice - anAskPrice)/_Point);
                           int      stopPoints  =  int((aNewSLPrice - anAskPrice)/_Point);
                           int      stopLevel   =  int(MarketInfo(Symbol(),MODE_STOPLEVEL)+MarketInfo(Symbol(),MODE_SPREAD));
                           int      aTicket     =  OrderTicket();
                           int      breakeven   =  100;   
                           if(OrderType()==OP_SELL)
                           if(pnlPoints>breakeven)
                           if(stopPoints >stopLevel)
                           if(pnlPoints>breakeven)
                           if(anOpenPrice-anAskPrice>breakeven*_Point)
                           if(aNewSLPrice!=aCurrentSL)
                              {
                              SellMod = OrderModify(aTicket,anOpenPrice,anOpenPrice,tp,0,sellcolor);
                              PrintFormat("OrderOpenPrice %7.5f CurrentPrice %7.5f",anOpenPrice,anAskPrice);
                              SendMail("Notification of Order Modification for Ticket#"+IntegerToString(OrderTicket(),10),"Good news! Order Ticket#"+IntegerToString(OrderTicket(),10)+"has been changed to breakeven");
                              SendNotification("Ticket# "+IntegerToString(aTicket,10)+" has been modified to breakeven");
                              if(!SellMod)
                                 {
                                 PrintFormat("OrderOpenPrice %7.5f CurrentPrice %7.5f",anOpenPrice,anAskPrice);
                                 PrintFormat("Order modification for ticket %10d has failed to modify the order under the Error Code# %5d. Check MQL4 Documentation",aTicket,GetLastError());
                                 }
                              }
                            }
                          }
                         
                      for(int b=OrdersTotal()-1;b>=0;b--)
                        {
                        if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES)==true)
                           {
                           double   anBidPrice  =  MarketInfo(Symbol(),MODE_BID);
                           double   anOpenPrice =  OrderOpenPrice();
                           double   aCurrentSL  =  NormalizeDouble(OrderStopLoss(),Digits);
                           double   aNewSLPrice =  NormalizeDouble(OrderOpenPrice(),Digits);
                           double   tp          =  OrderTakeProfit();
                           int      pnlPoints   =  int((anBidPrice - anOpenPrice)/_Point);
                           int      stopPoints  =  int((anBidPrice - aNewSLPrice)/_Point);
                           int      stopLevel   =  int(MarketInfo(Symbol(),MODE_STOPLEVEL)+MarketInfo(Symbol(),MODE_SPREAD));
                           int      aTicket     =  OrderTicket();
                           int      breakeven   =  100;   
                           if(OrderType()==OP_SELL)
                           if(pnlPoints>breakeven)
                           if(stopPoints >stopLevel)
                           if(pnlPoints > breakeven)
                           if(anBidPrice-anOpenPrice>breakeven*_Point)
                           if(aNewSLPrice!=aCurrentSL)
                              {
                              SellMod = OrderModify(aTicket,anOpenPrice,aNewSLPrice,tp,0,sellcolor);
                              SendMail("Notification of Order Modification for Ticket#"+IntegerToString(OrderTicket(),10),"Good news! Order Ticket#"+IntegerToString(OrderTicket(),10)+"has been changed to breakeven");
                              SendNotification("Ticket# "+IntegerToString(aTicket,10)+" has been modified to breakeven");
                              if(!SellMod)
                                 {
                                 PrintFormat("Order modification for ticket %10d has failed to modify the order under the Error Code# %5d. Check MQL4 Documentation",aTicket,GetLastError());
                                 }
                              }
                            }
                          }

응답함

1
개발자 1
등급
(133)
프로젝트
185
30%
중재
77
9% / 73%
기한 초과
77
42%
무료
2
개발자 2
등급
(169)
프로젝트
218
50%
중재
6
17% / 67%
기한 초과
11
5%
무료
3
개발자 3
등급
(106)
프로젝트
314
49%
중재
42
52% / 19%
기한 초과
22
7%
무료
4
개발자 4
등급
(28)
프로젝트
36
17%
중재
5
20% / 40%
기한 초과
17
47%
무료
5
개발자 5
등급
(69)
프로젝트
76
59%
중재
0
기한 초과
12
16%
무료
6
개발자 6
등급
(103)
프로젝트
205
41%
중재
17
29% / 71%
기한 초과
45
22%
무료
7
개발자 7
등급
(6)
프로젝트
5
0%
중재
2
0% / 100%
기한 초과
1
20%
무료
8
개발자 8
등급
(25)
프로젝트
54
37%
중재
4
0% / 50%
기한 초과
22
41%
무료
9
개발자 9
등급
(121)
프로젝트
134
66%
중재
36
25% / 56%
기한 초과
22
16%
무료
10
개발자 10
등급
(130)
프로젝트
210
40%
중재
90
20% / 43%
기한 초과
85
40%
무료
11
개발자 11
등급
(1123)
프로젝트
1425
62%
중재
21
57% / 10%
기한 초과
43
3%
무료
12
개발자 12
등급
(221)
프로젝트
369
66%
중재
10
50% / 0%
기한 초과
46
12%
무료
13
개발자 13
등급
(1853)
프로젝트
3455
88%
중재
73
40% / 15%
기한 초과
265
8%
무료
14
개발자 14
등급
(14)
프로젝트
15
60%
중재
2
0% / 100%
기한 초과
5
33%
무료
15
개발자 15
등급
(46)
프로젝트
73
16%
중재
13
8% / 92%
기한 초과
37
51%
무료
16
개발자 16
등급
(59)
프로젝트
182
55%
중재
31
45% / 16%
기한 초과
103
57%
무료
17
개발자 17
등급
(52)
프로젝트
133
44%
중재
14
50% / 29%
기한 초과
55
41%
무료
비슷한 주문
HELLO DEAR DEV'S. I'VE AN EA BUT IT STOP WORKING WHEN MT4 HAS BEEN UPDATED TO THE LATEST VERSION (1420). SO I NEED A GOOD DEVELOPPER THAT COULD UPDATE THIS EA TO THE LATEST VERSION OF MT4 SO I CAN USE IT. NB: IT'S A SINGLE FILE (.EX4) AND THE PRICE CAN BE NEGOCIATED TO BE SUITABLE FOR BOTH PARTIES. THANK YOU
hey friends, I am looking to build a smart trading robot, for the capital market. He knew how to trade in all the different types of trade. Example - in shares, currencies, index, indices, ETFs, funds, commodities, options, futures and so on. Suitable for trading on all stock exchanges in the world. It will be possible to install the trading robot in the MetaTrader 5 trading software. But it will also be possible to
STI EA 30 USD
I need to convert this MT4 indicator into MT5 EA/indicator. The problem is I only have the .ex4 file bt not .mq4 file and it is also a repainting indicator. I need preliminary assessment if the conversion can be done based on .ex4 file first before exploring the EA details further. Attached is the indicator Budget below is just indicative for the assessment. We can discuss further once the conversion can be done and
i want you to help me it mq4 source code and insure it will work on mt4 and mt5 optimally basically i want the source code and that dll if its important to crack it .. regards
This mql4 got entry blue line and exit red line and pips inside also calculated it uses haiken Ashi and murray Math settings if you this you up for this job let's discuss it we will talk more when you are chosen thanks in advance
Hi, The task involves adding functions to an existing EA and correcting an error. The developer must have a thorough understanding of the following: Trailing Take Profit function Calculating a decreasing distance between orders Ability to code a function for Global Profit decrement/increment size in percentage Ability to correct error 10015 Thank you in advance
The first section will describe the EAs trading strategy logic and features. The second section is an outline of the inputs that the EA should contain. 1. The idea of the trading system is as follows : This EA enters trades based on fibonacci retracement levels when other (MACD, RSI) conditions are met. It will use a MACD from a particular time frame to establish the swing high and swing lows which the fibonacci
Expert Advisor (EA) will provide automatic entry and exit using Black Dragon indicator as per the description below. Long (entry): on the first blue candle. Long (exit): on the first red candle, stop loss or take profit/break-even. Whatever happens first. Short (entry): on the first red candle. Short (exit): on the first blue candle, stop loss or take profit/break-even. Whatever happens first. Long (stop loss value)
1. **Timeframe and Liquidity:** Focus on the 5-minute timeframe for liquidity analysis.(timeframe for liquidity should be editble) 2. **Candlestick MSS:** Monitor 1-minute candlestick patterns for entry signals.(should be editble) 3. **Swing Points:** Identify swing points using the high and low of the last three candles.(ict swimg high and low) 4. **Sell Setup:** - Wait for a 5-minute candle to take out the swing
Hello Greetings. I have a custom tradingview strategy I would like to convert to Metatrader 5 ( mt5 ) . I have the source code a and with me. Kindly bid if it is what you can do for me and let discuss about the project. Thanks

프로젝트 정보

예산
50 - 100 USD
개발자에게
45 - 90 USD
기한
에서 3  5 일