Errors, bugs, questions - page 116

 
Dmitriy2:

Can we do something about the stylizer... Bored...

The idea is again very good and useful, if before I clicked spaces and tabs myself, now it's done, and it saves time especially when changing code. Removed a parenthesis or condition, etc., clicked and everything is aligned, visually easier to continue working. But, why does he put frames? EVERYWHERE!!! In the middle of the code! And LOTS of frames...! A box is needed only once, in the title of a function, and it's easier to copy it by yourself than to delete a HUGE bunch of extra boxes.

Please don't say you won't change anything, this stuff is not hard to remove, without it the styler is a very useful and handy thing.

Please add to Service Desk (Profile->Service Desk) an incident with the source file before and after styling.
 
Why does the SymbolInfoTick function give an error if a symbol is not selected in Market Watch?
 
After another update, OrderCalcMargin still returns zero for instruments of type #AA
 
Alexander:
Please add to Service Desk (Profile->Service Desk) the incident with the source file before and after styling.

I solved the riddle...:)

The project is big, the code is not working (with mcl4 remaking), so while I was thinking and experimenting how to make it easier and more clearly to give an example, I realized what's wrong. If an extra parenthesis,the styler goes to the place where the function ends (and in fact it doesn't) and then before each external if (the embedded ones don't count) makes a frame. And I have a lot of conditions... I think it will be before for, in short, where there is no semicolon at the end, ie, like a new function starts. In general, all right...:) It's even easier to look for an error this way, before the first frame will be

 

Question to the developers:

Could you add a button (at least a hot button, e.g. Ctrl+F7) to compile all open files?
You edit some include file with a class and you have to switch to the main file to compile it...

 
mrProF:

Question to the developers:

Could you add a button (at least a hot button, e.g. Ctrl+F7) to compile all open files?
You can edit some include file with a class and have to switch to the main file to compile it...

+1
 

I can't believe I'm the first person to come across this bug! Hasn't anyone tried parameter substitution yet:

these variants pass through compilation

ind_handle=iCustom(NULL,PERIOD_H1,....); // the indicator name and its parameter pair do not change the essence

ind_handle=iCustom(NULL,16385,....);


but this one does not:

int TM=16385; // (or PERIOD_H1)

ind_handle=iCustom(NULL,TM,....);


Error: "'TM'-can't convert enum"

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Периоды графиков
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Периоды графиков
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы графиков / Периоды графиков - Документация по MQL5
 
omeganight:

I can't believe I'm the first person to come across this bug! Hasn't anyone tried parameter substitution yet:

these variants pass through compilation

ind_handle=iCustom(NULL,PERIOD_H1,....); // the indicator name and its parameter pair do not change the essence

ind_handle=iCustom(NULL,16385,....);


but this one does not:

int TM=16385; // (or PERIOD_H1)

ind_handle=iCustom(NULL,TM,....);


Error: "'TM'-can't convert enum"


iCustom assumes that the period will be enum. If the parameter is an int it will need to be converted to the required type.
 

The int type is not converted to an enum by default. It should be like this:

ENUM_TIMEFRAMES   ТМ=16385;

or like this:

int   ТМ=16385;
int handle=iCustom(NULL,(ENUM_TIMEFRAMES)ТМ,....);
 
Valmars:

The int type is not converted to an enum by default. It should be like this:

or like this:

It is more convenient to write a function that will convert a number to a period.
Reason: