_Periods

Discussion in 'MetaTrader 5' started by samjesse, Nov 1, 2011.

  1. samjesse

    samjesse Active Trader

    118
    0
    27
    Hi
    Code (MQL5):

       ENUM_TIMEFRAMES periods[5];

          periods[0] = PERIOD_M1;    
          periods[1] = PERIOD_M5;
          periods[2] = PERIOD_H1;            
          periods[3] = PERIOD_H4;
          periods[4] = PERIOD_D1;

    //inside a loop
    FileWrite(filehandle, myObj.periods[j]);
    /* prints
    1
    5
    16385
    16388
    16408
    */


     
    What do these numbers represent?

    thx
     
    Last edited by a moderator: Sep 28, 2015
  2. Enivid

    Enivid Administrator Staff Member

    11,012
    404
    114
    Probably just the integer representations of ENUM_TIMEFRAMES.
     
    Ervin Samue likes this.
  3. Ervin Samue

    Ervin Samue Trader

    40
    8
    24
    Maybe, trying to convert enum.
     
  4. Think Pad

    Think Pad Trader

    10
    0
    12
    The _Period variable contains the value of the timeframe of the current chart.

    Also you may use the Period() function.
     

Share This Page