New MetaTrader 5 platform build 4755: General improvements - page 6

 

BUG or feature by design ?

In Strategy Tester: 4755, tab HISTORY, the columns "Profit" and "Comment" are mixed when "Orders & Deals" mode is selected.

Tester

"Orders & Deals"

Orders & Deals

No issue when displaying Orders only or Deals only.

Orders:
Orders


Deals:

Deals

 

Hello, I can make a desperate request!  Put more tools to draw in mt5.  This platform is very useful, but don't you think you should improve it a bit

Now I have a problem with drawing waves that are more than 5 and the shapes and lines are very shallow and mostly ineffective.  The classic shape may increase the speed, but it is not now 10 years ago
 

Please fix the 'Order Expiration' issue in the '1 minute OHLC' testing mode. The problem is that the 'Order Expiration' depends on the selected Time Frame, which is not the right way to do it.

.

      datetime EXP=TimeCurrent()+1*60*60;
      if(! checkOnce && m_trade.BuyStop(0.01,OOP,_Symbol,0,0,ORDER_TIME_SPECIFIED,EXP))
        {
         Print("Test_Order_Expiration. Time Frame: ",TimeframeToString(_Period)," Order Expiration: ",EXP," Price: ",DoubleToString(OOP,_Digits));

/*
Correct
2025.02.02 13:19:01.221 Core 1  2025.01.28 00:01:00   CTrade::OrderSend: buy stop 0.01 EURUSD at 1.05474 [done]
2025.02.02 13:19:01.221 Core 1  2025.01.28 00:01:00   Test_Order_Expiration. Time Frame: M1 Order Expiration: 2025.01.28 01:01:00 Price: 1.05474
2025.02.02 13:19:01.221 Core 1  2025.01.28 01:01:00   order expired [#2 buy stop 0.01 EURUSD at 1.05474]

Not correct
2025.02.02 13:19:05.960 Core 1  2025.01.28 00:01:00   CTrade::OrderSend: buy stop 0.01 EURUSD at 1.05474 [done]
2025.02.02 13:19:05.960 Core 1  2025.01.28 00:01:00   Test_Order_Expiration. Time Frame: M5 Order Expiration: 2025.01.28 01:01:00 Price: 1.05474
2025.02.02 13:19:05.960 Core 1  2025.01.28 01:05:00   order expired [#2 buy stop 0.01 EURUSD at 1.05474]

Not correct
2025.02.02 13:19:10.750 Core 1  2025.01.28 00:01:00   CTrade::OrderSend: buy stop 0.01 EURUSD at 1.05474 [done]
2025.02.02 13:19:10.750 Core 1  2025.01.28 00:01:00   Test_Order_Expiration. Time Frame: M15 Order Expiration: 2025.01.28 01:01:00 Price: 1.05474
2025.02.02 13:19:10.750 Core 1  2025.01.28 01:15:00   order expired [#2 buy stop 0.01 EURUSD at 1.05474]

Not correct
2025.02.02 13:19:14.332 Core 1  2025.01.28 00:01:00   CTrade::OrderSend: buy stop 0.01 EURUSD at 1.05474 [done]
2025.02.02 13:19:14.332 Core 1  2025.01.28 00:01:00   Test_Order_Expiration. Time Frame: H1 Order Expiration: 2025.01.28 01:01:00 Price: 1.05474
2025.02.02 13:19:14.332 Core 1  2025.01.28 02:00:00   order expired [#2 buy stop 0.01 EURUSD at 1.05474]

*/
 
Nauris Zukas #:

Please fix the 'Order Expiration' issue in the '1 minute OHLC' testing mode. The problem is that the 'Order Expiration' depends on the selected Time Frame, which is not the right way to do it.

.

Have you tried changing the symbol specs?

specs

 
Ryan L Johnson #:

Have you tried changing the symbol specs?


This is not related to the testing problem I described... and yes, I have tried changing the symbol specs.


If your EA uses pending orders with an expiration time, then keep in mind that they will only work correctly in '1 minute OHLC' testing mode if the Time Frame is set to M1.

 
Nauris Zukas #:
This is not related to the testing problem I described... and yes, I have tried changing the symbol specs.


If your EA uses pending orders with an expiration time, then keep in mind that they will only work correctly in '1 minute OHLC' testing mode if the Time Frame is set to M1.Thank

Thanks for the heads up. I never would have known this because I use market orders with merely a GTC fail-safe (server-side) stop--which always ends up getting cancelled. Also, my work generally originates from the M1 timeframe.

 

I always place _LastError at the top of the variable debugger window.
But now (after some time) I have to realise (MT5 Build 4841 dtd. Feb. 5) that the global variable _LastError is unknown?


Please change this.

 

Sigh, another problem of the debugger :(

   if( !OrderCheck(rq,rc) ) {
#ifdef _DEBUG 
   Print(__LINE__," e:",_LastError,"  ",GetLastError());
#endif   

Prints:

2025.02.07 10:23:37.361 2025.01.06 14:00:00   236 e:0  0

I'm going shopping to get rid of the frustration.

 
@Carl Schreiber #: OrderCheck

What is wrong? I don't see any issue nor a bug, only a misinterpretation on your end (I am not referring to the "unknown identifier" debugger issue but the return value of the zero error code).

It is only checking the order, not executing it. Any problems with the order request are reported in the MqlTradeCheckResult object, not GetLastError.

GetLastError only reports an error when the the function itself fails, not the order verification.

Return Value

If funds are not enough for the operation, or parameters are filled out incorrectly, the function returns false. In case of a successful basic check of structures (check of pointers), it returns true. However, this is not an indication that the requested trade operation is sure to be successfully executed. For a more detailed description of the function execution result, analyze the fields of the result structure.

In order to obtain information about the error, call the GetLastError() function.

Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Request Check Result Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Request Check Result Structure
  • www.mql5.com
Before sending a request for a trade operation to a trade server, it is recommended to check it. The check is performed using the OrderCheck()...
 
Fernando Carreiro #:

What is wrong? I don't see any issue nor a bug, only a misinterpretation on your end.

It is only checking the order, not executing it. Any problems with the order request are reported in the MqlTradeCheckResult object, not GetLastError.

GetLastError only reports an error when the the function itself fails, not the order verification.

Return Value

If funds are not enough for the operation, or parameters are filled out incorrectly, the function returns false. In case of a successful basic check of structures (check of pointers), it returns true. However, this is not an indication that the requested trade operation is sure to be successfully executed. For a more detailed description of the function execution result, analyze the fields of the result structure.

In order to obtain information about the error, call the GetLastError() function.

If OrderCheck() returns false "parameters are filled out incorrectly". .. To "obtain information about the error, call the GetLastError() function."

The function fails, but neither sets _LastError nor does GetLastError() return an error number.