Asesoría para convertir un programa de MQL4 a MQL5

Tâche terminée

Temps d'exécution 2 jours
Commentaires du client
Excelente resolvió mi problema en muy poco tiempo. espero trabajar con el de nuevo.

Spécifications

quiero convertir un programa y necesito asesoria para la conversion y aprender.

quiero mantener el mismo formato tanto como sea posible .

son varias funciones a convertir dejo ejemlo de una funcion.

bool Buy(int MagicIndex, double Lots, int StopLossMethod, double StopLossPoints, int TakeProfitMethod, double TakeProfitPoints, int Slippage, int MaxOpenTrades,
         int MaxFrequencyMins, string TradeComment)
{
   static double pipSize = 0;   
   if(pipSize == 0) pipSize = Point * (1 + 9 * (Digits == 3 || Digits == 5));

   double sl = 0, tp = 0;
   double stopLossPoints = 0, takeProfitPoints = 0;
   
   int numberOfOpenTrades = 0;
   
   for(int i=OrdersTotal()-1;i>=0;i--){
      if(!OrderSelect(i, SELECT_BY_POS)) continue;
      if(OrderMagicNumber() != __STRATEGY_MAGIC + MagicIndex || OrderSymbol() != Symbol()) continue;
      numberOfOpenTrades ++;    
   }   

   if(MaxOpenTrades > 0 && numberOfOpenTrades >= MaxOpenTrades) return(false);       
  
   if(MaxFrequencyMins  > 0)
   {   
      int recentSeconds = MaxFrequencyMins * 60;

      for(int i=OrdersTotal()-1;i>=0;i--){
         if(!OrderSelect(i, SELECT_BY_POS)) continue;
         if(OrderMagicNumber() != __STRATEGY_MAGIC + MagicIndex || OrderSymbol() != Symbol()) continue;
         if(TimeCurrent() - OrderOpenTime() < recentSeconds) return(false);
      }  

      int hstTotal=OrdersHistoryTotal();
   
      for(int i=hstTotal-1;i>=0;i--)
      {  
         if(!OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) continue;
         if(OrderMagicNumber() != __STRATEGY_MAGIC + MagicIndex || OrderSymbol() != Symbol()) continue;      
         if(TimeCurrent() - OrderOpenTime() < recentSeconds) return(false);
         break;            
      }  
   }
   
   if(Lots < MarketInfo(Symbol(),MODE_MINLOT)) return(false);
   
   if(AccountFreeMarginCheck(Symbol(), OP_SELL,Lots) <= 0) {
      Print("Buy error: insufficient capital");
      return(false);
   }   

   if (StopLossPoints > 0)
   {
      if(StopLossMethod == 0)
      {
         sl = NormalizeDouble(Ask - StopLossPoints * Point, Digits);
         stopLossPoints = StopLossPoints;
      }
      else if (StopLossMethod == 1)
      {
         sl = NormalizeDouble(Ask - StopLossPoints * pipSize, Digits);
         stopLossPoints = StopLossPoints * (1 + 9 * (Digits == 3 || Digits == 5));
      }
      else
      {
         sl  = StopLossPoints;
         stopLossPoints = (Ask - sl)/Point; 
      }
   }
   
   if (TakeProfitPoints > 0)
   {
      if(TakeProfitMethod == 0)
      {
         tp = NormalizeDouble(Ask + TakeProfitPoints * Point, Digits);
         takeProfitPoints = TakeProfitPoints;
      }
      else if (TakeProfitMethod == 1)
      {
         tp = NormalizeDouble(Ask + TakeProfitPoints * pipSize, Digits);
         takeProfitPoints = TakeProfitPoints * (1 + 9 * (Digits == 3 || Digits == 5));
      }
      else
      {
         tp = TakeProfitPoints;
         takeProfitPoints = (tp - Ask)/Point; 
      }
   }  
   
   double stopLevel = MarketInfo(Symbol(),MODE_STOPLEVEL) + MarketInfo(Symbol(),MODE_SPREAD);
   
   if( (sl > 0 && stopLossPoints <= stopLevel) || (tp > 0 && takeProfitPoints <= stopLevel) )
   {
      Print("Cannot Buy: Stop loss and take profit must be at least " 
      + DoubleToStr(MarketInfo(Symbol(),MODE_STOPLEVEL) + MarketInfo(Symbol(),MODE_SPREAD),0) 
      + " points away from the current price");
      return (false);
   }
          
   RefreshRates();
        int result = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, sl, tp, " " + "(" + WindowExpertName() + ") " + TradeComment, __STRATEGY_MAGIC + MagicIndex);
        
        if (result == -1){
                Print("Failed to Buy: " + IntegerToString(GetLastError()));
                Sleep(__SLEEP_AFTER_EXECUTION_FAIL);
           return(false); 
        }
         
   return(true); 
}


