Useful features from KimIV porting to mql5 + my own attempts....

 

In this thread I will post the source code of functions developed by virtuoso programmer KimIV in MQL4 and ported by me to mql5, give examples of their use and answer questions related to their use.

UPD: Some individuals have decided to get in the way! So I'll make a spoof of the functions in the first post until others decide to clean up the thread...


Here's the first feature:

//+----------------------------------------------------------------------------+
//|  Автор         : Ким Игорь В. aka KimIV,  http://www.kimiv.ru       |
//|  Модификация: Самигуллин Зуфар С. http://samiullin.moikrug.ru |
//+----------------------------------------------------------------------------+
//|  Версия        : 14.08.2009                                             |
//|  Описание     : Возвращает наименование таймфрейма     |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                            |
//|  TimeFrame - таймфрейм (количество секунд) (0 - текущий ТФ)|
//+----------------------------------------------------------------------------+
string GetNameTF(int TimeFrame=0) {
  if ( TimeFrame==0) TimeFrame=Period();
  switch ( TimeFrame) {
    case PERIOD_M1:  return("M1");
    case PERIOD_M2:  return("M2");
    case PERIOD_M3:  return("M3");
    case PERIOD_M4:  return("M4");
    case PERIOD_M5:  return("M5");
    case PERIOD_M6:  return("M6");
    case PERIOD_M10: return("M10");
    case PERIOD_M12: return("M12");
    case PERIOD_M15: return("M15");
    case PERIOD_M20: return("M20");
    case PERIOD_M30: return("M30");
    case PERIOD_H1:  return("H1");
    case PERIOD_H2:  return("H2");
    case PERIOD_H3:  return("H3");
    case PERIOD_H4:  return("H4");
    case PERIOD_H6:  return("H6");
    case PERIOD_H8:  return("H8");
    case PERIOD_H12: return("H12");
    case PERIOD_D1:  return("Daily");
    case PERIOD_W1:  return("Weekly");
    case PERIOD_MN1: return("Monthly");
    default:         return("Unknown Period");
  }
}
 
Is there an mql5 compiler?
 
Is there an agreement with Igor on the use of his scripts or what?
 
gip писал(а) >>
Is there an agreement with Igor on using his scripts or what?

Yes, as always and before that. :-)

 
sayfuji >> :
Is there an mql5 compiler?

There is no compiler yet, nor is there a terminal...

 
gip >> :
Is there an agreement with Igor on using his scripts or what?

>> Yes, there is!

 
Roger >> :

Yes, as always and before that. :-)

I don't get it...

 
xweblanser писал(а) >>

I don't get it...

What's not to understand is if you're not caught, you're not a thief, but if...

 
xweblanser >> :

>> I do!

Does he already know about it?

 
xweblanser >> :

>> I do!

Then the next question: why should you post your creations, if you can't program in MQL? There is no value in such scripts. Or do you hope to learn it by the time mql5 comes out?

 
gip >> :

Then the next question is: why post your creations if you can't program in MQL? There is no value in such scripts. Or are you hoping to learn how to do it by the time mql5 comes out?

Who said I can't write in MQL?