Errors, bugs, questions - page 1882

 
vinnipyx:
Afternoon. I have such a bug in MT5: It does not save settings in spite of a tick. Specifically, every time I run it, all the toolbars appear hidden and I have to open them again each time I run it. At next startup panels appear briefly, but then disappear (apparently after establishing connection with the broker). How can this be fixed (opening broker)?


Have you pressed F11 by any chance?

Full screen

Full screen

Enable/disable full screen mode. This option disables toolbars, status bar and closes all service windows. The MetaEditor title bar, main menu, code editing window and file tabs remain on the screen.

 
Vladimir Karputov:


Have you pressed F11 by any chance?

Full screen

Enable/disable full screen mode. Enabling this option disables toolbars, status bar and closes all service windows. The MetaEditor title bar, main menu, code editing window and file tabs remain on the screen.

Thank you very much! I am sick of this situation for a fortnight. Yes, I must have accidentally pressed f1.
 
fxsaber:

You need to get a bar/tick history for several thousand recent units at once for all symbols in Market Watch (several hundred). And update it real time.

Is the MT5 architecture optimized for such screencasts? Will the new program type be able to solve such tasks without crutches?

What do I need to raise all caches from cold state and make them actual?

And how to make a tester stay alive when running a screener?


If you want to get a screener like Finwiz, with technical indicators, they also complain that every handle eats a lot of memory, that MC promise to fight with it. So, if it will screen with some periodicity of market review, it needs a lot of memory, and for the first run a lot of time.
 
kaus_bonus:

why you need a screener in the tester I don't know.
It's a multivolume at once for a hundred symbols, where each OnTimer analyses the tick history of all the symbols.
 
fxsaber:
It's a multi-column at once by a hundred symbols, where each OnTimer analyses the tick history of all the symbols.


normal way of committing suicide))

when running in the tester all tick data is re-prepared?! 1 month/ ticker is about 100 MB. if the whole market overview, then...the disk has to be rubber, but how long does it take?

If you remember that the cache of the tester agent is cleared after 5 minutes of agent inactivity, just imagine: you have been preparing data for an hour or two, left for 5 minutes and that's it, you have to start again.

 
kaus_bonus:

normal way of committing suicide))

Hence the questions. If I understand correctly, the tester is doing fine in S# infrastructure. I might be wrong.
 

Seems to be used to MT5, as I don't remember at all in MT4 logging from OrderSend execution.

Since which MT4 build is this unauthorized handling of the log? In MT5, only Print and similar special user actions (+execution errors and the auto-trading button) can make records there. Or was it always like that in MT4?

 
fxsaber:

You need to get a bar/tick history for several thousand recent units at once for all symbols in Market Watch (several hundred). And update it real time.

Is the MT5 architecture optimized for such screencasts? Will the new program type be able to solve such tasks without crutches?

What do I need to lift all caches from cold state and make them actual?

Warming up caches
#define _CS(A) ((!IsStopped()) && (A))
#define  TOSTRING(A) #A + " = " + (string)(A) + "\n"

void OnStart()
{
  ulong FullCycle = 0;
  MqlTick Ticks[];
  
  while (_CS(true))
  {
    const ulong StartTime = GetMicrosecondCount();
    
    for (int i = SymbolsTotal(true) - 1; _CS(i >= 0); i--)
      Comment(TOSTRING(SymbolsTotal(true)) + TOSTRING(SymbolName(i, true)) +
              TOSTRING(i) + TOSTRING(CopyTicks(SymbolName(i, true), Ticks)) +
              TOSTRING(MQLInfoInteger(MQL_MEMORY_USED)) + TOSTRING(MQLInfoInteger(MQL_MEMORY_LIMIT)) +
              TOSTRING(FullCycle));
              
    FullCycle = GetMicrosecondCount() - StartTime;              
  }
}

We can clearly see from the script runtime that CopyTicks is not asynchronous. MQL_MEMORY_USED is lying.

And most importantly, something is stumbling caches (Metaquotes-Demo).

Please run with at least a hundred symbols in Market Watch.

Moreover, the problem with the caches only on some characters is noticeable. The rest are fine.

Seems to be stuck in CopyTicks on these characters

 
Konstantin:

1. When will there be a description of the union in the documentation?

2. Is it a replacement for simple structures?

3. Will the union type conversion be supported as described for structures in the documentation?

1. Added union

2. Not really - it is possible to get different representation of data

3. no

 

MT5 1598

void OnStart()
{
  string Array[];
  
  ArrayInitialize(Array, "");
}

Compiler log

'ArrayInitialize' - no one of the overloads can be applied to the function call Test2.mq5       5       3
could be one of 8 function(s)   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
   built-in 'ArrayInitialize'   Test2.mq5       5       3
1 error(s), 0 warning(s)                2       1

Will the function signatures be visible in the log?