Ctrade ResultRetcodeDescription() question

 

The ResultRetcodeDescription() portion of this works on a demo account but not on a live account.

Why?

#include <Trade\Trade.mqh>

Print("Buy ",SymbolArr[N]," has been successfully completed. Code=",Trade.ResultRetcode()," (",Trade.ResultRetcodeDescription(),")");


Buy EURJPY has been successfully completed. Code=10009 (done at 0.000)


vs


Buy EURJPY has been successfully completed. Code=10009 (done at 125.738)

 

Is your build 2006 or 2007?

I'm having similar issues

 
This is not a bug.
 
Dua Yong Rew:

Is your build 2006 or 2007?

I'm having similar issues

build 1940 but i just updated it to 2007

 
fxsaber:
This is not a bug.

what makes you think this?

 
Mark Lewis:

what makes you think this?

10009 - successfully sent a market order (not Deal).

 

yeah, we would use...

Print("Buying ",SymbolArr[N]," has been successfully completed. Code=",Trade.ResultRetcode()," (",Trade.ResultPrice(),")");

...to give the trade price accepted by the broker. But it just seemed odd to me that the other worked on Demo accounts but not Live accounts

 
This library is more a toy for demo accounts than a serious thing for real accounts.