Forum

Getting _LastError = 4012 unexcpectedly immediate following the return from a Class method.

In my MQL5 EA, I have a class StatusReport that contains a method: static void TestReports(). In OnInit() I have a call to StatusReport::TestReports(); Before the call to TestReports(), the err = GetLastError(); returns 0. At the end of TestReports(), before returning, the statement err =

MetaTrader 5 is not showing quotes for XAUUSD

My MetaTrader 5 platform is not showing any prices or chart for symbol XAUUSD . Why? I added the symbol XAYYSD and M15 chart, but nothing is showing

Authorization Failure

What does this mean in Journal? What do I have to do? 2025.11.06 11:29:46.909 Network '96981693': authorization on MetaQuotes-Demo failed (Invalid account)

Need to connect to existing MT5 demo account

I lost my computer recently to hardware failure. I had to setup new computer. I downloaded new MetaTrade5. I need to connect it to existing demo account . The setup requires a login number that I do not have. MetaQuotes does no have live technical support or telephone number to help. How do I login

MT5 Git Commit is greyed out

I have made changes to several MT5 *.mqh files, but on right-click, the Git Commit entry is greyed out. How do I commit my changes

Issues with OnTradeTransaction

CHistoryOrderInfo StopLoss and TakeProfit values are 0.0 at OnTradeTransaction case TRADE_TRANSACTION_HISTORY_ADD when CHistoryOrderInfo TypeDescription = ORDER_TYPE_SELL I am writing a MT5 Expert Adviser (EA) that Buys long positions and maintains both a trailing SL and a leading TP. The EA will

CDealInfo.TypeDescription() does not "Get the deal type as a string". (from documentation)

The string produces by CDealInfo.TypeDescription() is not a string representation of ENUM_DEAL_TYPE identifiers. For example, a CDealInfo. DealType = 0 is DEAL_TYPE_BUY in ENUM_DEAL_TYPE , but for CDealInfo. DealType = 0, CDealInfo.TypeDescription() returns the string "Buy type" (length: 8) in the

Getting Critical Error with no Debug or Error information

Debugging my EA, I am getting: Journal: 2025.09.03 07:37:44.290 MQL5 debugger Critical error while running expert 'PolishedGoldEA (XAUUSD,M15)'. Unknown error. The Debug tab shows no Trace data at the error. I searched Forum for Debug Critical Error and it said that the error information will be on

DEAL_EXTERNAL_ID() missing from CDealInfo

The HistoryDealGetString() has a DEAL_EXTERNAL_ID string property for HistoryDealGetString() , but the CDealInfo class does not have an equivalent DEAL_EXTERNAL_ID string function. Why not? If the CDealInfo class implementation incomplete or is the DEAL_EXTERNAL_ID now an obsolete property? Is

Programatically selecting EA to run on Chart

Is there a way to programmatically, or using Settings on MetaQuotes, to have an EA automatically selected and run on a chart? It would be nice if the account could be set up to automatically select a Chart currency, timeframe and an EA to run on the chart whenever the account is started. How is this