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
(146)
Proyectos
175
23%
Arbitraje
7
29% / 43%
Caducado
4
2%
Ocupado
2
Desarrollador 2
Evaluación
(94)
Proyectos
112
33%
Arbitraje
5
40% / 20%
Caducado
5
4%
Libre
3
Desarrollador 3
Evaluación
(378)
Proyectos
401
31%
Arbitraje
62
19% / 69%
Caducado
51
13%
Trabajando
4
Desarrollador 4
Evaluación
(154)
Proyectos
229
58%
Arbitraje
3
100% / 0%
Caducado
48
21%
Trabaja
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 need an expert to help me with adding more features to my existing mt4 EA I think the addition I want added to this EA is fairly simple--but I don't really understand how programming works, Contact me for a long term work, This is not the only project, I will explain the features in the inbox, Let me know if you can do it
I have an indicator with two lines | want an EA the buy when the fast line crosses the slow line from below one important thing> the slow line must at least a specific distance below the last cross through the fast line from above take profit is between 1 or 3 times more than stoploss the stop loss is the last low the sell order is the opposite for buy Thanks
**Project Title:** Development of a Complex High-Performance EA for Step Index **Project Overview:** I need an advanced Expert Advisor (EA) for trading the Step Index on MetaTrader 5. The EA should use multiple indicators and advanced risk management techniques to enhance profitability and manage risks effectively. **Trading Strategy Details:** Indicators: - 50-period EMA - 200-period EMA - RSI with 14 periods - MACD
NEED IT WITHIN ONE HOUR Adding a counter for open trades. When closed counter gets to 0 and starts runs till the input again. Also a option to just let it run once a day or for the whole day non stops My past developer wasn't able to get the close function end of the day working. The function works as follow: MONDAY TUESDAY etc.... TRUE OR FALSE When trades have been opened on MONDAY TRUE it lets them run on TUESDAY
Hi, I am looking to purchase a pre-built trading strategy specifically tailored for trading AUXUSD. Before committing to the purchase, I require the following detailed information: 1. **Type of Trading**: - Clearly define the trading style this strategy is designed for (e.g., scalping, swing trading, day trading, position trading, etc.). - Provide an explanation of why this trading style is suitable for AUXUSD
Fx Kidds 80 - 120 USD
Can l have a EA that can run 24/5 on gold and GBPUSD and stocks. Trilling stop loss. No expireing date. Must make 5% minimum in returns. It can take losses but it must not blow the account minimum deposit must be 35usd
200 pip EA 100 - 200 USD
I require an EA that can deliver on a consistent basis 200 pips per month. The EA must do this with the money management setting where 1 pip = 1 USD
1st Scenario: 4-Candle Setup (Breakout and Retest) Step 1: Breakout Candle: The price breaks above the EMA 50. Step 2: Retest Candle: After the breakout, look for a bearish (red) candle that touches the EMA. Step 3: Entry Candle: Identify a bullish (green) candle that closes above the EMA. Step 4: Trade Candle: Enter the trade when the price crosses 2 pips above the high of the bullish entry candle. RSI Confirmation
required a bot based on ict ,smc technique order blocks fvg liqidity voids liquidity sweep break of structure eqal low and equal high momentup setup trend recogonsation kkldnvksldnvksdnvlkdsnvlkdsnvlksndlkvnsdklvnlskdvnlksdnvsdvmsldkmv lksdnvlksnl knsdkl nsdlkv sdlkv mslkn vlskdm lksm ,v njdfnv lkjdfnvlkmfsn lfn kdfm vfmmvlkmvlksdmv
Develop a robot for Mac M3 chip which can: 1) Auto copy - take and close trades 2) Minise risk 3) Scale profits 4) Ideally be able to trade in multiple markets or whichever market can bring plenty of trading opportunities. 5) Can be used on mobile (iPhone) and Mac. You can implement it on MT4 or MT5 - whichever will integrate with the robot better. You can use any programming language so long as it serves the

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)