Download MetaTrader 5

Syntax help on build 600+

To add comments, please log in or register
trader88888
134
trader88888  

Hello,

 

I had this line of code in an indicator previous to build 600 but for some reason I get an error on the newer builds of MT4 and was wondering if someone could help me resolve this... the error i'm getting is:

 

static datetime Time.open;

 

"." semicolon expected  

 

Is there a newer way of writing this and if you could show me how that would be truly amazing.  Thank you to all! 

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
static datetime Time.open;

Just remove the dot and you are good to go. Only MT5 can use the dot like that.

trader88888
134
trader88888  
Thank you deysmacro, very much appreciated for the assistance.  do you know if "time.open" was a specific value that when i remove the .  that i would be removing a stored value?  (hope that makes sense, im not a developer) :-)
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
It would update it necessarily. Depends on how the code is done.
Keith Watford
Moderator
9641
Keith Watford  

First check for a variable name that does not exist

maybe time_open 

Using Ctrl +f search for time_open, if it doesn't exist, use Ctrl + h and replace all instances of time.open with time_open

Obviously if time_open does already exist, use a different name for the variable. 

To add comments, please log in or register