MetaTrader 4 Client Terminal build 610 - page 25

 
MyBabyBot:

I have found what seems to be an undocumented feature and was hoping some one could help me fix it.

I have an EA which I have been developing for quite some time now and found unusual behavior when I added a new feature to size the chat based on historical bars. I simply get the highest high in the last x bars and the lowest low then set the chart to size this range. I have recreated an example and will post the code below. My problem is when the chart is in focus everything seems to work as planned. But when the chart in not in focus it behaves strangely, if you switch the focus to the chart it seems to be condensed at the top of the chart, then corrects on the next cycle. I don't think it is a show stopper but I found it confusing. If anyone could shed some light as to how to avoid this behaviour I would happy. I hope I have explained my problem well enough for some help.


Could you insert and test ChartRedraw() ? I am not sure whether it applies to anything else than objects, but it is worth trial.
 
Ovo:

Could you insert and test ChartRedraw() ? I am not sure whether it applies to anything else than objects, but it is worth trial.

I have not tried that yet but I will give it try, when the ticks start again tomorrow.


Thanks for the idea.


Tested and failed

Ok, nice try but no luck. Any more suggestions?

 
SDC: I thought int arguments were an acceptable alternative, I have always used int arguments instead of MODE_EMA etc.
Prior to the enums, acceptable but bad style, (write self-documenting code.)
iMA(..., PRICE_CLOSE, MODE_EMA, 0)
Now we should let the compile find errors like, one of those calls:
iMA(..., MODE_EMA, PRICE_CLOSE, 0)
 
a small bug: if 32 terminal.exe working, when you re-call one terminal.exe, it's main window is not activated back. if you run 31 insrances, all can reactive themselves, when terminal.exe run again buy user. reactivating counted as 33. instance, that is problem. but it is already running, need to be activated back.
 
another small bug: strategy tester 610 can not load .set files, which saved by 610 EA. possibly can not resolve true, false words in .set files..
 
cbalta:
another small bug: strategy tester 610 can not load .set files, which saved by 610 EA. possibly can not resolve true, false words in .set files..
This seems solved in build 616.
 
micclly:

Why not use TimeToString?


You can use TimeToString() of course to turn a datetime into a Date Time string. However that is not what was interesting to me.. The point is that both of these functions are of the datetime type which means they return an 8byte (64bit) integer. Normally (in the past)it was only after using the TimeToString() that it would display in a formatted string that we could recognize.

However for some reason when commented to the screen our datetime type function TimeCurrent() gets transformed as if the TimeToString function is in use, and the other long integer from the other datetime is left alone. I have now noticed that at the bottom of this page. It does mention that if the ex4 was compiled with property strict enabled that the date time will be displayed as a string in the Date Time format that the TimeCurrent() is using. However the OrderOpenTime() failed to display that way.

I don't care which way they want it to work. But I do want ALL datetime functions to work the same.. Their may be a discrepancy between the documentation and the compiler .. but there is also a discrepancy about why all datetime functions are not handled the same. This also gives further insight into the fact that the property strict setting has further effects of which we are not aware other than the scope changing and the stricter rules for initializing variables explicitly..

It's just one of those little interesting bugs that will be thrown on the pile to be investigated further as time permits. It's not something worth fussing with yet. It can just simmer for a while. There may be further anomalies that we find that can all be made to go away with a simple change. The more symptoms we have of what might seem to be unrelated problems the easier it will be to nail down exactly what needs tweaked.

I know someone somewhere has been working very hard on all of these problems. I don't envy them at all! My hat is off to them.

PipPip...Jimdandy

 
Jimdandy:
More interesting behaviour of datetime functions.
Although both OrderOpenTime() and TimeCurrent() are datetime types.
One gets commented as seconds and the other in date time format..
with the strict property disabled they both display in seconds.


The reason is that OrderOpenTime and OrderCloseTime return int value. We will fix documentation or function behavour.
 
angevoyageur:
This seems solved in build 616.


That is still a beta currently though (at the time of typing). We could do with a prod release.

Looks like the errors relating to this revolution are finally drying up. That wasn't a painful process at all was it. <puke smiley>

 

I have an issue with debugger in MT4 builds 614 & 616. Editor builds 900 & 904. Debugger loads the indicator to a chart but there is no output in the debugger windows, add watch is greyed out. Breakpoint appears to work but only to pause the debugger at that point. No output in the debugger. I tested that on my own code and included alligator code.

Also less of an issue but profiler only works some of the time, it works on included indicators but not on my own code that compiled with no errors. It loads my indicator to a new chart then immediately unloads it and closes the chart, but no errors reported in the log.

Can anyone confirm the debugger issue ? I really need that debugger it was working on an earlier build when I tested it a couple of weeks ago.

Reason: