OrderSend error handling

Oct 5, 2012 at 12:21 PM

Hi,

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.

Coordinator
Oct 5, 2012 at 2: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 11:51 AM
Edited Oct 8, 2012 at 12: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 ?

Coordinator
Oct 8, 2012 at 3:22 PM
Edited Oct 8, 2012 at 3: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")
    return(Symbol());

with

    if(message[1] == "SYMBOL")
    return(Symbol());

 

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

Oct 8, 2012 at 4:14 PM

Thanks!

Coordinator
Oct 29, 2012 at 10:56 AM

Fixed in TradePlatform.NET 2.0