Errors, bugs, questions - page 1326

 
Alexander Laur:

Karputov Vladimir and Vladimir Zubov do you even read what you are commenting on? Or the main thing for you is to express your respect. If you have not understood the problem being discussed, just stand aside, maybe you will learn something useful for yourself.

My conversation with Renat on InCORRECT WORK OF FUNCTIONS !!!

Why does the RIGHT (return(true)) function return ZERO?

How can the value of a tick be equal to zero? Where does SymbolInfoDouble() take data about the value of the tick, if it returns zero value of the tick?

You should at least understand what you are commenting on.

You're probably not quite right about how functions work. The function:

  1. Returns the result of its execution correctly. Using the grocery store as an example. The task of the function is to fetch what is in box 5. If the function has gone to the warehouse, found box #5 and shaken out what is there in its bag, then the function will return "Task complete successfully".
  2. The function doesn't really care what she has in her bag. That is your problem now. Analyse exactly what the function brought in the bag.

So your job as a programmer is to check two results: whether the function completed successfully and what the function returned. And you don't need to demand from the terminal what you want to see. It is enough just to do the right thing.

 

Ambiguous result

void OnStart()
{
        A a( 10 );
        {
                A a( a.c );             //здесь = не 10
                Print( a.c );
        }
        {
                A a = a.c;              //здесь = 10
                Print( a.c );
        }
}

In one case the result is: 10 and in the other: not 10. What is the difference?

 
A100:

Ambiguous result

In one case the result is: 10 and in the other: not 10. What is the difference?

tin :) what's in the methods themselves?
 
Konstantin Karpov:
tinny :) what's in the methods themselves?

forgot to add :)

class A {
public:
        A( int b ) : c( b ) {} 
        int c;
};
 
Alexander Laur:

You are writing nonsense. Functions are created to process data and get the results of that processing. Creating a function just to make it WORK. I'm speechless.

I'm dropping out of the discussion.

+

I'm writing a multi-currency Expert Advisor with the need to synchronize tools and I've encountered such problems that my hair is crawling all over the place.

At the moment I have to state - there is simply no reliable way to get market data and at the same time know clearly that the data is up to date.

The funniest, and at the same time shocking, was that even the flags in the properties of the symbol like

SERIES_SYNCHRONIZED

make NO WARRANTIES.

 
A100:

Ambiguous result

In one case the result is: 10 and in the other: not 10. What is the difference?

Thanks for the message, we'll check/correct it.
By the way, in MSVC the result is the opposite.
 

Does anyone know that SymbolsTotal(true) and its derivatives do not show information from Market Watch at all?

Well, they should have said so in the help, but no, it's a mystery...

 

Forum on trading, automated trading systems and trading strategy testing

List of changes in MetaTrader 5 Client Terminal builds

kogriv, 2015.07.18 10:44

Any advice on what to do. There was a file - a script on mql5, the last changes were in March of 15. I haven't touched the file and the meta-editor for a long time after March. The other day I have started metatrader, I have updated it and somehow the script file (source) got switched to an earlier version. The executable file is still in the latest version. Is there any way to restore the source file?

 

You should use MQL5 Storage to save different versions.

Most likely you are talking about modification of files from the standard set of terminal scripts. They are always overwritten during updates, so do not modify them yourself. You need to make a copy under a different name and modify it.

 
Renat Fatkhullin:

You should use MQL5 Storage to save different versions.

Most likely you are talking about modification of files from the standard set of terminal scripts. They are always overwritten during updates, so do not modify them yourself. You need to make a copy under a different name and modify it.

No. The file has not been modified from the standard delivery and MQL5 Storage has not been used. The user probably went into a different "Data Folder" - at least that's the most viable version so far.
Reason: