![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?
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;
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.
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
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
Please tell me why the script gives the error "array out of range"
int aray[];
aray[0]=1;
Because you're too lazy to read the documentation.