Looking for a coder to modify a loop

Trabalho concluído

Tempo de execução 21 horas
Comentário do cliente
The best developer I have used here.
Comentário do desenvolvedor
It was nice to work with the client. Thank you for the project.

Termos de Referência

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

Respondido

1
Desenvolvedor 1
Classificação
(131)
Projetos
152
22%
Arbitragem
5
0% / 60%
Expirado
4
3%
Ocupado
2
Desenvolvedor 2
Classificação
(89)
Projetos
105
34%
Arbitragem
5
40% / 20%
Expirado
5
5%
Carregado
3
Desenvolvedor 3
Classificação
(375)
Projetos
398
31%
Arbitragem
62
19% / 69%
Expirado
50
13%
Trabalhando
4
Desenvolvedor 4
Classificação
(150)
Projetos
220
58%
Arbitragem
3
100% / 0%
Expirado
45
20%
Carregado
5
Desenvolvedor 5
Classificação
(41)
Projetos
54
4%
Arbitragem
5
0% / 60%
Expirado
4
7%
Livre
6
Desenvolvedor 6
Classificação
(298)
Projetos
427
26%
Arbitragem
18
61% / 33%
Expirado
26
6%
Livre
7
Desenvolvedor 7
Classificação
(97)
Projetos
135
52%
Arbitragem
4
50% / 50%
Expirado
0
Trabalhando
Pedidos semelhantes
Dears, i am looking for developer to make expert advisor in forex to me and i have a strategy , i need the ea to be customize and has some options to be changeable
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
Hello, I have EA's which were previously developed that are not running correctly and giving errors. Need an experienced MQL developer to fix all issues as well as add some new settings. Thanks
MT5 hft bot 100 - 250 USD
HELLO I AM IN NEED OF HFT TRADING BOT FOR MT5 AND BEFORE WE PROCEEDS YOU MUST SHOW ME HOW YOUR BOT WORK OR SEND ME DEMO VERSION FIRST TO CHECK OUT YOUR BOT WORKING SYSTEM
I already have a Fibonacci based indicator which give precise entry as well as take profit and stop loss levels without repainting. I want to convert this to an EA so as to enable it pick trades automatically. Pay attention to the attached Images for entry and exit description. The EA will be protected with password or any other security protocols. THE EA OUTPUT will be in MQ4 & MQ5
// Define the properties input int ShortPeriod = 12; input int LongPeriod = 26; input double LotSize = 0.1; // OnTick function is called every time there is a price update void OnTick() { double shortMA = iMA(NULL, 0, ShortPeriod, 0, MODE_SMA, PRICE_CLOSE, 0); double longMA = iMA(NULL, 0, LongPeriod, 0, MODE_SMA, PRICE_CLOSE, 0); double prevShortMA = iMA(NULL, 0, ShortPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
Necesito un bot decente para prueba de fondeo y también cuenta personal, scalp, no grid, no martingale, no practicas prohibidas, algo objetivo, confiable y rentable... 5 Min mínimos de duración por operación, algo ya hecho y bactesteado en cuenta real y de fondeo. Necesito algo agresivo, constante pero que no exponga el capital... prefiero una estrategia de smc
Profit EA 50+ USD
//+------------------------------------------------------------------+ //| SimpleEA.mq4 | //| Generated by MetaEditor | //| https://www.mql5.com/en/docs&nbsp ; | //+------------------------------------------------------------------+ #property strict // Input parameters input double LotSize = 0.1; // Lot size input int MovingAveragePeriod = 50; // MA
I am looking for a day trading bot with over 95% success ratio for gold and forex. It should use all the relevant strategies like moving averages (10, 20, 50), volume, RSI and trend into consideration and then generate buy and sell trade automatically with trailing SL and generate max profit
Active expert 250+ USD
hi, I must do changes to a dashboard with manual input of trader and active expert. Budget 250$ Can do? the budget is correct based on job to do. If you want me to increase the budget you can message me

Informações sobre o projeto

Orçamento
30+ USD
Desenvolvedor
27 USD
Prazo
de 1 para 10 dias