Errors, bugs, questions - page 181

 
gdtt:
For the tester to see the files, they have to be put in the agent folder, my folder is: D:\metatrader5\tester\Agent-127.0.0.1-3000\MQL5\Libraries

Thanks for the tip!!!

It's working!

Now I can't see external indicators, maybe they should be moved somewhere else, too?

 

Build 350. Testing has stopped working: updates history and disconnects, agent tab keeps CPU busy. Graph and test results tabs do not appear.

 
gisip:

Thanks for the tip!!!

It's all working!

Now can't see the external indicators, maybe they need to be moved somewhere else too?

Have you tried specifying all these files in the program properties(https://www.mql5.com/ru/docs/basis/preprosessor/compilation)?

If this does not help, please send your request to Service Desk with all files and instructions on what to do. We will fix it.

Документация по MQL5: Основы языка / Препроцессор / Свойства программ (#property)
Документация по MQL5: Основы языка / Препроцессор / Свойства программ (#property)
  • www.mql5.com
Основы языка / Препроцессор / Свойства программ (#property) - Документация по MQL5
 
Ashes:

Build 350. Testing has stopped working: updates history and disconnects, agent tab keeps CPU busy. Graph and test results tabs do not appear.

Try testing a standard Expert Advisor from those that come with the terminal.
 

To manage additional files and indicators, there are special properties for the tester:

tester_indicator

string

Name of the custom indicator in the format "indicator_name.ex5" .Indicators necessary for testing are determined automatically from the call of the iCustom() function, if the corresponding parameter is specified as a constant string. For other cases (use of the IndicatorCreate() function or use of a non-constant string in the parameter that defines the indicator name) we need this property

tester_file

string

File name for the tester, specifying its extension, enclosed in double quotes (as a constant string). The file specified will be passed to the tester for operation. Input files for testing, if needed, must always be specified

tester_library

string

Library name with extension, enclosed in double quotes. A library may have both a dll extension and an ex5 extension. The libraries needed for testing are detected automatically. However, if any library is used by the user indicator, this property must be used

 
Interesting:
Try to test the standard Expert Advisor, from those that come with the terminal.

The result is the same...

Didn't recompile, maybe that's the problem... I'm surprised there's nothing in the logbook.

PS. recompiling didn't help. Restarting mt5 (just in case, although I restarted it after upgrade) didn't help either...

 
alexvd:

Have you tried specifying all these files in the software's propertures(https://www.mql5.com/ru/docs/basis/preprosessor/compilation)?

If this does not help, please write a request to Service Desk with all the files and a description of the actions. We will fix it.

Thank you! after listing #property tester_indicator ... everything worked!


Can you tell me, after testing and before running in real time all #property tester_... need to be commented out?

 

Build 350. Advisor tries to trade on investor account (with investor password). This didn't seem to happen before...

 
gisip:

Can you tell me if, after testing and before running in real time, all #property tester_... need to be commented out?


Why?

 
alexvd:

Have you tried specifying all these files in the software's propertures(https://www.mql5.com/ru/docs/basis/preprosessor/compilation)?

If this does not help, please write a request to Service Desk with all the files and a description of the actions. We will fix it.

I didn't work with dll, so I can't say anything, but with data files I have to do exactly that, agent files folder:

the files are accessed as follows:

bool CW1Forecast::LoadDataFromFile( string symbolonly ){
  //
  //symbol = symbolonly;
  string filename = "wcandleprogn.csv";
  handle = FileOpen(filename, FILE_READ|FILE_ANSI);
  if( handle < 1 ){
    Print( "Ошибка открытия файла ", filename, " ошибка: " , ErrorDescription( GetLastError() )   );
    return(false); 
  }
  bool foundsymbol = false; bool flagexit = false;
  int cnt =0;
  //GetString( handle, res ); // получить строку заголовка dateyymmdd,month,year,valink
  W1ForecastRecord res;
  while( !FileIsEnding(handle) && !flagexit  ){  //по строкам файла
    
    GetString( handle, res ); // получить строку
    if( res.symbol == symbolonly ){
      sizedata++;
      ArrayResize( data, sizedata );
      data[sizedata-1].copyvar( res );
      foundsymbol = true;
    }
  }
  FileClose(  handle );
  return( true );
}

It's very inconvenient to receive data in this way, as data files have to be manually copied into agent files folder, and they are generated by scripts, of course, in D:\metatrader5\MQL5\Files folder. Maybe, I have missed something, and access to \MQL5\Files folder is possible from the tester?

I have looked through the Help:

tester_file

string

File name for the tester, specifying its extension, enclosed in double quotes (as a constant string). The specified file will be given to the tester to work with. Input files for testing, if needed, should always be specified

is this what I need?

Reason: