Questions from Beginners MQL5 MT5 MetaTrader 5 - page 945

 

Can you tell me how to get the time of the last modification of an order?

It seems to me that this information should be given by function OrderGetInteger with parameterENUM_ORDER_PROPERTY_INTEGERhttps://www.mql5.com/ru/docs/constants/tradingconstants/orderproperties#enum_order_property_integer.

I don't see it there. Maybe there is another way?

Документация по MQL5: Константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Приказы на проведение торговых операций оформляются ордерами. Каждый ордер имеет множество свойств для чтения, информацию по ним можно получать с помощью функций Идентификатор позиции, который ставится на ордере при его исполнении. Каждый исполненный ордер порождает сделку, которая открывает новую или изменяет уже существующую позицию...
 
pivomoe:

Can you tell me how to get the time of the last modification of an order?

It seems to me that this information should be given by function OrderGetInteger with parameterENUM_ORDER_PROPERTY_INTEGERhttps://www.mql5.com/ru/docs/constants/tradingconstants/orderproperties#enum_order_property_integer.

I don't see it there. Maybe there is another way?

A pending order or a position?

 
Vladimir Karputov:

Is it a pending order or a position?

A pending order. I want to find out which order has not been modified for the longest time. By the way, is there any way to quickly find out how much margin the pending order has eaten?

 
pivomoe:

Pending order. I want to find out which order has not been modified the longest. By the way, is there any way to quickly find out how much margin the pending order has eaten?

There is no modification of an order in the trading history. Neither for pending orders nor for modifications of positions.
 
Vladimir Karputov:
Operations of modifications are not stored in the trading history. Neither for pending orders nor for modifications of positions.

I just found out now. On the MICEX futures market, OrderGetInteger ( ORDER_TIME_SETUP ) gives just the modification time, not as stated in the help. (The order placing time).

 
Nauris Zukas:

Afternoon. I wanted to make an mqh file where the calculated arrays will lie until I close the terminal and re-download them only when there is a big time gap (3600 in my case). But if I compile the indicator, the mqh file also resets all arrays. How can I perform all operations with indicator and compile it, but mqh file is not reset until the terminal is closed?

Ok, I'll ask another question. For example, I can write all data in the file (FileWrite), then I can do everything with the indicator and compile it, and even if the terminal is closed, I can always return to the file for the data(FileReadString), it will be there. Question, is it possible to write all the data not in a file, but in memory of computer (or terminal), as in an array? The array is not suitable, because it is reset when you compile the indicator. The data must be saved while the terminal is open.

 
Nauris Zukas:

OK, let me ask a different question. For example, I can write all data in the file (FileWrite), then I can do everything with the indicator and compile, and even the terminal is closed, but I can always then refer to the file for data (FileReadString), they will be there. Question, is it possible to write all the data not in a file, but in memory of computer (or terminal), as in an array? The array is not suitable, because it is reset when you compile the indicator. The data must be saved while the terminal is open.


Only if in the global variables of the terminal.

 
pivomoe:


Only if in the global variables of the terminal.

You probably meant GlobalVariable...(). Thanks, I'll have a look.

 
Nauris Zukas:

You must have meant GlobalVariable...(). Thanks, I'll have a look.

How people here like to read diagonally.

Of course, that's exactly what he meant.

 
Comments not related to this topic have been moved to "Questions from MQL4 MT4 MetaTrader 4 beginners".