Discussione sull’articolo "Migrazione da MQL4 a MQL5" - pagina 12

 

Si noti che

#define OBJPROP_TIME1 300

#define OBJPROP_PRICE1 301

#define OBJPROP_TIME2 302

#define OBJPROP_PRICE2 303

#define OBJPROP_TIME3 304

#define OBJPROP_PRICE3 305


Non sono mostrati in questo post, potete trovarli scaricando il file.

 

Salve,


Credo che manchi l'ultimo '}' nella definizione di SetIndexStyleMQL4.


Grazie per l'articolo, davvero utile :)


Lucian

 
bool IsTesting()
bool MQLInfoInteger(MQL_TESTER)
bool IsTradeAllowed()
bool MQLInfoInteger(MQL_TRADE_ALLOWED)
bool IsVisualMode()
bool MQLInfoInteger(MQL_VISUAL_MODE)
Migrating from MQL4 to MQL5
Migrating from MQL4 to MQL5
  • www.mql5.com
Practical Application Of Databases For Markets Analysis Working with data has become the main task for modern software - both for standalone and network applications. To solve this problem a specialized software were created. These are Database Management Systems (DBMS), that can structure, systematize and organize data for their computer...
 
ENUM_TIMEFRAMES TFMigrate(int tf)
  {
   switch(tf)
     {
      case 0: return(PERIOD_CURRENT);
      case 1: return(PERIOD_M1);
      case 5: return(PERIOD_M5);
      case 15: return(PERIOD_M15);
      case 30: return(PERIOD_M30);
      case 60: return(PERIOD_H1);
      case 240: return(PERIOD_H4);
      case 1440: return(PERIOD_D1);
      case 10080: return(PERIOD_W1);
      case 43200: return(PERIOD_MN1);
      
      case 2: return(PERIOD_M2);
      case 3: return(PERIOD_M3);
      case 4: return(PERIOD_M4);      
      case 6: return(PERIOD_M6);
      case 10: return(PERIOD_M10);
      case 12: return(PERIOD_M12);
 //    case 16385: return(PERIOD_H1);
       case 16386: return(PERIOD_H2);
      case 16387: return(PERIOD_H3);
      case 16388: return(PERIOD_H4);
      case 16390: return(PERIOD_H6);
      case 16392: return(PERIOD_H8);
      case 16396: return(PERIOD_H12);
      case 16408: return(PERIOD_D1);
      case 32769: return(PERIOD_W1);
      case 49153: return(PERIOD_MN1);      
      default: return(PERIOD_CURRENT);
     }
  }
 

campo minato


 

Ciao,

Questo vecchio articolo (maggio 2010, più di 11 anni fa!) è stato uno dei primi a cercare di semplificare il processo di migrazione di uno script/EA da MQL4 a MQL5. Nel frattempo, è stato creato il popolare mql4compat.mqh, e ho appena pubblicato una versione mantenuta di mql4compat su github per le persone interessate: https: //github.com/eromawyn/mql4compat

GitHub - eromawyn/mql4compat: MQL4 to MQL5 compatibility library
GitHub - eromawyn/mql4compat: MQL4 to MQL5 compatibility library
  • github.com
MQL4 to MQL5 compatibility library. Contribute to eromawyn/mql4compat development by creating an account on GitHub.
 
Salve, sto lottando con queste funzioni (vedi sotto) e continuo a ricevere questi errori. Per favore, aiutatemi a risolvere il problema. Funzioni
 
Samson Mthande Mashabane # :
Salve, sto lottando con queste funzioni (vedi sotto) e continuo a ricevere questi errori. Vi prego di aiutarmi a risolverli.

Un'immagine va bene, ma è necessario un codice MQL5. È necessario inserire il codice utilizzando il pulsante Codice

 

La sezione 19 contiene informazioni errate. La funzione

void HideTestIndicators(bool hide)

ha un analogo in MQL5

void TesterHideIndicators(bool hide)
Документация по MQL5: Общие функции / TesterHideIndicators
Документация по MQL5: Общие функции / TesterHideIndicators
  • www.mql5.com
TesterHideIndicators - Общие функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

Ciao Ragazzi, grazie mille per il grande lavoro.

Ho avuto un problema nel far funzionare i frattali durante la conversione da MT4 ... questo aiuta a restituire 0 invece di EMPTY_VALUE... spero che questo sia il posto giusto per postare, grazie.

double iFractals4(string symbol,
                     int tf,
                     int mode,
                     int shift)
  {
   ENUM_TIMEFRAMES timeframe=TFMigrate(tf);
   int handle=iFractals(symbol,timeframe);
   if(handle<0)
     {
      Print("The iFractals object is not created: Error",GetLastError());
      return(-1);
     }
   else
   {
   double buffer=CopyBufferMQL4(handle,mode-1,shift);
      if (buffer!=EMPTY_VALUE) return(CopyBufferMQL4(handle,mode-1,shift));
      else return(0);
      }
  }