Errors, bugs, questions - page 1616

 
Yeah, I guess I'm wrong after all.
 
struct A {int i;};
void F1( const A a ) {} // 'const' - objects are passed by reference only
void F2( const A &a )   // почему только через ссылку (&) допускается?
{ const A b = a; }      // ведь так (напрямую присвоение) можно!
Explain the comment in the code, please.
 
datetime time;
Print((string)time); // работает приведение типов datetime -> string

MqlTick Tick;  
Print((string)Tick); // может, сделать автоматическое приведение Mql*-типов (MqlTradeResult, MqlTradeRequest и т.д.) к string?
Sometimes you need to print a tick, trade request or response, etc. Would it be possible to do this via string conversion?
 
When testing visually, where does the 3 second pause each time come from?
2016.07.26 18:42:25.984 EURUSD.e : real ticks begin from 2016.01.04 00:00:00
2016.07.26 18:42:22.515 EURUSD.e,M1: testing of Experts\Test.ex5 from 2016.07.01 00:00 to 2016.07.15 00:00 started
2016.07.26 18:42:22.515 EURUSD.e,M1 (RoboForexEU-MetaTrader 5): generating based on real ticks

 
Why does Marketwatch/Chart show the following tick (from the future) when testing visually?
This tick can only be visually observed - you cannot get it through MQL5.
 
Why does an empty terminal offline (no charts or tester) eat up 5% of the CPU?
 
fxsaber:
Why does Marketwatch/Chart show the following tick (from the future) when testing visually?
This tick can only be visually observed - you cannot get it through MQL5.

These are the wonders of visualization.

First, a tick is applied to history. Then the delay is applied according to the current state of the visualizer. Then calculation of indicators and start of OnTick

Fix

 
fxsaber:
Why does an empty terminal (without charts and tester) suck up 5% of CPU?
It wants to connect to a trade server
 
fxsaber:
Sometimes you need to print a tick, trade request or response, etc. Would it be possible to do it via string conversion?

Through conversion of structure to string? "Monsieur knows how to make things twisted" (ц)

Make an appropriate function once and then use it

 

The last build of MT5 is crooked and impossible to work. OS Windows XP SP3

  1. The system always reads or writes something to disk, which causes other programs on the computer to hang up.
  2. Some glitch with MetaEditor call, after which the operating system is suspended - mouse movement is jerky with intervals of several minutes.