Pleae help me. Multi Array Bug. Bars(_Symbol, Time_Frame[i] );

 
ssaboss 2018.02.04 14:27    KO

Pleae help me.  Multi Array Bug. Bars(_Symbol, Time_Frame[i] );

int Time_Frame[9] = {43200,10080,1440,240,60,30,15,5,1};

for(int i=0; i<9; i++)  Alert(i,"      ",Bars(_Symbol, Time_Frame[i] );


Result:

Bars - no one of the overloads can be appied to the function call

 built-in int Bars(const string ENUM_TIMEFRAMES.datetime)

 built-in int Bars(const string ENUM_TIMEFRAMES)

 

Please use the </> button to insert your code.


 
Eleni Anna Branou:

Please use the </> button to insert your code.


Thank you so mouch

 
Eleni Anna Branou:

Please use the </> button to insert your code.


i'v settled.

int Time_Frame[9] = {43200,10080,1440,240,60,30,15,5,1};-> 

ENUM_TIMEFRAMES TIME_FRAME[9]={PERIOD_MN1,PERIOD_W1,PERIOD_D1,PERIOD_H4,PERIOD_H1,PERIOD_M30,PERIOD_M15,PERIOD_M5,PERIOD_M1}; //changed OK.

 
  1. What part of using the CODE button was unclear to you? You were asked (#1) and you quoted it (#2, and #3) and yet you still didn't.
    When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum

  2. Bars(_Symbol, Time_Frame[i] );
    On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors.
              Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum

    On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
              Timeseries and Indicators Access /  Data Access - Reference on algorithmic/automated trading language for MetaTrader 5

Reason: