Looking for a coder to modify a loop

Tâche terminée

Temps d'exécution 21 heures
Commentaires du client
The best developer I have used here.
Commentaires de l'employé
It was nice to work with the client. Thank you for the project.

Spécifications

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

Répondu

1
Développeur 1
Évaluation
(131)
Projets
152
22%
Arbitrage
5
0% / 60%
En retard
4
3%
Travail
2
Développeur 2
Évaluation
(88)
Projets
104
35%
Arbitrage
5
40% / 20%
En retard
5
5%
Travail
3
Développeur 3
Évaluation
(374)
Projets
398
31%
Arbitrage
62
19% / 68%
En retard
50
13%
Chargé
4
Développeur 4
Évaluation
(150)
Projets
219
58%
Arbitrage
3
100% / 0%
En retard
45
21%
Chargé
5
Développeur 5
Évaluation
(41)
Projets
54
4%
Arbitrage
5
0% / 60%
En retard
4
7%
Gratuit
6
Développeur 6
Évaluation
(298)
Projets
427
26%
Arbitrage
18
61% / 33%
En retard
26
6%
Gratuit
7
Développeur 7
Évaluation
(97)
Projets
135
52%
Arbitrage
4
50% / 50%
En retard
0
Travail
Commandes similaires
Need to convert existing EA from MT4 to MT5 coding and design work is already there all details are already in the existing code of the MT4 EA should not require any further design work
I want to convert TV pine script into mt4 EA. TV screen shots attached for reference. Based on TV indicators convert into mt4 indicators and then develop EA. Further details will be discuss once project starts
Hey, I would like an indicator based on calculation with the last price, sort of fib. The lines will auto update based on actual price. I want you to create 3x this block(of line), lines positions will be diferent as the multiplier of the 3 blocks will not be the same. I want you to create a signal based on the price that will be at the same zone(inside 2 lines) in 3 blocks at same time. check the intruction.txt
I need a AI signal generating bot for forex trading. The bot should operate such that when i put it in a chart it will analyse the market, after several minutes it will display whether the trade is buying or selling. It should display the one minute, five minute,15minute, 30 minute, one hour, 4 hours and daily time frame whether they are buying or selling. If it is buying the arrow should be green and if it is
I need an expert who can combine bands, buy and sell arrows and 60% fibonaci retracement into a bot. I will send the rest of the specs to the selected applicant PLEASE KINDLY NOTE THAT I DONT HAVE THE SOURCE CODE FOR THE INDICATORS These are what I want the bot to look like for now; • When going for buys, price must touch the lower band, the buy arrow should appear on a candle, wait for that candle to close, then it
Trading EA 500 - 4000 USD
I want an EA with these Features that will work on mt4 , mt5 : 1. Trading 24/7 2. Connected to the news 3. Pauses during high effective news 4. Has a footprint tool for accurate signals 5. Always aims foe a higher profit 6. High frequency trading 7. Auto lot size 8. Capable to work on 1000$ capital and less 9. It works on any chart 10. Works on any chart 11. When it is installed in any chart or broker it will read
Recovery Zone Hedging 100 - 200 USD
Zone Recovery EA watch the video below to learn about Zone Recovery: Forex trading Strategy 100% winning trades!! WIN every trade you take!!! This will be a semi-auto EA with a user interface for order placement and relevant settings, not a complete EA that trades on its own. All the following things will be shown on the upper left side of chart: Breakeven line: based on current opening positions, at which price I
Quiero un EA personalizado para operar el par Eurousd Que tenga SL y TP En un horario específico Es una estrategia basada en rompimiento de estructura cuando el mercado rompa esa estructura que el EA tome una entrada por Buy Stop o Sell Stop
I need this simple robot converted to work on the new version of MT5 . It's a very basic robot that open trades at a certain time and that's all it dose. I need the robot to be converted, to work on current MT5 build . And mt5 back-testing As it stand the EA will open trades. But only at certain date and time. I want it to open a trade every day at the same time. And Date part removed When the trade closes it must
Looking for a great developer to develop an EA to send alerts to telegram . Alerts will be send from my mt5 indicator. More information will be provided to selected developer

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD
Délais
de 1 à 10 jour(s)