MetaTrader 4 Client Terminal build 604 - page 6

To add comments, please log in or register
micclly
79
micclly  
stringo:

No solution. Possible bug.

Way to get suspictions. And you can check it quickly now and after new build release. We'll check it too. but 2 checkers better than 1

PS We just need your answer. Is there bug in the file functions or not



Ok, I've got it, and tried as you requested!

Code and result is attached as zip, and it may be too long for others I don't paste the code and pictures in post.

From the result, unfortunately, FileWriteString/FileReadString is also buggy.

Files:
NoTomatoes
40
NoTomatoes  

There is an issue about old .set files in Build 600

The boolean values "true" and "false" are flipped to "1" and "0".

If the dropdown in the "Load" dialog is activated, the "1" and "0" is gone and no element of the dropdown is selected.

This means: All old .set files have to be double checked before using any EA on any build >= 600 currently.



Did some research into this issue: It seems that the "save dialog" on the chart behaves in a different way than the "save dialog" from the strategy tester.


If saved from the chart window a boolean variable becomes to:

PreventRiskExcess=true

and if saved by the strategy tester the boolean variable becomes to:

PreventRiskExcess=1

Which of those representations the EA uses to do the actual runtime configuration is currently unclear to me. Does it use "1" equivalent to "true" and "0" equivalent to "false"?


Is this issue resolved by the 604 build?

Slava
Moderator
12565
Slava  
micclly:
From the result, unfortunately, FileWriteString/FileReadString is also buggy.
Ok. Thank you very much for collaboration
Trevhib
164
Trevhib  

No tomatoes.

I've been asking this very question for days and have logged it with the service desk (6th Feb). No response on here or there as to whether it's resolved in 604 or even been/being looked at.

Edit - I have now been contacted by the team (I think) about this.

Trevhib
164
Trevhib  

Just to confirm that the specific problem encountered by No Tomatoes above (where True becomes 1 and False becomes 0 in the dialog boxes), I have been told this is 'not an issue because it will not cause an error'. The behaviour is still odd/disconcerting however and is new to this build AFAIK.

The related issue (of a parameter being set to 'false' and saved in a set file from the chart only to be flipped to 'true' when loaded from the tester), still needs to be considered.

sub
42
sub  
datetime t = ObjectGet(nam, OBJPROP_TIME1); //Will return double instead of the "datetime" type
color c = ObjectGet(nam, OBJPROP_COLOR); //Will return double instead of the "color" type


THE BUG!

Simon Gniadkowski
17205
Simon Gniadkowski  
sub:
datetime t = ObjectGet(nam, OBJPROP_TIME1); //Will return double instead of datetime type
color c = ObjectGet(nam, OBJPROP_COLOR); //Will return double instead of color type


THE BUG!


Please use the SRC button to post your code . ..
Simon Gniadkowski
17205
Simon Gniadkowski  
sub:
datetime t = ObjectGet(nam, OBJPROP_TIME1); //Will return double instead of the "datetime" type
color c = ObjectGet(nam, OBJPROP_COLOR); //Will return double instead of the "color" type


THE BUG!

Why is it a Bug ? ObjectGet() has always returned a double . . . it can't return something different depending on use, it has a type and it returns that type . . . if you don't like the warning cast it . . .

datetime t = (datetime) ObjectGet(nam, OBJPROP_TIME1);
color c = (color) ObjectGet(nam, OBJPROP_COLOR);
sub
42
sub  
RaptorUK:
Why is it a Bug ? ObjectGet() has always returned a double . . . it can't return something different depending on use, it has a type and it returns that type . . . if you don't like the warning cast it . . .



Read your HELP REFERENCE it states:

Returned value

The value of the specified object property. To check errors, one has to call the GetLastError() function.

Example:

color oldColor=ObjectGet("hline12", OBJPROP_COLOR);

sub
42
sub  
sub:

Read your HELP REFERENCE it states:

Returned value

The value of the specified object property. To check errors, one has to call the GetLastError() function.

Example:

color oldColor=ObjectGet("hline12", OBJPROP_COLOR);


I should add that it shows an error with "property strict" directive: "possible loss of data due to type conversion"

To add comments, please log in or register