MetaTrader 4 Build 529 beta released with new compiler - page 37

 
Renat:
That is, you personally do not have any problems with software operability and you are asking general questions.

I have read your questions several times and do not understand them. We're discussing specifics here.

There are no problems with compiling. There are problems with operability, and as I understand it, they have to do with Mixing MQL5 logic with MQL4. However, the problems we discuss here are not enough for all occasions. All this is a special case. Rules are necessary. If you've published a preliminary guide or at least the preview of translations of MQL5 features and rules into MQL4, it would not only help us but also you in understanding of arising problems. And just imagine, there will be 500 pages or more. How can I re-read it?

 
ForexMoneyMaker:

There are no problems with compiling. There are problems with operability, and as I understand it, they have to do with Mixing MQL5 logic with MQL4. However, the problems we discuss here are not enough for all occasions. All this is a special case. Rules are necessary. If you've published a preliminary guide or at least the preview of translations of MQL5 features and rules into MQL4, it would not only help us but also you in understanding of arising problems. And just imagine, there will be 500 pages or more. How can you read it all?

first, something else may change (including things that affect compatibility). second, now all the "descriptive resources" are devoted to preparing a help. why overburden a system that is already working at full stretch? so that the number of bugs would increase?
 

MT4 build 536, ME build 872.

The indicator uses input parameter for a separate window: extern string Currency_Name = "EURUSD";

If the indicator is started without changing the input parameter, the indicator is drawn and works without errors. But as soon as I change the symbol after the first run, for example "GBPUSD", the indicator doesn't accept the new symbol name. The short_Name of the indicator keeps the same name, but the indicator is not drawn at all (empty field). If you change the symbol name at first call, the indicator will be drawn by the initial name, written in the program.

As for changing the numeric values of indicator's initial data, they are changed in all cases and the indicator is drawn without errors.

 
Renat:

Having hundreds of global variables in a programme is no good.

OOP and classes solve the problem completely and drastically by hiding scopes and providing protected access to data.

Perhaps it's not good enough. But I wrote there why it is. It was impossible to implement what was intended differently in MT4. It didn't work any other way with graphics. Only through external variables you can set style of graphic elements. If we have a lot of different graphic elements, we will have a lot of external variables. Apart from style, there are a huge number of properties of graphic items, which can also be changed ONLY WITH EXTERNAL VARIABLES. The graphics are fine in ensign. But in MT4 it is a real mess. That is why there are hundreds of external variables. We do not know yet what will happen with the new version of MT4. We will see.
 
nen:
It may not be good enough. But I wrote there why it is. It was impossible to implement what was intended differently in MT4. It didn't work any other way with graphics. Only through external variables you can set style of graphic items. If there are a lot of various graphic items, you will have a lot of external variables too. Besides the style, there are a lot of properties of graphic items which can also be changed ONLY WITHIN EXTERNAL VARIABLES. The graphics in ensign is fine. But in MT4 it is a real mess. That is why there are hundreds of external variables. How it will be in the new version of MT4 is unknown. We will see.

So, we are talking about variables, not graphics. Besides, graphics are great in MT5 - you can do anything up to computer games. Mt4 is about to step up as well.

How can you transmit in any program a hundred parameters that a user must change himself at any moment? Only with a table of input parameters. It doesn't depend on the type of program.

Anyway, hundreds of parameters is a programmer's way to nowhere. We need to use intelligent automatic control methods to reduce the number of parameters by a factor of ten. As soon as you start thinking about it, solutions come immediately.

 
nen:

If an indicator has several hundred external variables and a few dozen need to be changed during installation, then...

Before re-installing, you will need to remember which variables need to be saved from the values that were changed during the previous installation of the indicator.

Without going into the impossibility of getting rid of 100 parameters...

To avoid having to remember what has already been changed, there is a "Reset" button.

And the new behaviour (saving of entered values of variables after recompilation) makes working more convenient - you don't need to reconfigure all copies of the indicator, if you change something in it.

 

Renat, Stringo, will Unicode stay for good?

 
input datetime  Date_From = D'08.10.2013';      // Начало периода
input datetime  Date_To = D'08.11.2013';        // Окончание периода
input bool      Column_Headers = true;          // Создавать заголовки колонок?

This is a script, on startup the Date_From field is always the current local date/time, the Date_To field is fine. Changed the order of settings - if a variable of datetime type is not the first in the list, this defect does not exist

---

In help, PRICE_CLOSE has type ENUM_APPLIED_PRICE, but the compiler does not know - 'ENUM_APPLIED_PRICE' - declaration without type. Will the help or the compiler fix it?

---

And in general for this editor/compiler - thanks!

 

I make changes to the already compiled indicator which is on the currency pair chart. I recompile it. In order for the changes to take effect it is necessary to restart the entire terminal. Removing the indicator from the chart and restarting it does not help, change of timeframe does not help. Only restarting the terminal itself helps to see changes made.

Please fix it.

 
ObjectSetInteger(0,"Name",OBJPROP_CORNER,CORNER_RIGHT_LOWER);
ObjectSetInteger(0,"Name",OBJPROP_ANCHOR,ANCHOR_RIGHT_LOWER);

CORNER_RIGHT_LOWER and ANCHOR_RIGHT_LOWER are not detected

Mqh-file, "undeclared identifier" error in logs


StringConcatenate works strangely

It works this way

StringConcatenate("Text 1 ","Text 2");
StringConcatenate("Text 1 ",10);
StringConcatenate(10," Text 2");
StringConcatenate(10,11);
StringConcatenate("Copyright ",CharToString(169));

But it doesn't work like this (only "©" is displayed)

StringConcatenate(CharToString(169)," Copyright");