Errors, bugs, questions - page 2332

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
According to the help, it should return false if the file does not exist.
Strictly speaking, it does not follow from the documentation that the result of FileGetInteger(FileName,FILE_EXISTS) is necessarily a bool
But the logic is ornate in any case
https://www.mql5.com/ru/forum/1111/page1788#comment_4071879
Forum on trading, automated trading systems and testing trading strategies
Libraries: PriceChannel
fxsaber, 2018.11.28 08:19
#define PRICEST_TICK_PRICE bid
The site engine is not highlighting the macro in red.
bool file_exists=(bool)FileGetInteger(FileName,FILE_EXISTS);
In any case it returns true if there is file or not, and error 5019 if there is no file. According to help, it should return false if there is no file.
The correct way would be
Got it in mt 5
Please provide code to study, via PM
The website engine does not highlight the macro in red.
It should only be highlighted in red if the macro was previously defined
Otherwise how do you know that a macro has not been defined before?! And it is not an accidental override
Sometimes it even works in MetaEditor:
The colour should only be highlighted if the macro was previously defined
otherwise how do we know that the macro was not previously defined?! and this is not an accidental override
Then we need to define what is a highlighted macro and what is not highlighted?
Thought all macros were highlighted. Apparently the rule is different.
Then we need to decide what is a highlighted macro and what is not highlighted?
I thought all macros were highlighted. Apparently, the rule is different.
I think we need to decide what highlighting is good for, is it just for beauty or informativeness? There are no rules as such at the moment:
In general, it is desirable that if an identifier has already been defined and is not undefended, it should be highlighted in colour
I think we need to decide what the illumination is all about: is it for beauty or for information? There are no rules as such at the moment:
For me, the rule of thumb is: the macro is always red.
For me the rule is convenient: the macro is always red.
The inconvenience is clear: you can't tell if the PRICEST_TICK_PRICE identifier was previously defined or not
And why should it here (3)
be red? And if it is not red here (3), why should it be red in (1)?
Handy rule: an identifier is red only if it was previously(!) defined and not undone
A100:
А в чем здесь удобство?
I can see that this is a macro. In this case you don't need to see #define laterally.
The inconvenience is clear: it is impossible to understand whether the PRICEST_TICK_PRICE identifier was previously defined or not.
I never tried to determine it by colour. Moreover, if everything is in #ifdef, MQL4 and MQL5 may have different colors. The easiest way is to do ALT+G on the macro name to see if it's there or not.
Handy rule: identifier is red only if previously(!) it was defined
I would be comfortable if the macro is mentioned at least once somewhere in #define, #ifdef, #undef, etc. Even if it's not defined.