Forum

How to determine exact moment of market closure for the weekend

There doesn't seem to be any function that indicates whether the market is open or closed. I have looked at: IsConnected() IsTradeAllowed() MarketInfo(Symbol(), MODE_TRADEALLOWED) However all of these still return true or 1 during the weekend. Is there a foolproof and good way to truly determine

Order request sometimes not being dispatched to server, causing trade timeout error. Could be a bug.

Each order operation request (OrderSend, OrderModify, OrderClose) goes through a number of stages, with the first steps being display of the details in the Journal log and the transmission of the request to the server. However, it often seems that the request is never dispatched, and the order

Alternative to IsConnected()

IsConnected() within a continuous loop seems to take around a minute to react to a lost connection. A timeout of execution of a submitted trade operation can take a few minutes to return to the client. These durations are too long. Are there any alternatives that would tell me in under 5s whether

Data Center information retrieval and control programmatically

Is it possible to programmatically work with the Data Center data that you can see when you click on the bottom right corner of the terminal window? Some data centers may be more reliable than others, possibly depending on the physical location of the client. It would be good to be able to retrieve

Can a broker disable expert advisors?

Can a broker disable expert advisors? Does IsExpertEnabled() check whether the broker has enabled or disabled expert advisors? Or does it only check whether the user has enabled it in the terminal? Similarly, does IsTradeAllowed() check whether the broker has enabled or disabled trading in the

History Center and running Strategy Tester in Visual Mode

When will MT5 allow us to import custom historical data like in MT4's History Center? Also, MT4 could run the Strategy Tester in Visual Mode. Will this feature be implemented in MT5? These are the two main missing features that are preventing me from migrating from MT4 to MT5

Convert MQL double to IEEE-754 binary or hexadecimal string or byte array

In stdlib there is a function called IntegerToHexString that converts an integer to a hexadecimal string. However I need a function that converts a double in MQL to a binary or hexadecimal string based on the IEEE-754 format. The procedure is outlined here: IEEE 754 Standard for Floating Point

RefreshRates() not working properly or broker price feed frozen, yet order is executed, causing slippage repeatedly

Please see an excerpt of my log below in which I recorded order execution details. I have bolded the requested open price and the slippage incurred in pips. 2009 - 12 - 04 08 : 19 : 59.133 , Sending order open # 12383682 sell 0.10 EURUSDb at 1.50753 ok 2009 - 12 - 04 08 : 19 : 59.414 , sell , 0.28 s

Price feed frozen - how to check for and handle in an Expert Advisor

I sometimes see that the price feed from a broker has stopped, only to resume a while later. Just in the last hour I saw that the price froze for around 6 minutes, base on the time in the MarketWatch pane. It's a demo account , and I presume that brokers may not worry as much as with live servers