Updated MQL4 and old code (sharing problem-solving experiences) - page 3

 
VDev:
I only tried this version for an hour today, not up to speed. An acquaintance made me laugh today )))) He loves putting dots in variable names. Told him for a long time - change it to underscores. Today it didn't compile well. So he says to me - why? Because now variables must simply become classes!
We don't need classes. When they think of forcing them, then maybe we'll find an alternative!
 
borilunad:
We don't need classes. When they think of forcing us, then maybe we'll find an alternative!
We don't need cars either, we'll walk barefoot, and when they force us, we'll wear hobnails! Classes are a thing, but you can write in the old style if you don't want to
 
VDev:
And we don't need cars, we'll walk barefoot, and when they force us to, we'll put on our loafers! Classes are a thing, but you can write in the old style if you don't want to
I don't like over-organized codes, we need flexibility, especially us! Of course, I'm not an expert in programming, but it's easier for me to tweak the codes I've made myself, while "poppies" will always remain "poppies"! ;))
 
Dezil:

I think this topic may be useful in the light of the update.

The other day I foolishly decided to update the terminal and tested my Expert Advisors on it, but I did not update them on the real account.

I got errors. I do not want to say the developers are to blame, it is my fault too. However, I would like to disclose a couple of details where I have encountered troubles:

1. Illegible characters in variable names: It's simple because the compiler showed the $ symbol as invalid. Fixed it quickly and easily. There were no more errors at the compilation stage.

After that, I had to correct the Expert Advisor's errors, to which the compiler did not complain.

2. When launching the test, I got swear words that the library stdlib.ex4 was not found. The solution was found stdlib source code in the specified folder and recompiled it.

3. Then I eliminated bugs associated with the fact that now as I understood NULL and 0 (zero) are different things. Earlier functions like iOpen(NULL,PERIOD_W1,1) worked correctly as iOpen(0,PERIOD_W1,1) i.e. both 0 and NULL could be specified. It doesn't work now, but the compiler doesn't swear at it, you just get an error during Expert Advisor's operation.

4. I do not know why I used NormalizeDouble(pr1,Digits) when setting an open price, stop level or profit. Now I have noticed that this function always returns a value with 4 decimal places when testing USDJPY with 3 decimal places and therefore I get errors when opening an order. I have replaced Digits with Digits() and everything is working.

That is all I faced at the moment. Now I am checking my EA for possible other problems.

By the way, if not recompiling the old code, ex4 works without errors.

My current build is 579, I still have 509 running on the real, flight is ok, but I am scared to upgrade.

If anyone has encountered problems with the transition - post here, it will be useful to others.

 
gnawingmarket:



Fucking... ё... Fuck him...! I don't want to be a programmer! I want the Expert Advisor, uploaded to the folder, to be visible not only in the folder, but also in the navigator as before. I do not like it when something is updated without my request! I think Russia considers itself a democracy! It's as if someone else's hand got into my pants without my consent and is doing something. It is a pity that our jurisprudence has not yet reached the stage of full regulation of financial markets. I don't know how to compile my EA, which I have put in a folder but in the Navigator it is not there. (I can not say that I'm serious about forex_as little power to the trader and a lot of them have a market maker and broker, but as a game is much more interesting than a super cow!) Thanks for the tip! Valery.
 
gnawingmarket:

Fucking... ё... Fuck him...! I don't want to be a programmer! I want the Expert Advisor, uploaded to the folder, to be visible not only in the folder, but also in the navigator as before. I do not like it when something is updated without my request! I think Russia considers itself a democracy! It's as if someone else's hand got into my pants without my consent and is doing something. It is a pity that our jurisprudence has not yet reached the stage of full regulation of financial markets. I don't know how to compile my EA, which I have put in a folder but in the Navigator it is not there. (I can not say that I'm serious about forex_as little power to the trader and a lot of them have a market maker and broker, but as a game is much more interesting than a super cow!) Thanks for the tip! Valery.
File --> Open Data Folder. There is a folder MQL4 - inside there are folders for EAs/indicators/scripts/files/beer/girls/..... There you can put
 
artmedia70:
File --> Open data directory. There's an MQL4 folder - inside there are folders for EAs/indicators/scripts/files/beer/girls/..... Put there


Thank you. Trying it out.
 
artmedia70:
Файл --> Открыть каталог данных. Там есть папка MQL4 - внутри есть папки для советников/индикаторов/скриптов/файлов/пива/девочек/..... Туда ложите


gnawingmarket:

Thank you. Trying it out.

Thank you again. It all worked out! By the way,I do not understand how to make a picture on the forum (probably did not do at once). P.S. The Almighty somehow spontaneously distributed the brains of people, some a lot, and some not enough........... .
 

gnawingmarket:

... How to make a picture of yourself on the forum...


Click on "Profile" at the top right of the site - then "Edit" on the left - and after that, under the avatar rectangle, "Edit".
 
artmedia70:
File --> Open data directory. There's an MQL4 folder - inside there are folders for EAs/indicators/scripts/files/beer/girls/..... Put there

And put it there yourself, where the girls are).
Reason: