Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Saw now that you've added a log. Here you have duplicate messages too :)
can you please explain the difference between the functions?
for (int j = OrdersHistoryTotal()-1; j >= 0; j--)
{
if(OrderSelect(j, SELECT_BY_POS,MODE_HISTORY))
и
int i=OrdersHistoryTotal();
for(int pos=0; pos<i; pos++)
{
if(OrderSelect(pos, SELECT_BY_POS,MODE_HISTORY))
No
If you look at the time, you will see that nothing is duplicated, it only prints on a new bar when there is a signal
No
Well, not exactly. One cycle from the beginning of the list, the other from the end.
No
both functions "fetch" closed orders from the history ?
Well, not exactly. One cycle from the beginning of the list, the other from the end.
both functions "fetch" closed orders from the history ?
Yes, but one is from the beginning of the story and the other from the end.
Thank you. Did I get it right, this function "goes through" from the end?
int i=OrdersHistoryTotal();
for(int pos=0; pos<i; pos++)
{
if(OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY))
Thank you. Did I get it right, this function "goes through" from the end?
int i=OrdersHistoryTotal();
for(int pos=0; pos<i; pos++)
{
if(OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY))
Thank you. Did I get it right, this function "goes through" from the end?
int i=OrdersHistoryTotal();
for(int pos=0; pos<i; pos++)
{
if(OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY))
This one searches from the zero index, i.e. from the beginning.