Array resize bug in beta build 530 - page 5

 
angevoyageur:

If you want to test, and avoid update of other terminal, you have to remove the following folder :

  • Windows 7 : C: \ ProgramData \ MetaQuotes \ WebInstal after a successful update, the test terminal to the other terminals are not updated.
  • Windows XP : C: \ Documents and Settings \ All Users \ Application Data \ MetaQuotes \ Webinstall \

This information (probably taken from the Russian forum) is no longer up to date. From v534 onwards, the update on Win7+ is put into %appdata%\metaquotes\webinstall, not into %programdata%\metaquotes\webinstall.

May change again in subsequent versions.

 
cyclops993:

This information (probably taken from the Russian forum) is no longer up to date. From v534 onwards, the update on Win7+ is put into %appdata%\metaquotes\webinstall, not into %programdata%\metaquotes\webinstall.

May change again in subsequent versions.

Thank you.
 
angevoyageur:

I am probably not a good example, as I am a professional programmer. So it's not a huge effort for me, and I like to learn new programming language. I have some experience with oop too.

. . . . .

For the most part I agree with what you have written, I'm not a software engineer but I have dabbled a little with mql5 and have not needed to use any OOP in the code I have written . . . but, I learn a lot by reading and understanding other people's code, without understanding the principle behind OOP it can be difficult to follow some mql5 code.
 
RaptorUK: For the most part I agree with what you have written, I'm not a software engineer but I have dabbled a little with mql5 and have not needed to use any OOP in the code I have written . . . but, I learn a lot by reading and understanding other people's code, without understanding the principle behind OOP it can be difficult to follow some mql5 code.

Imo, OOP involves believing in Encapsulation, Abstraction, Inheritance, and Polymorphism. I don't think you're suppose to able to "follow" someone else's codes because of Abstraction. All you need to know is what it does . On a more serious note, I believe OOP provides a level of organization/cataloging which is enforced && supported by the language && IDE. A programmer cannot have too much organization, this probably ends_up saving time on future projects for most programmers.

 

Thanks for your reply angelvoyager that was a good insight from someone who si familiar with both sides of the coin, I am in the same boat as Raptor, the concepts of oop have started to interest me and I want to learn more about it, its good to know that is not entirely neccessary for continuing to use mql4 even with the mql5 features, but still, I would like to understand what are the advantages of coding according to oop concepts and principles and how well do they apply to coding a small project like an EA.

 

When I code an EA it usually ends up being similar to the book one, a central hub function that accumulates the current status of things, and stores that information in global arrays surrounded by peripheral functions that use the information in those same arrays to decide what to do, each of them call other helper functions for calculating things such as lot sizes etc. The start() function just calls the central hub function first followed by the peripheral functions in order of priority. That basic structure works pretty well although I have never really liked the fact that the whole thing is centered on global access to those arrays, but i didnt not like it enough to look for a different way of doing it. In other words it works well enough so I didnt try to fix it lol.

I would like to know how would an oop approach differ from that and what would be the advantages of it.

 
SDC: When I code an EA it usually ends up being similar to the book one, a central hub function that accumulates the current status of things, and stores that information in global arrays surrounded by peripheral functions that use the information in those same arrays to decide what to do, each of them call other helper functions for calculating things such as lot sizes etc. The start() function just calls the central hub function first followed by the peripheral functions in order of priority. That basic structure works pretty well although I have never really liked the fact that the whole thing is centered on global access to those arrays, but i didnt not like it enough to look for a different way of doing it. In other words it works well enough so I didnt try to fix it lol.

I would like to know how would an oop approach differ from that and what would be the advantages of it.

I believe you're describing a program flow. I don't think thats the big_idea behind OOP. (imo) OOP tries to address the following problems. I'm a OOP noob, but I'm forming my world_view on it.

1) Are your functions independent of global_variables? In other_words are your functions stand alone objects? Encapsulation

2) Does your function hide the details like local_variable_names? Does it simplify the volume of codes on the screen? Abstraction

3) Does it have the ability to create duplicate copies of itself for modifications? Like ability to create your own data types? Inheritance.

4) Does it have the ability to change on the fly? Example:Can the function handle integer_array as well as double_arrays? Polymorphism.

Ways OOP can help in building_ea is similar to how an ea_builder helps a non_programmer built an expert_advisor. You just grab your favorite Order_Accounting_Function -> Data_Function -> Event Tracking Function -> Volume Defining Function -> Trading Criteria Defining Function -> Trade Functions -> Error Processing Function. And boom, you have an Expert_Advisor. All your Trading Criteria Defining Function you've developed over the years can be easily swapped_in or out.

Me as an example, if you wanted to modify my expert advisor, you'll need to study where my global variables are being applied and what other function depends upon it (as in your state or status arrays). OOP makes it as_simple_as Accounting(Option_3); Display(Option_1); Caption(Option_5); TradingSys(Option_7); VolumeSize(Option2); OrderType(Option_2) and thats the entire expert.

This makes it easier for someone else to use your set of libraries, and usually what works for someone else works for you as-well some time in the future. If nothing else, just think stand_alone objects on an assembly line :)

 
***Ps: (I don't wanna forget this). Sure most of us don't like not_knowing whats in the codes we're using. Or we get consumed with trying to understand the codes from someone else otherwise we probably wouldn't use it. However, most of the Native functions ( example OrderSend() ) in mql4 are Objects from our view_point. We do_not see their codes however we accept it. I believe this acceptance of other_peoples libraries is something a professional_oop_programmer working on large projects have to accept and built upon. Otherwise you're stuck re-creating the wheel.
 

The latest version of my EA is getting close to that, it is now all include files but they are not robust enough to be used out of the box without at least some modifications. The mistake I often make is I don't catch myself writing criteria specific code into functions that should be ambiguous until after the fact and they do rely too much on glabal arrays, when I get time I am going to use more local arrays and more passing of parameters to compensate for less global access.

 
ubzen:
***Ps: (I don't wanna forget this). Sure most of us don't like not_knowing whats in the codes we're using. Or we get consumed with trying to understand the codes from someone else otherwise we probably wouldn't use it. However, most of the Native functions ( example OrderSend() ) in mql4 are Objects from our view_point. We do_not see their codes however we accept it. I believe this acceptance of other_peoples libraries is something a professional_oop_programmer working on large projects have to accept and built upon. Otherwise you're stuck re-creating the wheel.
There is a difference . . . I don't have any option but to use OrderSend() if I want to place an Order . . . I do have the choice to use someone elses library or not . . . even when the source is respected I still try to understand it before trying to use it, this is how some errors are found and fixed: https://www.mql5.com/en/forum/133792/page3 "And my correction for RaptorUK's comment:"