Download MetaTrader 5
To add comments, please log in or register
Share your knowledge. Become a well-known developer!
Horst Schlämmer
18
Horst Schlämmer 2014.04.06 14:12 

Hi,


please, beginner needs some help:

after having updated MT4 to MetaEditor Build 914, all functions like iHigh(0,0,1), iClose.... have the value 0.

i.e. : Highbar1 = iHigh(0,0,1); ---> HighBar1 = 0 ---> Error is 4054 (Displayed Chart is EUR/USD, H1)

(Before updating, these function were displayed in green Color, now its the same color like a maths-function.)

High[1] works.

And Indicators are not shown in the visual window after a system Test

What maybe the problem ?

Please, give me some understanding.


Thanks

Mark

Keith Watford
Moderator
8006
Keith Watford 2014.04.06 14:31  
iHigh(0,0,1)
I think that you will find that 0 is not valid, use Symbol() or NULL for current symbol
Toast
220
Toast 2014.04.06 14:45  

To follow up GumRai's post, see https://www.mql5.com/en/articles/1391

2.3. Use of 0 instead of NULL for the current character

In the old version of the compiler 0 (zero) could be used as an argument in functions that require specification of a financial instrument.

For example, the value of the Moving Average technical indicator for the current symbol could be requested as follows:

AlligatorJawsBuffer[i]=iMA(0,0,13,8,MODE_SMMA,PRICE_MEDIAN,i);    // incorrect

In the new compiler you should explicitly specify NULL to specify the current symbol:

AlligatorJawsBuffer[i]=iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,i); // correct

In addition, the current symbol and chart period can be specified using the Symbol() and Period() functions.

AlligatorJawsBuffer[i]=iMA(Symbol(),Period(),13,8,MODE_SMMA,PRICE_MEDIAN,i); // correct
Horst Schlämmer
18
Horst Schlämmer 2014.04.06 15:12  
GumRai:
I think that you will find that 0 is not valid, use Symbol() or NULL for current symbol
100 times paste :-)

everything works again, thank you very much, GumRai

Horst Schlämmer
18
Horst Schlämmer 2014.04.06 15:14  
toast:

To follow up GumRai's post, see https://www.mql5.com/en/articles/1391


OK, i got it,

thank you for giving me understanding, toast

/
To add comments, please log in or register