FORTS: OnTradeTransaction() return codes - page 10

 
Михаил:

Right, typo :)

Thanks, corrected it...

I often get confused myself ) Uncomfortable and incorrect order handling functions.

 
Sergey Chalyshev:

I often get confused myself ) inconvenient and incorrect order handling functions.

there is still one place left to go:

Ok
 

It didn't take long for MQ Alexander's "joy" to be explained!

I check before deleting the order:

 ENUM_ORD_REAL_STATE rl_state = CheckOrderState( ticket );
//---  
  switch( rl_state )
  {
    case ORD_NOT_SPECIFIED:
    case ORD_NONE_CANCELED:        
    case ORD_NONE_PARTIAL_CANCELED:
    case ORD_NONE_PARTIAL:         
    case ORD_NONE_EXPIRED:         
    case ORD_NONE_FILLED:          
    case ORD_NONE_REJECTED: Canceled();
                            break;
    case ORD_BUSY:          return;
                            break;
    case ORD_EXIST:        
    case ORD_EXIST_PARTIAL: Remove();         
                            break; 
  }

Result:

2015.12.02 16:15:00.467 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:00.467 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:00.478 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:00.478 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:00.514 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:00.514 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:00.686 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:00.686 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:00.708 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:00.708 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:01.263 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:01.263 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:01.286 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313304
2015.12.02 16:15:01.286 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
2015.12.02 16:15:01.358 Forts_trader (UJPY-12.15,H1)    Remove: Ордер не отослан! Причина: Неправильный запрос; Билет = 24313305
 

Maybe you're checking it wrong. The code is broken, there are a lot of gaskets.

It's so screwed up that you won't know exactly what state wasORDER_STATE_PARTIAL or ORDER_STATE_PLACED to understand anything further.

How can one live with such messages? It looks like there is an attempt to delete the order and the message "The order has not been sent!

 
Dmitry Fedoseev:

Maybe you're checking it wrong. The code is broken, there are a lot of gaskets.

It's so screwed up that you won't know exactly what state wasORDER_STATE_PARTIAL or ORDER_STATE_PLACED to understand anything further.

How can one live with such messages? It looks like there is an attempt to delete the order and the message "The order has not been sent!

https://www.mql5.com/ru/forum/58012/page2#comment_2017705
ФОРТС: OnTradeTransaction() коды возврата
ФОРТС: OnTradeTransaction() коды возврата
  • www.mql5.com
Сейчас, коды возврата торгового сервера функции OnTradeTransaction() выглядят так:. - Страница 2 - Категория: биржевой трейдинг
 
It still does not shed any light on whetherORDER_STATE_PARTIAL or ORDER_STATE_PLACED
 
Dmitry Fedoseev:
It still does not shed any light on what wasORDER_STATE_PARTIAL or ORDER_STATE_PLACED
https://www.mql5.com/ru/forum/58012/page9#comment_2074928
ФОРТС: OnTradeTransaction() коды возврата
ФОРТС: OnTradeTransaction() коды возврата
  • www.mql5.com
Сейчас, коды возврата торгового сервера функции OnTradeTransaction() выглядят так:. - Страница 9 - Категория: биржевой трейдинг
 

Here:

case ORD_EXIST:         
case ORD_EXIST_PARTIAL: Remove();  
 
Dmitry Fedoseev:

Here:

Here what?
 
Михаил:
What is it?
It's not clear exactly what the status of the warrant was.