New artcile: Why Is It Important to Update MetaTrader 4 to the Latest Build by August 1? - page 2

 
I am practically forced to learn but eventually it got me way better results. So, all good for me.
 

I would have liked to see implemented a way to grab the input parameters and their data types from a custom indicator, without knowing what they are already by a couple of functions like,

IndicatorParametersTotal(string indicator_name)

IndicatorParameterType(string indicator_name, int index)  Where the index is 0 - ParametersTotal()-1 and the data types returned are enumerated.

 
SDC:

I would have liked to see implemented a way to grab the input parameters and their data types from a custom indicator, without knowing what they are already by a couple of functions like,

IndicatorParametersTotal(string indicator_name)

IndicatorParameterType(string indicator_name, int index)  Where the index is 0 - ParametersTotal()-1 and the data types returned are enumerated.

It's implemented in mql5. Don't know why not in mql4, maybe later ?
 

I hope it is implemented later it would be a useful addition to mql4.

 

autoabacus:

 ....I am also using the tick event fired every second to do my own better back testing with tick data. That could not be done before.

Plus the controls (dialogs, combo boxes, buttons etc) are now available built in without need for a third part library.....


Can you elaborate on this?  I'm always looking for ways to speed up backtesting.  I am currently using Birt's tick data suite to implement variable spread backtesting on a number of pairs, but per terminal (per core) it can take 1-3 hours on about 4 years ot tick data.

Sent PM also. 

 
autoabacus:

One big thing for me has been conditional compilation which I now make use of a lot. A simple example of its use is to enclose debugging code in an #ifdef DEBUG .... #endif block that is then included in the compilation or not according to whether DEBUG is defined or not. This avoids the need for commenting out debugging stuff, and also means it can be restored easily if needed. Another example is for library functions that I write which might do some things differently for an indicator versus for an EA. With conditional compilation I have one set of code to maintain without the performance penalty of using run time testing. In all, I use about a dozen such defines with conditional compilation.

Another is classes and structs. Even without making use of classes, the simpler structs add a lot. I now use lots of them to improve data structures almost everywhere and make code easier to write, more legible, more self documenting, more maintainable, and often faster. (Assigning one struct to another is a lot faster than making multiple indexed array assignments.) I also now use the equivalent of C/C++ pointers when passing a struct that is a member of an array to a function. This reduces code and improves execution speed.

Plus the extra data types are good, though there are a few funnies like volumes being a long. No volume figure will ever be so big as to need a long. And I don't see why datetime needed to grow to being 8 bytes rather than 4. I cast datetimes back to 4 bytes when I am storing lots of them.

Another welcome addition is the timer event. I use that to flush files and logs every minute instead of having to test on time in the main tick event. It also allows me to detect end of week and close down a tick data collection bot after 5pm Friday NY time. Previously that simple task could not be done as there was no way to know which was the last tick of the week, until the first tick of the next week arrived on Monday. I am also using the tick event fired every second to do my own better back testing with tick data. That could not be done before.

Plus the controls (dialogs, combo boxes, buttons etc) are now available built in without need for a third part library.

And all the extra charting facilities.

Then there are nice touches such as function overloading to make code cleaner i.e. same name for the integer case as for the double. That is just nicer, and I like my code looking "beautiful".

The more rigorous compilation checks when compiling in strict mode (which I always use) avoid errors that the old compiler did not detect. Sometimes this does result in warnings about possible use of an uninitialized variable that are not valid for my logic, but adding a conditionally compiled initialization during debugging gets rid of them.

And lots more. Many things....

The extra power is allowing me to write a bot for tick chart trading a la Bob Volman's book "Forex Price Action Scalping". That would have been much harder to develop in the old MT4, requiring use of a dll probably, whereas now all can be done in MT4 code.

So, as I said, it is a huge improvement as far as I am concerned. I just love the new languages by comparison with the old.


Another big improvement is the addition of the StringFormat() function to provide easier and better control of output. I just did a search across my code base and found that so far I have used it 311 times in 69 files. What StringFormat() provides could be done in the old MT4 but with much more effort.

 
4evermaat:


Can you elaborate on this?  I'm always looking for ways to speed up backtesting.  I am currently using Birt's tick data suite to implement variable spread backtesting on a number of pairs, but per terminal (per core) it can take 1-3 hours on about 4 years ot tick data.

Sent PM also. 


Thanks. The objective of my back testing project is primarily to improve modelling accuracy/quality, but I do expect a significant speed improvement also. As this is a work in progress with a lot of work still to be done I can't yet say by how much. I have replied to your PM.
 

For an example of how much easier, better, and cleaner new MT4 code can be versus old MT4 code see my post on making kernel32.dll time related calls (GetSystemTime(), GetLocalTime(), and GetTimeZoneInformation()) in MT4 Build 600+ at https://www.mql5.com/en/forum/106240

 
deysmacro:
I am practically forced to learn but eventually it got me way better results. So, all good for me.

It's not all good for everybody. MQ seems to be following Microsoft's example of making changes for the sake of making changes and breaking things in the name of "progress". I've been off for the last couple of weeks working on a website for my custom software business trying to relearn my ASP.NET programming because MS pulled that crap and, now, coming back to an indicator I'd been working on I find out that my chart display is screwed to shit thanks to MQ's "progress". I'm not in the least damned bit happy about having to relearn two programming paradigms when my income depends on it. If people are going to make application breaking changes they should warn people instead of letting them find out the hard way. In addition, they should outline the changes, how developers need to deal with them and let us know so that we're ready when they happen instead of being blind-sided by them. And one last thing - a message for MetaQuotes - YOU DO NOT MAKE APPLICATION BREAKING CHANGES IN AN INCREMENTAL RELEASE AND YOU DON'T MAKE 15 MAJOR RELEASES IN A YEAR'S TIME! I'm not pointing this last statement at you, dm. I'm simply making it while I'm posting because I'm sure the MQ people are watching posts. I'm hoping they'll get the message and start operating in a more professional, and sensible, manner.
 

Attention: From August 1, 2014 MetaTrader 4 desktop terminals older than build 600 will be no longer supported.

I thought that it will not be possible to connect to brokers servers, but it still is.

So what does it mean 'it will not be supported'? 

Reason: