Questions from a "dummy" - page 61

 

Yedelkin:

if the value of a tick is not equal to 1, then the value of such a tick is floating.

incorrect conclusion.
 
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.
 
sergeev:
the wrong conclusion.
What is the "right" conclusion?
 
sergeev:
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...

 
Yedelkin:
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

 
sergeev:

for different instruments a different tickvalue.

OK, your approach is clear.
 
Dima_S:
Use the structure as a wrapper for a dynamic buffer. This has been tested - it works.
I'd like an example...
 

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

int funRead(&anyStructDest)
   {
    filehandle = ............;
    FileReadStruct(filehandle, anyStructDest);
   } 
int funWrite(&anyStructSours)
   {
    filehandle = ............;
    FileWrite(filehandle, anyStructSours);
    } 
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
  • www.mql5.com
Основы языка / Типы данных / Структуры и классы - Документация по MQL5
 

Or declare a function like this

void funRead( ... );

Writes Class type expected

 
rlx:

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)?

Документация по MQL5: Основы языка / Переменные / Формальные параметры
Документация по MQL5: Основы языка / Переменные / Формальные параметры
  • www.mql5.com
Основы языка / Переменные / Формальные параметры - Документация по MQL5
Reason: