Yedelkin: Yes, I'm not asking. But in this case we need to ensure that the actual loss does not exceed a specific value. And the tickvalue is used in two forms when calculating the volume.
Well, if you need it for a loss, then use tickvalue for a loss.
Can you tell me how to implement a structure transfer to a function without knowing the structure beforehand?
How to implement a structure transfer to a function without knowing the structure beforehand :) ?
Let me reformulate. Are you interested in whether, when defining a function
имя_функции(формальные_параметры)
{
инструкции
}
specify a variable of the structure type as its formal parameter, ignoring the name of the structure itself? That is, for example, to specify not void funcName(MqlTradeRequest & req) but just void funcName(& req)?
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.
Yedelkin:
if the value of a tick is not equal to 1, then the value of such a tick is floating.
Yes, I'm not asking. But in this case we need to ensure that the actual loss does not exceed a specific value. And the tickvalue is used in two forms when calculating the volume.
the wrong conclusion.
Well, if you want it for loss, then take tickvalue for loss.
Yes, we'll have to take it and test it. "For admissibility". Thank you, although nothing has been cleared up "in physics".
And the "right" conclusion...
What is the "correct" conclusion?
the tickvalue is different for different instruments. run the script from the kit - SymbolInfo and look at the yen
and by the way, tickvalue=1 is for 5-digit some instruments. for their 4-digit it =10
for different instruments a different tickvalue.
Use the structure as a wrapper for a dynamic buffer. This has been tested - it works.
Can you tell me how to implement a structure transfer to a function without knowing the structure beforehand?
How to implement a structure transfer to a function without knowing the structure beforehand :) ?
Only simple structures.
PS/ Because the built-in ones do it somehowFileReadStruct, FileWrite
Or declare a function like this
Writes Class type expected
Can you tell me how to implement a structure transfer to a function without knowing the structure beforehand?
How to implement a structure transfer to a function without knowing the structure beforehand :) ?
Let me reformulate. Are you interested in whether, when defining a function
имя_функции(формальные_параметры) { инструкции }specify a variable of the structure type as its formal parameter, ignoring the name of the structure itself? That is, for example, to specify not void funcName(MqlTradeRequest & req) but just void funcName(& req)?