Répondu

1
Développeur 1
Évaluation
(261)
Projets
425
38%
Arbitrage
86
44% / 19%
En retard
71
17%
Chargé
2
Développeur 2
Évaluation
(78)
Projets
117
47%
Arbitrage
7
14% / 29%
En retard
11
9%
Gratuit
Commandes similaires
Necesito desarrollar una copiadora en la que existan parámetros para ajustar el riesgo de una cuenta a otra y que se pueda copiar a varias cuentas cada uno de los trades
debe superarlas Usando metatrader 5, Bot hft que supere las cuentas de fondeo de las empresas TopTen Funding y Be FUNDING que usan indices sintéticos debe consultar las reglas para la superación de dichos challenge y construir el EA basado en ella
Hola solicito automatizar unos indicadores, para Mt4, pero analizar las posibilidades de automatizar, 2 indicadores pero primero automatizaras uno y después el otro, tengo que analizar que el primero trabaja bien, si logra trabajar bien pasamos al siguiente indicador
debe superarlas Usando metatrader 5, Bot hft que supere las cuentas de fondeo de las empresas TopTen Funding y Be FUNDING que usan indices sintéticos debe consultar las reglas para la superación de dichos challenge y construir el EA basado en ellas
Estrategia Wyckoff 30 - 60 USD
En primer lugar necesito que el EA dibuje un rectángulo cada vez que se forme una tendencia lateral. Ok objetivo de eso es que dibuje el trading range que explica wyckoff en su metodología. Este trading range deberá tener como soporte el último bajo en tendencia bajista y como resistencia el último máximo de la tendencia bajista y viceversa. una vez establecido el trading range se deben establecer alarmas en la
Hiring MQL5 Programmer Job Description: We are seeking a full-time MQL5 programmer to join our team. The successful candidate will work closely with me on a range of projects, including the development and correction of trading algorithms and formulas. The work schedule is from 11 am to 5 pm, Mexico time (UTC-6). Responsibilities: Develop and optimize a Cointegration Strategy EA bot. Develop and optimize trading bots
hola nesecito un desarrollador para que me creen un bot con una estrategia probada y ganadora.también que sea fácil de utilizar con tutoriales de vídeo y explicación del mismo dejo mí número+54 2241557395
Optimizacion de EAs 30 - 150 USD
Cordial saludo, estoy en busqueda de alguien que me ayude a optimizar un EAs desde 0 para asi poder encontrar unos 3-4 setfiles en diferentes activos, es un bot tipo grid. Mi numero de whatsapp es +573136776608, estoy al pendiente para que me escriban y coordinemos una cotizacion. Casi no reviso este sistema de mensajes asi que preferiria que me escribieran al whatsapp
Estrategia de rango 50 - 100 USD
Solicito programador que me ayude a desarrollar un bot con una estrategia ya probada y rentable. La estrategia consiste en abrir dos entradas tipo stop, en un horario determinado en un activo en específico, Quedo atento a sus comentarios
Buenas necesito arreglar un Robot mt4 que no se porque no me mete Todos los trades Que Deberia en cada Cruce del indicador, al arreglar eso solo abria que ver que todos los parametros funcionen correctamente y dejarlo listo Funcionando en forex,oro e indices

Informations sur le projet

Budget
40+ USD
Pour le développeur
36 USD