Download MetaTrader 5
To add comments, please log in or register
Publish your article. Millions of traders are looking for good ideas!
Liangjun Qi
1150
Liangjun Qi 2016.04.04 11:43 

I  found many function they can't use the "PERIOD_H4" and  "PERIOD_H1" as parametre in Mql5. 

a simple example:

  if ( Bars( _Symbol , PERIOD_H4 ) < 100  )  return;

it can't be compiled and return this error information :  'Bars' - no one of the overloads can be applied to the function call.

This bug so big and parrent, please correct it hurry. 

if you fond thd solution  Please try it in Mql5  af first.   I can forecast that your solution is unuseful.


Nikolaos Pantzos
10239
Nikolaos Pantzos 2016.04.04 11:58  
Liangjun Qi:

I  found many function they can't use the "PERIOD_H4" and  "PERIOD_H1" as parametre in Mql5. 

a simple example:

  if(Bars(_Symbol,PERIOD_H4))<100 ) return;

it can't be compiled and return this error information :  'Bars' - no one of the overloads can be applied to the function call.

this bug so big and parrent, please correct it hurry. 


Try iBars(...,...)
Liangjun Qi
1150
Liangjun Qi 2016.04.04 12:03  

Please pay attention to: it is in MQL5.  It there isn't the "iBars" function but "Bars" .

Marco vd Heijden
Moderator
4079
Marco vd Heijden 2016.04.04 12:08  
if(Bars(_Symbol,PERIOD_H4)<100) return;
Damian Mateusz Dziadosz
5049
Damian Mateusz Dziadosz 2016.04.04 12:09  
count the parenthesis maybe there is the error.
Liangjun Qi
1150
Liangjun Qi 2016.04.04 12:17  
Marco vd Heijden:
unuseful, please try it.
Liangjun Qi
1150
Liangjun Qi 2016.04.04 12:18  
Damian Mateusz Dziadosz:
count the parenthesis maybe there is the error.
unuseful, please try it.
Damian Mateusz Dziadosz
5049
Damian Mateusz Dziadosz 2016.04.04 12:29  
Liangjun Qi:
unuseful, please try it.
if(Bars(_Symbol,PERIOD_H4)<100) return(0);
try this
Alain Verleyen
Moderator
28672
Alain Verleyen 2016.04.04 14:46  
Liangjun Qi:

I  found many function they can't use the "PERIOD_H4" and  "PERIOD_H1" as parametre in Mql5. 

a simple example:

  if ( Bars( _Symbol , PERIOD_H4 ) < 100  )  return;

it can't be compiled and return this error information :  'Bars' - no one of the overloads can be applied to the function call.

This bug so big and parrent, please correct it hurry. 

if you fond thd solution  Please try it in Mql5  af first.   I can forecast that your solution is unuseful.


There is no problem to compile this code. Build 1295.
Liangjun Qi
1150
Liangjun Qi 2016.04.05 06:28  
Liangjun Qi:

I  found many function they can't use the "PERIOD_H4" and  "PERIOD_H1" as parametre in Mql5. 

a simple example:

  if ( Bars( _Symbol , PERIOD_H4 ) < 100  )  return;

it can't be compiled and return this error information :  'Bars' - no one of the overloads can be applied to the function call.

This bug so big and parrent, please correct it hurry. 

if you fond thd solution  Please try it in Mql5  af first.   I can forecast that your solution is unuseful.


Sorrry, every one. I found I have set "PERIOD_H4=6" as the head part of the EA which was from a replacing operation , so the "PERIOD_H4" can't be used here.
/
To add comments, please log in or register