Looking for a coder to modify a loop

Lavoro terminato

Tempo di esecuzione 21 ore
Feedback del cliente
The best developer I have used here.
Feedback del dipendente
It was nice to work with the client. Thank you for the project.

Specifiche

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

Con risposta

1
Sviluppatore 1
Valutazioni
(250)
Progetti
313
28%
Arbitraggio
33
27% / 64%
In ritardo
10
3%
In elaborazione
2
Sviluppatore 2
Valutazioni
(101)
Progetti
122
30%
Arbitraggio
6
33% / 33%
In ritardo
5
4%
In elaborazione
3
Sviluppatore 3
Valutazioni
(390)
Progetti
416
30%
Arbitraggio
74
19% / 72%
In ritardo
52
13%
In elaborazione
4
Sviluppatore 4
Valutazioni
(177)
Progetti
279
65%
Arbitraggio
3
100% / 0%
In ritardo
65
23%
Gratuito
5
Sviluppatore 5
Valutazioni
(44)
Progetti
58
3%
Arbitraggio
7
0% / 57%
In ritardo
5
9%
In elaborazione
6
Sviluppatore 6
Valutazioni
(298)
Progetti
427
26%
Arbitraggio
18
61% / 33%
In ritardo
26
6%
Gratuito
Pubblicati: 8 codici
7
Sviluppatore 7
Valutazioni
(98)
Progetti
137
52%
Arbitraggio
5
40% / 60%
In ritardo
0
Gratuito
Ordini simili
Expert Advisor 30 - 2000 USD
Necesito un Expert Advisor simple para MT4 basado en una estrategia de scalping con sistema grid/martingala. 1. Lógica General El EA debe abrir una operación inicial (con opción de seleccionar dirección manual: Comprar / Vender / Ambas). Si la operación entra en drawdown, debe abrir posiciones adicionales basadas en una distancia fija en pips (pip step). Cada nueva posición debe aumentar el tamaño del lote según un
Buy EA 30+ USD
If you have a good EA, I am interested in buying it. But it must be genuine and profitable — no grid, no martingale, with fixed Stop Loss and Take Profit. Only those who have such an EA should reply
I need an EA 30+ USD
I need an EA that is performing well. I am interested in purchasing it, but only genuine sellers should reply. It must have verified live performance and past trading history
Hello, I'm looking to find out the cost of creating a mobile trading robot. I've tried to describe it as thoroughly as possible in the following document. I look forward to your response. I'd like to know the costs, delivery time, and how you plan to implement it before making a decision
I am offering a ready-to-use trading system that connects MetaTrader 4 signals with automated trading on Polymarket. The system is already fully developed and working. What the system does: The bot copies signals from a custom MT4 indicator and executes trades automatically on Polymarket prediction markets. How it works: A custom MT4 indicator generates BUY or SELL signals using buffers. When a signal appears, it is
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow 30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal
Hello, I am a user of the "BUY STOP SELL STOP V6" trading bot, which is an advanced Grid System bot. The bot is primarily designed for Gold (XAUUSD), but I want it to work on all currency pairs. "The bot contains a privacy/protection code that prevents it from running on other accounts or being modified on any platform, as it has a client account number lock mechanism" --- Bot Description & Current Settings Bot Type
I need Ea that executes trade based on trading view indicator called Market Structure CHoCH/BOS (Fractal) [LuxAlgo] I need developer to recreate the indicator as an Ea in MQL5 The core of the system will be a structured Market Structure engine that detects CHOCH (Change of Character) and BOS (Break of Structure) Signals will be confirmed once the indicator gave ( the bos/choch) no need to wait candle close
Looking to purchase a Good forex or gold/ BTC trading EA and it's source code. Must be compatible with low budget like less than $500 accounts, Must need no manual intervention and run fully automated. If you are interested in selling me the source code, please share the Read only account access where the EA has already been running on, so i can check past performance and get an idea on how it works or runs. Dont

Informazioni sul progetto

Budget
30+ USD
Scadenze
da 1 a 10 giorno(i)