Looking for a coder to modify a loop

Trabajo finalizado

Plazo de ejecución 21 horas
Comentario del Cliente
The best developer I have used here.
Comentario del Ejecutor
It was nice to work with the client. Thank you for the project.

Tarea técnica

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

Han respondido

1
Desarrollador 1
Evaluación
(131)
Proyectos
152
22%
Arbitraje
5
0% / 60%
Caducado
4
3%
Ocupado
2
Desarrollador 2
Evaluación
(89)
Proyectos
105
34%
Arbitraje
5
40% / 20%
Caducado
5
5%
Trabajando
3
Desarrollador 3
Evaluación
(375)
Proyectos
398
31%
Arbitraje
62
19% / 69%
Caducado
50
13%
Trabaja
4
Desarrollador 4
Evaluación
(150)
Proyectos
220
58%
Arbitraje
3
100% / 0%
Caducado
45
20%
Trabajando
5
Desarrollador 5
Evaluación
(41)
Proyectos
54
4%
Arbitraje
5
0% / 60%
Caducado
4
7%
Libre
6
Desarrollador 6
Evaluación
(298)
Proyectos
427
26%
Arbitraje
18
61% / 33%
Caducado
26
6%
Libre
7
Desarrollador 7
Evaluación
(97)
Proyectos
135
52%
Arbitraje
4
50% / 50%
Caducado
0
Trabaja
Solicitudes similares
I have an ea which is working according to ict liquidity sweep strategy . With sl and tp but I test it in strategy tester but the result is awful the sl is hitting more than tp so i want to change its sl to tp and tp to sl to set the result to its normal form is there any professional programmer to solve my inquiry ? If yes so bet for it thnk alot
The specifications cover 4 requests: 1- Addition of a Trailing Take Profit function 2- Addition of a function to calculate the distance according to a decreasing mode (20, 15, 10, 5...pips) 3- Addition of a function Global Profit decrement /increment size in pourcentage 4- E rror s correction in coding
I am currently seeking a highly skilled developer for an important project. I need a professional developer to convert an Indicator to tradingview on MT4. If you are highly skilled and capable of handling this project, kindly reach out now
I need a developer to make me a trade copier.. Trade on MetaTrader 4 to tradelocker. The best copier and easy to use. Let me know if you can do it. Thanks
i want an mt4 indicator Daily Opening Price (24 Range Horizontal Line) : Calculate the daily opening price based on the 24-hour range. Display this price as a horizontal line on the chart. Color the line green. 7:30 AM EST Opening Price (Orange Line) : Determine the opening price at 7:30 AM EST. Display this price as a horizontal line on the chart. Color the line orange. High and Low of the London Session (Blue
Can you convert my tradingview indicator into a mt4 ea ? Indicator called ut bot alerts on tradingview Its open script already Will my ea have same settings for the indicator as in the indicator version on tradingview ? And I need trailing input added Daily equity protector as well Also for inputs I need option for it to close existing trade when opposite confirmed Also input for time schedule to trade Like New York
Hello, I need a professional programmer to help me design an EA that can be able to take trades towards a market direction with accurate prediction. This EA should be able to identify the market trend direction and take multiple trades towards the direction and also able to close the trades together when market wants to reverse at the best profit level. The input at the beginning will be for the EA to be input with a
Looking for a developer to create an MT4 indicator and an EA / Robot. Indicator-based strategy consisting of several moving averages, PSAR Indicator and Pinescript indicator called Coral Trend Indicator by LazyBear (pinescript source code will be provided and will need converting to MT4 code - 34 lines of code). Strategy to be an intra-day trading period on 5-minute timeframe for the European session but “Trading”
Need a simple EA That opens a long position if the MA cross up above another MA and opens a short position if the MA cross down below another MA . - The EA should only allow for one position to be open at any given time. It should close the current position if it is going to open a new position. - I want to have option to input for a lot size, a stop loss, take profit, and an input for total profit/loss USD - I want
I am looking for a programmer to do EA trader. If you can understand what I want from the video i do and you can do it, contact me because you will be able to do what I want. https://drive.google.com/file/d/1wbHxbUQQqCkdpr0-pHfIh2b288LzYTV2/view?usp=sharing

Información sobre el proyecto

Presupuesto
30+ USD
Para el ejecutor
27 USD
Plazo límite de ejecución
de 1 a 10 día(s)