Errors, bugs, questions - page 1794

 
Комбинатор:
why?

There are thongs (two pieces).

The developers could still make a similar working solution for MqlTradeResult if

struct MqlTradeResult
  {
   uint     retcode;          // Код результата операции
   ulong    deal;             // Тикет сделки, если она совершена
   ulong    order;            // Тикет ордера, если он выставлен
   double   volume;           // Объем сделки, подтверждённый брокером
   double   price;            // Цена в сделке, подтверждённая брокером
   double   bid;              // Текущая рыночная цена предложения (цены реквота)
   double   ask;              // Текущая рыночная цена спроса (цены реквота)
   string   comment;          // Комментарий брокера к операции (по умолчанию заполняется расшифровкой кода возврата торгового сервера)
   uint     request_id;       // Идентификатор запроса, устанавливается терминалом при отправке  
   uint     retcode_external; // Код ответа внешней торговой системы
  };

field-string would be made last. But for MqlTradeRequest even this would not help.

 
fxsaber:

There are thongs (two pieces).

Yeah, I didn't think of that.
 

fxsaber:

Result

STRUCT::~STRUCT
STRUCT::~STRUCT
STRUCT::~STRUCT
Why three times and not two?
Almost always one call will be unnecessary ... here are the details https://www.mql5.com/ru/forum/1111/page1657#comment_2729876
Ошибки, баги, вопросы
Ошибки, баги, вопросы
  • www.mql5.com
Форум алго-трейдеров MQL5
 
A100:
Almost always one call will be unnecessary ... here are the details https://www.mql5.com/ru/forum/1111/page1657#comment_2729876
So it's not a bug, but a result of the C++ compiler key the developers are using?
 
безfxsaber:
I.e. it's not a bug, but a result of a C++ compiler key the developers use?

This is standard behaviour, which in the vast majority of cases can be optimised without damage and is not yet optimised

int i = 1 + 2; //стандартное поведение: вычислять i при выполнении
               //оптимизация: сразу присвоить 3
 
1530 - what is it?
 
A100:

This is standard behaviour, which in the vast majority of cases can be optimised without damage and is not yet optimised

int i = 1 + 2; //стандартное поведение: вычислять i при выполнении
               //оптимизация: сразу присвоить 3
Optimisation is good, thank you. But if all is executed honestly, where do the three steps come from?
 
fxsaber:
Optimization is good, thanks. But if everything is executed honestly, where do the three steps come from?

Notify ServiceDesk

struct S {
        S()  { Print( __FUNCTION__ ); }
        ~S() { Print( __FUNCTION__ ); }
};
S f()
{
        S s;
        return s;
}
void OnStart() //2 раза  
{
        f();
}

so 2 times call (what has changed? - there is a constructor),

I assumed that the compiler in your example completes the code like this

void OnStart() //3 раза 
{
        S s = f(); //s при этом - не используется

}

 
A100:

Report to ServiceDesk

Wrote.

so 2 times the call(what has changed? - there is a constructor),

Mysterious MQL...
 

Is it necessary to write to SR if one of the servers gets a zero Result.deal every time aposition is successfullyopened by a market order?

I'm not sure if this is an error, because this is probably how the server itself is set up. Moreover, you can always get Result.deal from Result.order anyway.