Not a bug, more like improper design. This however is normal, and should be used in following way:
datetime t = (datetime) ObjectGet(nam, OBJPROP_TIME1);
color c = (color) ObjectGet(nam, OBJPROP_COLOR);
Learn about casting, read C/C++ literature.
Also you should learn about difference between warnings and errors.
And bear in mind that MT4, is not C, but C like language. Also mql5 (towards which we are migrating) is not a full C++ implementation, but is much closer to C++ then mql4 to C.
So you are now using something which is far more similar to standard C++ then before. But be cautious with the C++ (C is acceptably good now), as there are still too many bugs in implementation.
Well taken, graziani!
However, the casting should have been shown in the MT4 reference example otherwise it is wrong example.
My objective is to make money in the trading and not in the C/C++ programming.
I should add that it shows an error with "property strict" directive: "possible loss of data due to type conversion"
Yes of course, thats why I said . . .
Yes! It works!
It is my first day of conversion from 5.09 to 6.04 so there will be more of the confusion.
So far nothing works.
The EX4(compiled in 509 metaeditor) initializes global variables in build 600 with changing timeframes.
But the same codes EX4 which compiled with the new metaeditor(600) won't.
No it doesn't.
The global variables are initialized only once.
To initialize global variables after TF change, initialization code needs to reside inside init()/OnInit().
The codes compiled with build 604 prints 0 1 2 3 after TF changed
The codes compiled with build 509 prints 0 0 0 0....Always 0
#property copyright ""
#property link ""
I understood your problem correctly.
But in my experience, this was expected behaviour also before. for that reason, i have all necessary initializations in init().
Perhaps this difference comes from different behaviour of EA and indicator?