Download MetaTrader 5
To add comments, please log in or register
MQL5 library has more than 1500 apps already. Contribute your own one!
strontiumDog
263
strontiumDog 2015.04.23 07:56 

Hello

I'm missing something which I cannot see easily on google.  Maybe I'm missing the point of header use.

I'm getting

'RefreshRates' - function not defined


when I compile a .mqh file.

The same applies for loads of other functions I'm trying to use in a header file.

How can I fix this?

honest_knave
969
honest_knave 2015.04.23 08:20  

I had a similar problem in the past when compiling .mqh files.

The compiler seemed to apply the rules for MQL5 not MQL4. In your case, RefreshRates() is not available in MQL5 (AFAIK SymbolInfoTick() negates the need for it).

I never actually solved the problem in the end. Hopefully someone else will be along shortly with an explanation/solution. Failing that, Service Desk. 

strontiumDog
263
strontiumDog 2015.04.23 11:02  
honest_knave:

I had a similar problem in the past when compiling .mqh files.

The compiler seemed to apply the rules for MQL5 not MQL4. In your case, RefreshRates() is not available in MQL5 (AFAIK SymbolInfoTick() negates the need for it).

I never actually solved the problem in the end. Hopefully someone else will be along shortly with an explanation/solution. Failing that, Service Desk. 

Thanks. Hoping someone can tell me I'm wrong in thinking this is a deliberate attempt to force devs to move to mql5.  Been there, went back to 4. 


whroeder1
13641
whroeder1 2015.04.23 12:46  
strontiumDog: 'RefreshRates' - function not defined when I compile a .mqh file.
Don't compile mqh files. Compile the mq4 file that includes the mqh.
strontiumDog
263
strontiumDog 2016.09.27 21:17  
Thanks WHRoeder, that was it.
/
To add comments, please log in or register