Looking for a coder to modify a loop

작업 종료됨

실행 시간 21 시간
고객의 피드백
The best developer I have used here.
피고용인의 피드백
It was nice to work with the client. Thank you for the project.

명시

The loop will calculate consecutive losing trades and reset to zero once a winning trade is met. 

For example: A trade is closed as a losing trade, the loop will count 5 losing trades and return the value 5, then once a trade has closed in profit the loop will reset.

I am looking for very concise code that I will add to an existing EA.


This is the code I have as an example which does not function the way I am proposing.

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int ConsecutiveLosses()
  {
//Calculate the no of winners and losers from today's trading. These are held in the history tab.
   int LosingTrades = 0;
   int loss_count = 5;

// (BA) Get the start second of the current day (server time)
   for(int cc = 0; cc <= OrdersHistoryTotal(); cc++)
     {
      if(!OrderSelect(cc, SELECT_BY_POS, MODE_HISTORY))
        {
         continue;
        }
      if(OrderSymbol() != Symbol())
        {
         continue;
        }
      if(OrderMagicNumber() != MagicNumber)
        {
         continue;
        }
      if(OrderType() > 1)
        {
         continue;
        }
      if(OrderProfit() < 0)
        {
         LosingTrades++;
         if(LosingTrades > loss_count)
            break;
        }
     }//for (int cc = 0; cc <= tot -1; cc++)
   return(LosingTrades);
  }//End void CalculateDailyResult()

응답함

1
개발자 1
등급
(137)
프로젝트
162
22%
중재
7
29% / 43%
기한 초과
4
2%
작업중
2
개발자 2
등급
(92)
프로젝트
110
34%
중재
5
40% / 20%
기한 초과
5
5%
무료
3
개발자 3
등급
(376)
프로젝트
398
31%
중재
62
19% / 69%
기한 초과
50
13%
작업중
4
개발자 4
등급
(153)
프로젝트
225
58%
중재
3
100% / 0%
기한 초과
46
20%
작업중
5
개발자 5
등급
(41)
프로젝트
54
4%
중재
5
0% / 60%
기한 초과
4
7%
무료
6
개발자 6
등급
(298)
프로젝트
427
26%
중재
18
61% / 33%
기한 초과
26
6%
무료
7
개발자 7
등급
(97)
프로젝트
135
52%
중재
4
50% / 50%
기한 초과
0
작업중
비슷한 주문
Hi Everyone, I need a cloud based licensing system to protect my MT4 / MT5 Indicators and Expert advisors Secure an unlimited number of EAs, indicators, and scripts. Create and manage unlimited license keys for secured EAs, indicators, and scripts. Instantly suspend license keys in case of refund. Lock EA/indicator to specific accounts and time frame similar to this
Hi, i have a tos script i need converted to Ninja script, but someone who knows both coding. Cant be someone who is just going to paste into chat gpt, it requires more understanding for compatibility
Hi, i have a tos script i need converted to Ninja script, but someone who knows both coding. Cant be someone who is just going to paste into chat gpt, it requires more understanding for compatibility
EA Description: Box Identification: The EA allows users to manually mark consolidation zones on the chart with rectangular boxes. These boxes are distinguished by color: red for bearish zones and green for bullish zones. Entry Types: Aggressive Entry (True/False): Users can opt for aggressive entries, initiating trades at a specified percentage of the zone's range. Divergence Entry (True/False): The EA detects
I need MT4 and MT5 hedging locker expert advisors that hedge existing trades either with pending or market order hedging trades. With pending hedge trades the entry price may optionally be made to trail the existing open orders. There should be option for a breakeven and trailing of the hedge trade’s stop
I believe in Robotics as a major artificial intellect to function of growth of business.Therefore if you script there is a likelihood of bringing economies of scale.The retrospective of the dynamics of indulgence of work can be economics of scale
Just profitable Ea. 30 - 100 USD
Hello, I am looking for a good scalper that can operate on a single chart with multi-currency pairs, including gold and indices( MT4). It should support all brokers, leverage, and be capable of trading with a small deposit with SL and TP.It's important that the robot does not use risky strategies and, most importantly, is profitable. Thank you
MT4 INDICATOR 30 - 35 USD
Looking for a proven MT4 indicator that is highly consistent and profitable preferably that you have developed and are able to share with me. If you have some indicator that is valuable for making consistent profit please bid and show me trading history from using it in your MT4 account. Thanks
I need a EA to open 2 trades 1. one trade with a SL and a TP 2. one trade with a SL no TP if the 1st trade takes TP the 2nd trade SL needs to move on break even and trail the trade thereafter. will need the lot size Number of trades
there I hope you're doing well I want to convert the tradingview indicator to make an indicator for mt5. And in that, I want to make an automatic robot on the base of the indicator. I have the pine script of that indicator

프로젝트 정보

예산
30+ USD
개발자에게
27 USD
기한
에서 1  10 일