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
(164)
Progetti
195
27%
Arbitraggio
10
20% / 30%
In ritardo
5
3%
Occupato
2
Sviluppatore 2
Valutazioni
(94)
Progetti
112
33%
Arbitraggio
5
40% / 20%
In ritardo
5
4%
In elaborazione
3
Sviluppatore 3
Valutazioni
(383)
Progetti
406
31%
Arbitraggio
64
19% / 69%
In ritardo
52
13%
Caricato
4
Sviluppatore 4
Valutazioni
(157)
Progetti
236
59%
Arbitraggio
3
100% / 0%
In ritardo
50
21%
In elaborazione
5
Sviluppatore 5
Valutazioni
(42)
Progetti
55
4%
Arbitraggio
5
0% / 60%
In ritardo
4
7%
Gratuito
6
Sviluppatore 6
Valutazioni
(298)
Progetti
427
26%
Arbitraggio
18
61% / 33%
In ritardo
26
6%
Gratuito
7
Sviluppatore 7
Valutazioni
(97)
Progetti
135
52%
Arbitraggio
4
50% / 50%
In ritardo
0
In elaborazione
Ordini simili
Man on mayhem 30 - 100 USD
1. The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction. 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below
Hi, Expert should be Brazilian. I need the scalping ea for xauusd, usdjpy, AUDUSD, eurusd, gbpusd, nzdusd, uascad and usdchf with any strategy. But don't use buy limit in down trend and sell limit in sell trend. I need the profit with 0.5 usd minimum per trade
MQL5 Automation 30 - 100 USD
I need to automate a trading strategy on mt5. i have the python script executing rightly. but i need to convert to mql5 and also automate the strategy robotically. Anyone with experience should reach out for further explanation
Expert advisor 100+ USD
convert pine script to mt5 indicator and then making a EA for it. the indicators used here will be smma and trendline with breaks. will provide pine script for intrested developers
hey guys i have already code an EA in pine language on tradingview and i need help deploying and converting the robot into mt5 as I'm not seeing the same results in the two platforms
EA 100+ USD
Hi Everyone, I am looking to hire a developer to create an Expert Advisor (EA) for MetaTrader 5, utilizing two custom indicators: Trendline with breaks and SMMA . The EA should be designed based on specific trading conditions which I will detail below, and it should also include comprehensive optimization and backtesting. Project Details: Indicators to be Used: Trendline with breaks Indicator : Should generate
Hello everyone I'm searching for a Renko EA which is of course profitable. As far as I know prop firms or brokers in general don't offer the renko chart so it must be calculated manually. The renko also doesn't print a new block at every candle like the heikin ashi. I guess if we could combine heikin ashi candles incl. Renko then it's a strong momentum for a reversal. Would love to see what you already built in this
i need an expert who has experience and can help me with my project, I want to extract a hidden source code (pine script) from an Tradingview Indicator. and i need it to be done as soon as possible, If you are an expert on this field kindly comments
Hello, T o obtain the complete specifications for my backtesting project. Would you kindly get in touch with me right away so that I may elaborate on the details? then, as soon as you get a better image, you can get to work on it
Preciso de Formação ou de Alguém com Conhecimentos em Machine Learning para Analisar Expert Advisor já Existente em MT4 ou MT5.O Intuito deste Projeto é o de Melhorar um Expert Advisor Já Existente. Alguém Disponível

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD
Scadenze
da 1 a 10 giorno(i)