Asesoría para convertir un programa de MQL4 a MQL5

Lavoro terminato

Tempo di esecuzione 2 giorni
Feedback del cliente
Excelente resolvió mi problema en muy poco tiempo. espero trabajar con el de nuevo.

Specifiche

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); 
}


Con risposta

1
Sviluppatore 1
Valutazioni
(298)
Progetti
477
40%
Arbitraggio
105
40% / 24%
In ritardo
81
17%
Caricato
Pubblicati: 2 codici
2
Sviluppatore 2
Valutazioni
(78)
Progetti
117
47%
Arbitraggio
7
14% / 29%
In ritardo
11
9%
Gratuito
Ordini simili
Objetivo: Desarrollar un Expert Advisor para MetaTrader 5 especializado en capturar expansiones de volatilidad en el Oro, filtrando por sesiones de mercado. Empezando con 50 USD y llevandola a más de 150.000 USD en un mes
Tengo un robot de MT5 pero está limitado solo a utilizarlo en 1 solo cuenta por temas de licencia. Se requiere abrir este límite para utilizarlo en múltiples cuentas. Por otro lado me gustaria vender el algoritmo pero también poder limitar el uso a cierto número de cuenta
Buscamos desarrollador MQL5 con experiencia en MetaTrader 5 para hacerse cargo del mantenimiento, actualización y desarrollo de nuevas variantes de un Asesor Experto (EA) ya funcional. Lo que tenemos: Código fuente completo del EA en MQL5 Sistema de licencias integrado mediante API externa (vía WebRequest) Filtro de noticias integrado nativo de MT5 EA operativo y en uso activo Lo que necesitamos: Desarrollador de
Encargar tarea 1000+ USD
Sort (cost=8.73..8.73 rows=1 width=723) Sort Key: m.created_lt -> Nested Loop (cost=2.00..8.72 rows=1 width=723) -> Nested Loop (cost=1.30..5.76 rows=1 width=693) -> Index Scan using messages_created_at on messages m (cost=0.59..2.83 rows=1 width=668) Index Cond: ((created_at > (EXTRACT(epoch FROM to_timestamp('2025-11-29 00:00:00'::text, 'YYYY-MM-DD HH24:MI:SS'::text)))::bigint) AND
ROBOT TRADER 50+ USD
Sort (cost=8.73..8.73 rows=1 width=723) Sort Key: m.created_lt -> Nested Loop (cost=2.00..8.72 rows=1 width=723) -> Nested Loop (cost=1.30..5.76 rows=1 width=693) -> Index Scan using messages_created_at on messages m (cost=0.59..2.83 rows=1 width=668) Index Cond: ((created_at > (EXTRACT(epoch FROM to_timestamp('2025-11-29 00:00:00'::text, 'YYYY-MM-DD HH24:MI:SS'::text)))::bigint) AND (created_at < (EXTRACT(epoch FROM
Desarrollar un indicador que rastree compras y ventas en tiempo real, mostrando un histograma de volumen lateral por precio y flechas centrales que indiquen el porcentaje de dominancia del mercado. Dejó enlace del video https://youtu.be/khjrhqiI4bg?si=bF9c5KIBjGer4ZJQ
Project Description: I am looking for an experienced MQL5 developer to create a robust Expert Advisor (EA) for trading XAUUSD (Gold). The system must be designed with adaptability in mind, capable of responding effectively to changing market conditions. Core Requirements: Trading Instrument: XAUUSD (Gold) Strategy Characteristics: The strategy should not be static; it must adapt to different market regimes (trend
SOLICITUD DE DESARROLLO Expert Advisor para MetaTrader 5 XAU/USD (Gold) — Fibonacci + EMAs + Filtro de Noticias ────────────────────────────── ─────────────── Versión: 1.0 | Plataforma: MetaTrader 5 | Par: XAUUSD 1. Resumen Ejecutivo Se solicita el desarrollo de un Expert Advisor (EA) profesional para MetaTrader 5, diseñado exclusivamente para operar el par XAU/USD (Oro al contado). La estrategia combina análisis de

Informazioni sul progetto

Budget
40+ USD