I think I found a bug in one of the include files that come with MT5: Its in class COrderInfo (file trade\OrderInfo.mqh) line 194.
Below code is an excerpt from this file: lines 171-199. The bug is in method TypeTimeDescription(). As you can see it returns the wrong data namely the same as method TypeFillingDescription() does. In the snippet below you can see that I commented the wrong code and inserted the (in my opinion) correct code.
//+------------------------------------------------------------------+ //| Get the property value "ORDER_TYPE_FILLING" as string | //+------------------------------------------------------------------+ string COrderInfo::TypeFillingDescription(void) const { string str; //--- return(FormatTypeFilling(str,TypeFilling())); } //+------------------------------------------------------------------+ //| Get the property value "ORDER_TYPE_TIME" | //+------------------------------------------------------------------+ ENUM_ORDER_TYPE_TIME COrderInfo::TypeTime(void) const { return((ENUM_ORDER_TYPE_TIME)OrderGetInteger(ORDER_TYPE_TIME)); } //+------------------------------------------------------------------+ //| Get the property value "ORDER_TYPE_TIME" as string | //+------------------------------------------------------------------+ string COrderInfo::TypeTimeDescription(void) const { string str; //--- //return(FormatTypeTime(str,TypeFilling())); // <<<-wrong-<<<<<<<<< return(FormatTypeTime(str,TypeTime())); // <<<-correct-<<<<<<< } //+------------------------------------------------------------------+ //| Get the property value "ORDER_MAGIC" | //+------------------------------------------------------------------+
Unfortunately I have no working example that shows the effect of this bug. sorry for that.
Hi friends,
I think I found a bug in one of the include files that come with MT5: Its in class COrderInfo (file trade\OrderInfo.mqh) line 194.
Below code is an excerpt from this file: lines 171-199. The bug is in method TypeTimeDescription(). As you can see it returns the wrong data namely the same as method TypeFillingDescription() does. In the snippet below you can see that I commented the wrong code and inserted the (in my opinion) correct code.
//| Get the property value "ORDER_TYPE_FILLING" as string |
//+------------------------------------------------------------------+
string COrderInfo::TypeFillingDescription(void) const
{
string str;
//---
return(FormatTypeFilling(str,TypeFilling()));
}
//+------------------------------------------------------------------+
//| Get the property value "ORDER_TYPE_TIME" |
//+------------------------------------------------------------------+
ENUM_ORDER_TYPE_TIME COrderInfo::TypeTime(void) const
{
return((ENUM_ORDER_TYPE_TIME)OrderGetInteger(ORDER_TYPE_TIME));
}
//+------------------------------------------------------------------+
//| Get the property value "ORDER_TYPE_TIME" as string |
//+------------------------------------------------------------------+
string COrderInfo::TypeTimeDescription(void) const
{
string str;
//---
//return(FormatTypeTime(str,TypeFilling())); // <<<-wrong-<<<<<<<<<
return(FormatTypeTime(str,TypeTime())); // <<<-correct-<<<<<<<
}
//+------------------------------------------------------------------+
//| Get the property value "ORDER_MAGIC" |
//+------------------------------------------------------------------+
Unfortunately I have no working example that shows the effect of this bug. sorry for that.
Cheers,
Twan