Is the advisor suitable for real life? - page 32

 
When this condition occurs, the order will definitely be in the blocked area.
 
FOReignEXchange:
I am so fucking stupid. I forgot to tell the most important thing. Everything is working fine in the tester. That's the problem. If the order would not be deleted in the tester, I would not bother. But it is not deleted in the real account and is deleted in the tester if the visualization is activated after a deal. That's why I think it looks like some kind of bug in the language. I have the impression that it cannot remove much data from the selected order. This is not the first time I have encountered this issue. To be more exact, I actually encounter it all the time. Everything is OK in the tester, but not in real life.

There are no bugs.

The extended spread is a prank. And the freeze level, when reached, the order is blocked and nothing can be done about it.

 
Bicus:

There are no bugs.

The extended spread is a prank. And the freeze level, when reached, the order is blocked and nothing can be done about it.

If so, the log would show an error when you try to delete it. Only if the errors are handled in code, though.
 
OnGoing:
If so, it would write an error in the logs when trying to delete. Only if errors are handled in the code, though.
The tester is probably handling a null candle, no doubt.
 
paukas:
The tester is most likely handling a zero candle, no doubt about it.
Or maybe the server has a leaky ping, author, test with a normal broker.
 
Bicus:

There are no bugs.

The extended spread is a prank. And the freeze level, when reached, the order is blocked and nothing can be done about it.


There are no errors in the log. And the more so, such cases mostly occur in the daytime during medium volatility. Yesterday two orders were not deleted after a strong movement, about 10 minutes after it, when everything calmed down more or less. And at the time of this move on the Euro, everything seemed to be working, except for the case where errors in the log appeared.
 
paukas:
The tester is most likely handling a zero candle, no doubt about it.

What do you mean by zero?
 
FOReignEXchange:

How do you understand zero?
The current bar is in conditions. The tester sees it as already completed. And the actual cloze high and low is not yet known, only the opener.
 
Bicus:

There are no bugs.

The extended spread is a prank. And the freeze level, when reached, the order is blocked and nothing can be done about it.


The spread is always fixed. I have never seen it increase or decrease.
 
FOReignEXchange:

There are no errors in the log. Moreover, such cases usually happen in the middle of the day when the volatility is moderate. Yesterday two orders were not deleted after the strong move, about 10 minutes after it when everything calmed down. And at the time of this move on the Euro, everything seemed to be working, except for the case where errors in the log appeared.
if (//Тут условие//)
   {
   if (OrderSelect(ticket_buy,SELECT_BY_TICKET)==true)
     {
     if (OrderType() == OP_BUYSTOP && Ask > (OrderOpenPrice() - 4 * Point)) 
        {
        i=0;
        while (i<10)
              {
              if (i>0) Sleep(500);      
              RefreshRates(); OrderDelete(ticket_buy); 
              err=GetLastError();
              if (err==0)
                 {
                 ticket_buy=0; return;
                 }
              i++;
              }
        }
     }
   }

So you have a buystop order. Then you watch when the price comes close to it and try to remove it. Imho, but it's about the freeze level. Try to rewrite the code like this:

if (//Тут условие//)
   {
   if (OrderSelect(ticket_buy,SELECT_BY_TICKET)==true)
     {
     if (OrderType() == OP_BUYSTOP)
        {
         Print ("Уровень заморозки: ", MarketInfo (Symbol(), MODE_FREEZELEVEL), ", Ask: ", Ask);
         if (Ask > (OrderOpenPrice() - 4 * Point)) 
         {Print ("Зашли в условие");
           i=0;
           while (i<10)
              {
              if (i>0) Sleep(500);      
              RefreshRates(); OrderDelete(ticket_buy); 
              err=GetLastError();
              if (err==0)
                 {
                 ticket_buy=0; return;
                 }
              i++;
              }
          } 
        }
     }
   }

And frankly, it seems strange to me to delete an order only when the price is close to it.

Reason: