Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1546

 
Aleksey Vyazmikin #:

You're doing something wrong. You need a sample code to reproduce it.

So there's no official limit? It'll take longer with code. For now I would like to understand if there are restrictions or not. I just don't remember where, but I met somewhere in MT5 a restriction of 10 indicators per chart and no more. The search did not give anything, so I'm asking.
 
Александр #:
So there's no official limit? It'll take longer with the code. For now I would like to understand whether there are restrictions or not. I just don't remember where, but I met somewhere in MT5 a limit of 10 indicators per chart and no more. Search didn't yield anything, so I'm asking.

I don't know how much the limit is, if any, but definitely more than 10 is allowed.

 
Aleksey Vyazmikin #:

I don't know how much restriction, if any, but definitely more than 10 is possible.

Thanks, Alexey! While I was preparing the code for you, I saw my mistake in assigning indicator buffers. Since it was exactly on the eleventh indicator, I thought there was a limitation. Now I have 15 indicators - the flight is fine ))))
 
Can you tell me if it is possible to make a window with tabs using graphic classes of the standard library? And bind other controls to separate tabs.
 
I have been using correct login details but my MT5 does not work
 
1009845 #:
I used the correct login details but my MT5 is not working
I had this happen when the time for which the demo account was created ran out. So I recreated the account in my broker's office and everything worked again.
 

Good afternoon!

The strategy tester saves the optimisation results in the form of opt files on the disc in the folder:

C:\Users\ASUS\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\Tester\cache.

Is there any way to disable this saving function?

Or to clear this folder programmatically from the script?

Regards, Alexander

 
klycko optimisation results in the form of opt files on the disc in a folder:

C:\Users\ASUS\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\Tester\cache.

Is there any way to disable this save function?

Or is it possible to clear this folder programmatically from the script?

Regards, Alexander

Create a text document. write this line in it:

del /Q C:\Users\ASUS\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\Tester\cache \*.*;

then change the file extension of the text document from txt to bat

 
Aleksandr Slavskii #:

Create a text document. write the following line in it:

then change the file extension of the text document from txt to bat

How do I then run this command in my script?

I'm not a very big programmer.

How can I insert this command, for example, into a script like this?

//+------------------------------------------------------------------+

//| delFolder.mq5 |

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

//| Script programme start function |

//+------------------------------------------------------------------+

void OnStart()

{

//---

}

//+------------------------------------------------------------------+


 
klycko #:

How to insert this command, for example, into a script like this?

I didn't notice that you were talking about a script.

If it's a script, it's like this:

#define  MAX_PATH 260
struct FILETIME
  {
   uint              dwLowDateTime;
   uint              dwHighDateTime;
  };
struct FIND_DATAW
  {
   uint              dwFileAttributes;
   FILETIME          ftCreationTime;
   FILETIME          ftLastAccessTime;
   FILETIME          ftLastWriteTime;
   uint              nFileSizeHigh;
   uint              nFileSizeLow;
   uint              dwReserved0;
   uint              dwReserved1;
   short             cFileName[MAX_PATH];
   short             cAlternateFileName[14];
  };

#import "kernel32.dll"
int  DeleteFileW(const string file_name);
long FindFirstFileW(const string file_name, FIND_DATAW &find_file_data);
int  FindNextFileW(long find_file, FIND_DATAW &find_file_data);
int  FindClose(long find_file);
#import
//+------------------------------------------------------------------+
void OnStart()
  {
   DeleteFile(TerminalInfoString(TERMINAL_DATA_PATH) + "\\Tester\\cache");
  }
//+------------------------------------------------------------------+
void DeleteFile(string Path)
  {
   FIND_DATAW FindData;
   FindData.cFileName[0] = 0;
   const long handle = FindFirstFileW(Path + "*.*", FindData);
   if(handle != INVALID_HANDLE)
     {
      do
        {
         DeleteFileW(Path + ShortArrayToString(FindData.cFileName));
        }
      while(FindNextFileW(handle, FindData));
      FindClose(handle);
     }
  }
//+------------------------------------------------------------------+
Don't forget to allow dll in the settings