This project is read-only.

OrderSend error handling

Oct 5, 2012 at 1:21 PM


I wrote a simple expert using OrderSend but it always returns -1. So I'm wondering if there is a function like MQL4 GetLastError() for further error analysis.

Thanks, Steve.

Oct 5, 2012 at 3:18 PM

You should handle MqlError event in your .NET ExperAdvisor, also you check log in MT4 Expert tab. Error handling scenario will be described also in Documentation with next release. 

Oct 8, 2012 at 12:51 PM
Edited Oct 8, 2012 at 1:56 PM

OK: MT4 Expert tab says: error 4106 (unknown symbol) and I figured out that the reason for this is that "this->Symbol()" always returns "###NORESULT###".

Any idea ?

Oct 8, 2012 at 4:22 PM
Edited Oct 8, 2012 at 4:22 PM

BUG found and will be fixed in next release.

as temporary workaround:

replace in SYSTEM_NET_MQL.mq4 file

    if(message[1] == "Symbol")


    if(message[1] == "SYMBOL")


in next release this will be fixed in expected way. sorry

Oct 8, 2012 at 5:14 PM


Oct 29, 2012 at 11:56 AM

Fixed in TradePlatform.NET 2.0