Array resize bug in beta build 530 - page 4

 
SDC:

Have you already been coding in MQL5 angevoyageur ?

Yes. Why ?
 
angevoyageur: Yes you are right, it will be a difficult transition. However, I think it will difficult not for newbies but for experimented mql4 coder that doesn't know mql5 yet. In General, newbies don't read the documentation

I agree with you this time . Most people who've invested time learning mql4 would dread re-learning the new syntax.

mql4 now has more levels than mql5 (imagine that).

  • there's the mql4_non_oop syntax.
  • there's the mql5_non_oop syntax.
  • there's the mql5_object_oriented syntax.

Good news is, you don't have to use what you don't know. I think, I Like the way metaQuotes is easing mql4_programmers into mql5 and OOP.

For metaTrader fans, this language is probably the language of the future; so the sooner we get_over_it the better ..... just my opinions .

 
SDC: I think when the new version is released it will cause a lot of confusion on the forum for newbies because the new mql4 documentation is based on mql5 coding. That means much of what is described on this forum and in the codebase will be contradicted by the mql4 docs. Setting up an indicator buffer from the new mql4 docs: (This actually has errors in it and won't compile)
I believe it'll be much like mql5.com. Some newbies wouldn't receive help with coding on the forum depending on the style they're using. Example: if the style they're using is mql5_oop then most responses would point them to the mql5_docs. However, if they post their mql4_codes then there'll be allot more people capable of reading the actual codes.
 
ubzen:

I agree with you this time . Most people who've invested time learning mql4 would dread re-learning the new syntax.

mql4 now has more levels than mql5 (imagine that).

  • there's the mql4_non_oop syntax.
  • there's the mql5_non_oop syntax.
  • there's the mql5_object_oriented syntax.

Good news is, you don't have to use what you don't know. I think, I Like the why metaQuotes is easing mql4_programmers into mql5 and OOP.

For metaTrader fans, this language is probably the language of the future; so the sooner we get_over_it the better ..... just my opinions .

You are right, but I would rather say: you don't have to use what you don't need.
 
ubzen:

Good news is, you don't have to use what you don't know. I think, I Like the way metaQuotes is easing mql4_programmers into mql5 and OOP.

For metaTrader fans, this language is probably the language of the future; so the sooner we get_over_it the better ..... just my opinions .

I agree and it's something I have been putting off getting to grips with . . . but not for too much longer, if anyone comes across any good introductions to the principles behind OOP please PM me.


My biggest concern is the documentation I hope it won't be left to an afterthought rather than being given the time and attention it needs . . . lets hope my fears are groundless.

 
angevoyageur:
Yes. Why ?

Because I want to ask you, do you feel learning mql5 was worth the effort? Have you accomplished things in mql5 that you feel you couldn't have done in the old mql4 ? Also are you experienced oop programmer ?

You're right it will be a hard transition I dont know that I will ever even have the time to learn all this new stuff.

Also I'm wondering why that coding example wont compile, ENUM's are a predefined constant ?

the first error is 'ENUM_APPLIED_PRICE' - declaration without type TestCopyBuffer1.mq4 23 7...

 
RaptorUK:

I agree and it's something I have been putting off getting to grips with . . . but not for too much longer, if anyone comes across any good introductions to the principles behind OOP please PM me.


My biggest concern is the documentation I hope it won't be left to an afterthought rather than being given the time and attention it needs . . . lets hope my fears are groundless.

I think I agree too, I am not sure to what extent oop is really going to be neccessary though. Would others agree that oop is really more about the structure of a program than its function or capabilities ? Or are we really going to have to think oop to make the most of the features of mql5 ?

 

I have a tip for anyone who wants to experiment with the new beta but wants to also keep 509 for thrading purposes. Others have said if you upgrade one terminal to the beta, live update will upgrade any others you have too. That did not happen to me I realized UAC is protecting my main trading terminal from interference by auto live update.

So you can install a 509 into program files and turn UAC on. That will be your main trading terminal.

Install another 509 into a separate folder, it can be in Program Files too it does not matter I used ProgramFiles/MetaTraderBeta/ Connect this terminal to the MT4 test server and let it upgrade to the beta 530

Now when you close out the beta version and open the trading terminal 509, UAC will inform that a program needs your permission to continue. That is the liveupdate. Do not give permission and the terminal will then load normaly and remain version 509. That will happen each time you restart 509.

 
SDC:

Because I want to ask you, do you feel learning mql5 was worth the effort? Have you accomplished things in mql5 that you feel you couldn't have done in the old mql4 ? Also are you experienced oop programmer ?

You're right it will be a hard transition I dont know that I will ever even have the time to learn all this new stuff.

Also I'm wondering why that coding example wont compile, ENUM's are a predefined constant ?

the first error is 'ENUM_APPLIED_PRICE' - declaration without type TestCopyBuffer1.mq4 23 7...

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.

I think a lot of mql4 programmer are not professional programmer and they learned mql4 to have the possibilities to automate trading with the hope the earn some money. Even without talking about oop, mql5 is more difficult to learn than mql4. mql5 is more structured, less permissive. I take only 1 example, the use of iCustom. With mql4 you have to use 1 call to iCustom, with needed parameters, to get the value of a buffer for a given candle. With mql5, you have to work in 2 steps, firstly use iCustom to get a handle to the indicator, and secondly use a CopyBuffer function to get data (1 value or 10000 values with 1 call). So an amateur coder in mql4 can more easily understand who to use iCustom to get 1 value, with mql5 you have to understand the concept of an handle, then to master CopyBuffer function. More difficult. But more efficient if you need to get 3, 4, 10 or even 1000 values from an indicator's buffer.

Also there are a lot of improvements, for example almost all which needs to use windows dll (postMessage...) with mql4 can be done directly with mql5. You don't have to use oop, all the features are available in a procedural way.

As conclusion, don't worry about oop. In my opinion the best thing to do is proceed step by step. What you have used until now is still available with minor changes. When you need a solution for a new problem, see if the new possibilities can offer a solution.


 
SDC:

I have a tip for anyone who wants to experiment with the new beta but wants to also keep 509 for thrading purposes. Others have said if you upgrade one terminal to the beta, live update will upgrade any others you have too. That did not happen to me I realized UAC is protecting my main trading terminal from interference by auto live update.

So you can install a 509 into program files and turn UAC on. That will be your main trading terminal.

Install another 509 into a separate folder, it can be in Program Files too it does not matter I used ProgramFiles/MetaTraderBeta/ Connect this terminal to the MT4 test server and let it upgrade to the beta 530

Now when you close out the beta version and open the trading terminal 509, UAC will inform that a program needs your permission to continue. That is the liveupdate. Do not give permission and the terminal will then load normaly and remain version 509

Be patient about the beta. Metaquotes remove his topic about it because current version isn't yet ready for a mass testing.

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 \
Reason: