Errors, bugs, questions - page 451

 

I suspect that the tester does not record an order in the history that closes a position due to the end of testing.

As a result, when deinitializing the Expert Advisor, you cannot get profit data of the last trade. The position is closed but there is no order of the OUT type.

How to fix the problem?

 
Thank you, we will check the accounting of the last transaction.
 
MoneyJinn:

I suspect that the tester does not record an order in the history that closes a position due to the end of testing.

As a result, when deinitializing the Expert Advisor, you cannot get profit data of the last trade. The position is closed but there is no order of the OUT type.

How do I solve the problem?

Orders and deals at the end of testing are written to the history with the comment 'end of test', you can view them in the tab "History". You can obtain the data on them in the history only by analyzing the orders or deals with the comment. Why is it so? Apparently, they are considered as executed after the end of the testing interval and are not trades in the full sense.

P.S. Sorry, in the 'Results' tab of the strategy tester.

 

To the developers of

Please make a list of EA / library functions to be formed when opening *.mq5 and *.mqh files.

I would also like to have a separate list of object classes, so that I could navigate to the class declaration.

PS

And in general, the formation of a list of functions should not be tied to the compilation, press Alt + M and get a list of functions (the file could lie anywhere).

 

Please tell me why the script gives the error "array out of range"

int aray[];
aray[0]=1;

 
Valmars:

Both orders and trades at the end of the test are recorded in the history with the comment 'end of test', you can view them in the 'History' tab. Their data can only be retrieved in the de-junction by analysing the 'Comment' of orders or trades. Why is it so? Apparently, they are considered as executed after the end of the testing interval and are not trades in the full sense.

P.S. Sorry, on the 'Results' tab of the strategy tester.

Unfortunately, the problem is that the terminal only publishes the order to close a position with a comment in the 'Results' tab.

The corresponding order is not added to the HistoryDealsTotal() list.

In the general list of orders HistoryOrdersTotal(), the order is also missing, even if we select a period with some reserve.

 
220Volt:

Please tell me why the script gives an error "array out of range".

int aray[];
aray[0]=1;

You forgot to allocate/allocate space in the array.

You should use ArrayResize for dynamic arrays

 
220Volt:

Please tell me why the script gives an error "array out of range".

int aray[];
aray[0]=1;

Where does it say " array out of range"?

You need something like this

int ArrDemo[];
int Index = 1;

ArrayResize(ArrDemo,Index);
ArrDemo[Index-1]=1;
Документация по MQL5: Операции с массивами / ArrayRange
Документация по MQL5: Операции с массивами / ArrayRange
  • www.mql5.com
Операции с массивами / ArrayRange - Документация по MQL5
 
220Volt:

Please tell me why the script gives the error "array out of range"

int aray[];
aray[0]=1;

Because you are too lazy to read the documentation.
 
MetaDriver:
Because you're too lazy to read the documentation.
The most correct answer :)
Reason: