Forum

Asynchronous OrderSend() function in Python

The MetaTrader 5 Python package offers the order_send() function, analogous to MQL5's OrderSend() . This is a synchronous function; the caller has to wait for the MT5 server response before proceeding. When a trading strategy necessitates multiple orders at varying prices or symbols, using the

Are history_orders_get() and history_deals_get() always chronologically ordered in MQL5?

When using the Python Integration functions history_orders_get() and history_deals_get() , I've noticed that the returned orders and deals always seem to be sorted by their execution timestamp in chronological order. If I can rely on this ordering, it would simplify my logic and enhance the

Stock exchange broker's tick data has the volume field populated in non-trade events. What does it mean?

Hello, I've been examining the discrepancies in my algorithm's behavior between the tick data from two different Brazilian stock exchange brokers, and I've pinpointed the cause: The image above shows the Broker 1 log on the left and the Broker 2 log on the right. In both logs, events 56 (buy

OrderSendAsync() - is it guaranteed that the commands are processed in the same order they are sent?

Dear friends, Suppose I have a pending sell limit order for a certain instrument in a stock exchange market. If I run an OrderSendAsync() command to cancel this order and, shortly thereafter, I run another OrderSendAsync() command to send a market buy order for the same instrument, is it guaranteed