Структура для получения текущих цен - Структуры данных - Константы, перечисления и структуры - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Valeriy Yastremskiy #: That's the one I don't fully understand. You can get and it fills the structure))) Didn't expect equality)
What's unclear in this help text?
"A variable of MqlTick type allows you to get the values of Ask, Bid, Last and Volume in one call to SymbolInfoTick(). "
A structure is just a data object into which you can write several values of different types.
If you don't write anything to the structure, what do you think will be in its fields?
In Help, it says "in one call to SymbolInfoTick() function", which means, that calling this function will fill the MqlTick structure passed to it.
In itself, the variable with structure type MqlTick will not magically fill in anything.
You write something in your variable, don't you? For example, Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK);.
What's the difference between these variables, then, that you want to see it filled with data immediately after declaring a variable with MqlTick type?
"A variable of MqlTick type allows you to get the values of Ask, Bid, Last and Volume in one call to SymbolInfoTick(). "
A structure is just a data object into which you can write several values of different types.
If you don't write anything to the structure, what do you think will be in its fields?
In Help, it says "in one call to SymbolInfoTick() function", which means, that calling this function will fill the MqlTick structure passed to it.
In itself, the variable with structure type MqlTick will not magically fill in anything.
You write something in your variable, don't you? For example, Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK);.
What's the difference between these variables, if you want to see it filled with data right after declaring a variable of MqlTick type?
It's about the difference in perception))). This is the second time with me. OrderSelect also fills the structure, and I learned about it in the forum, and I did not understand it from the help. Maybe it's just me of course))))
It's about differences in perception.)) This is the second time it has happened to me. OrderSelect also fills in the structure, and I found out about it in the forum, but I didn't understand it from the help. Maybe it's just me of course))))
Solutions may be different)))) )))
If something (array, structure, variable) is passed to a function by reference, then it is logical to assume that it is filled in the function and the result is immediately displayed in the array, structure, variable
If something (array, structure, variable) is passed to a function by reference, it is logical to assume that it is filled in the function, and the result is immediately displayed in the array, structure, variable
An array and a structure are ALWAYS passed to a function by reference.
Array and structure are ALWAYS passed to a function by reference.
We're talking about documentation, its usability when you get to know it), about references to an array / structure when passing them to a function, no argument)))
In general, of course you can guess, assume... but the soldier is not always clear, even a direct order))) Therefore, he is asked to repeat it)))
#define Symbol_SymbolintOnInit()
{
Ask=SymbolInfoDouble(Symbol,SYMBOL_ASK); // Так работает
Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK); // Почему ошибку скобок пишет?
#define Symbol()_Symbol // скобки были пропущеныintOnInit()
{
Ask=SymbolInfoDouble(Symbol,SYMBOL_ASK); // Так перестанет работать
Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK); // Так начнет
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thanks, I see.)
Actually, the filling could be written explicitly)))), but not like this
MqlTickVariable of MqlTick type allows you to get values Ask, Bid, Last and Volume in one call to SymbolInfoTick() function.
There is an example in the help.
There is an example in the help.
That's the one I don't fully understand. You can get and it fills the structure))) Didn't expect equality)
What's unclear in this help text?
"A variable of MqlTick type allows you to get the values of Ask, Bid, Last and Volume in one call to SymbolInfoTick(). "
A structure is just a data object into which you can write several values of different types.
If you don't write anything to the structure, what do you think will be in its fields?
In Help, it says "in one call to SymbolInfoTick() function", which means, that calling this function will fill the MqlTick structure passed to it.
In itself, the variable with structure type MqlTick will not magically fill in anything.
You write something in your variable, don't you? For example, Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK);.
What's the difference between these variables, then, that you want to see it filled with data immediately after declaring a variable with MqlTick type?
What's unclear in this help text?
"A variable of MqlTick type allows you to get the values of Ask, Bid, Last and Volume in one call to SymbolInfoTick(). "
A structure is just a data object into which you can write several values of different types.
If you don't write anything to the structure, what do you think will be in its fields?
In Help, it says "in one call to SymbolInfoTick() function", which means, that calling this function will fill the MqlTick structure passed to it.
In itself, the variable with structure type MqlTick will not magically fill in anything.
You write something in your variable, don't you? For example, Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK);.
What's the difference between these variables, if you want to see it filled with data right after declaring a variable of MqlTick type?
It's about the difference in perception))). This is the second time with me. OrderSelect also fills the structure, and I learned about it in the forum, and I did not understand it from the help. Maybe it's just me of course))))
Solutions may be different)))) )))
It's about differences in perception.)) This is the second time it has happened to me. OrderSelect also fills in the structure, and I found out about it in the forum, but I didn't understand it from the help. Maybe it's just me of course))))
Solutions may be different)))) )))
If something (array, structure, variable) is passed to a function by reference, then it is logical to assume that it is filled in the function and the result is immediately displayed in the array, structure, variable
If something (array, structure, variable) is passed to a function by reference, it is logical to assume that it is filled in the function, and the result is immediately displayed in the array, structure, variable
An array and a structure are ALWAYS passed to a function by reference.
Array and structure are ALWAYS passed to a function by reference.
We're talking about documentation, its usability when you get to know it), about references to an array / structure when passing them to a function, no argument)))
In general, of course you can guess, assume... but the soldier is not always clear, even a direct order))) Therefore, he is asked to repeat it)))
A question has arisen.
Funny mistake of copypaste)))
Funny mistake in copypaste)))
The macro matched the function name
The macro matched the function name
No, the substitution gave the wrong result.
_Symbol() // скобки лишние