Errors, bugs, questions - page 1591

 
Sergey Kruglov:
The problem is that when I download a trial version of some EA on mt4, a non-working terminal opens, and then I deleted it and now no terminal opens at all, although I have three more of them installed. Is there any way to specify that programs are downloaded into a particular terminal?
Search directly from the desired terminal - there is a search field in the upper right corner of MetaTrader 5.
 

Question for connoisseurs.

I need to figure out how much memory I can use for the CopyTicks query so I don't get 'out of memory'.

Unfortunately, I can't find out via the terminal how much available memory I currently have.

I use a simple script to get the information:

void OnStart()
  {
   int memory_physical=TerminalInfoInteger(TERMINAL_MEMORY_PHYSICAL);
   printf("Physical memory in the system: %d MB",memory_physical);

   int memory_total=TerminalInfoInteger(TERMINAL_MEMORY_TOTAL);
   printf("Memory available to the process of the terminal (agent): %d MB",memory_total);

   int memory_available=TerminalInfoInteger(TERMINAL_MEMORY_AVAILABLE);
   printf("Free memory of the terminal (agent) process: %d MB",memory_available);

   int memory_used=TerminalInfoInteger(TERMINAL_MEMORY_USED);
   printf("Memory used by the terminal (agent): %d MB",memory_used);
  }

2016.05.29 09:50:50.642    MemoryTest (EURUSD,H1)    Memory used by the terminal (agent): 319 MB
2016.05.29 09:50:50.632    MemoryTest (EURUSD,H1)    Free memory of the terminal (agent) process: 23963 MB
2016.05.29 09:50:50.621    MemoryTest (EURUSD,H1)    Memory available to the process of the terminal (agent): 24282 MB
2016.05.29 09:50:50.611    MemoryTest (EURUSD,H1)    Physical memory in the system: 12141 MB

For some reason the available memory is twice as much as the physical memory. It's not the swap, it's small (400 MB). I was expecting the value to be like in task manager, available memory is about 7000 MB.

Who can tell me what these strange numbers are?

 

Good evening, please advise how to get rid of error 4059 in the tester. I really want to get prices for another instrument, e.g. LTCUSD, from an Expert Advisor working with one instrument, for example LTCBTC.

void OnTick()
  {
//---
   {if(One)
   { 
      ResetLastError();
      Print("1. LTCBTC >>",MarketInfo("LTCBTC",MODE_BID));
      Print(" Error=",GetLastError());
      ResetLastError();
      Print("2. LTCUSD >>",MarketInfo("LTCUSD",MODE_BID));
      Print(" Error=",GetLastError());
      ResetLastError();
      Print("3. BTCUSD >>",MarketInfo("BTCUSD",MODE_BID));
      Print(" Error=",GetLastError());
      One=false;
   }}

  }
 
Natalja Romancheva:

Good evening, please advise how to get rid of error 4059 in the tester. I really want to get prices for another instrument, e.g. LTCUSD, from an Expert Advisor working with one instrument, for example LTCBTC.

Not on MT4.
 
Andrey Voytenko:

Question for connoisseurs.

I need to figure out how much memory I can use for the CopyTicks query so I don't get 'out of memory'.

Unfortunately, I can't find out via the terminal how much available memory I currently have.

I use a simple script to get the information:


For some reason the available memory is twice as much as the physical memory. It's not the swap, it's small (400 MB). I was expecting the value to be like in task manager, available memory is about 7000 MB.

Who can tell me what these strange numbers are?

It's virtual memory. Windows can increase the size of the swap file if needed.
 
admoon:
In my opinion, if()should work only once, when the condition in brackets is true. But in fact it is triggered at each check and all expressions in {} are executed at each step and chew machine time. What does this have to do with globality of W? It's just easier to change the step from the terminal than from the editor.

It looks like you have a misprint in your code and wanted to write it like this:

int i;
//---
   int co=0;
   for(i=0;i<=w;i++)
     {
      if(i==10)
        {
         co++; 
         Alert(co);
        }
     }
//--- return value of prev_calculated for next call
   return(rates_total);
 
Natalja Romancheva:

iClose + iBarShift. The tester in MT4 monitors the correctness of the current price of the instrument being tested, the correctness of the data of other instruments you must ensure yourself

And you are unlikely to arbitrage effectively in MT4

 
Evgeniy Ilin:
Are there any moderators around? I sent a request to the seller, it's been hanging for 3-4 days. How long do I have to wait?
Well? They answered. Mine also hangs, though for a shorter time.
 
Alexey Navoykov:

It should have been like this:

Can template classes be divided into a declaration and an implementation? MetaQuotes, when they introduced template classes, explained this limitation.
 

Variable bug

Build 1340 MT5.

If you put in variables:

input bool test=false;

extern bool test=false;

then the compiler won't give an error, but in the EA parameters on the chart - these parameters will disappear.


So it's like two different variables, although they are the same.