Errors, bugs, questions - page 2809

 
TheXpert:

In other words: there is no internal (default) access, but there is external access. But in order to use it, you have to specify it explicitly. This makes sense to me

 
Compilation error:
template<typename T> class A {};
class B {
template<typename T> void f( A<T>& );
};
template<typename T>
void B::f( A<T>& ) {} //Error: 'f' - member function already defined with different parameters

but otherwise:

template<typename T> class A {};
class B {
template<typename T> void f( A<T>& ) {} //нормально
};

fine. What difference does it make?

template<typename T> class A {};
template<typename T>
class B {
                     void f( A<T>& );
};
template<typename T>
void B::f( A<T>& ) {} //нормально

it's OK too. And the main thing is that before (in build 2085) it all compiled normally - without errors!

 

Good afternoon, dear experts!

Could you please tell me if it is possible to set a breakpoint to trigger at a certain time (on a certain bar) during debugging? I.e., I want the story to be forwarded to a certain place, and at that place a breakpoint would trigger, and I would be able to go through the debugger on the bar I need.

 

Started an EA in the tester, netting. I haven't dealt much with Limits, my question is about BuyLimit, with position reversal.
Do they really slip to the better side or it depends on broker? Or is it the wrong thing in the tester?

And for some reason the Sell position line ended not at the knocked down limit, but went further over the edge of the screen.


 
1.There is a command "DatabaseImport", in the documentation to the parameters flags explanation there are no these very flags. Tried both "0" and parameters from DatabaseExport, compilation goes, but at execution returns error 5131. There is no such error in documentation. Does anyone know what this error is about? What's wrong with the line;
DatabaseImport(db,"hist",FilenameHist,DATABASE_IMPORT_HEADER | DATABASE_IMPORT_CRLF | DATABASE_IMPORT_APPEND,";",0,"");
?
2. Why does the line
         i=DatabaseExport(db,"select * from hist",FilenameHist,DATABASE_EXPORT_HEADER | DATABASE_EXPORT_CRLF | DATABASE_EXPORT_APPEND,";");
works and
i=DatabaseExport(db,"hist",FilenameHist,DATABASE_EXPORT_HEADER | DATABASE_EXPORT_CRLF | DATABASE_EXPORT_APPEND,";");
not? With what the documentation says
long  DatabaseExport( 
   int           database,           // хендл базы данных, полученный в DatabaseOpen 
   const string  table_or_sql,       // 




имя таблицы  или SQL-запрос 
   const string  filename,           // имя CSV-файла для экспорта данных 
   uint          flags,              // комбинация флагов 
   const string  separator           // разделитель данных в CSV-файле 
   );
 

i.e. the table name should also be recognised! What is wrong?


w.s. Gentlemen developers what tenth eye should guess that the table where the import will be done should not exist?? And why do you need to export the import if the folder in which you can savemql5/files is cleared at startup? How can one work with a permanent file? Or is it always necessary to start through debugging and have time to add the necessary file before initialization? What is ....
 
AlexInRush:

Good afternoon, dear experts!

Could you please tell me if it is possible to set a breakpoint to trigger at a certain time (on a certain bar) during debugging? I.e., I want the story to be forwarded to a certain place, and at that place a breakpoint would trigger, and I would be able to go through the debugger on the bar I need.

In the strategy tester, right after I run it, you pause it and then there's a field on the right called "Scroll to". The rightmost field on the right is where you enter the time you want to run to. As a result, you stop at the moment you need, and then you put a breakpoint in the code and keep track of it.
 
Alexandr Koptelov:
1.There is a command "DatabaseImport", in the documentation to the parameters flags explanation there are no these very flags. Tried both "0" and parameters from DatabaseExport, compilation goes, but at execution returns an error 5131. There is no such error in documentation. Does anyone know what this error is about? What's wrong with the line; ?
2. Why does the line work and not? With what the documentation says

i.e. the table name should also be recognised! What's wrong?


s.w. Gentlemen developers what tenth eye should guess that the table where the import will be performed should not exist?? And why do you need export import at all if the folder in which you can savemql5/filesis cleared at startup? How can one work with a permanent file? Or is it always necessary to start through debugging and have time to add the necessary file before initialization? What is ....

Work in a tester or debugger with the base placed in a shared folder.

 
AlexInRush:

Good afternoon, dear experts!

Could you please tell me if it is possible to set a breakpoint to trigger at a certain time (on a certain bar) during debugging? I.e., I want the story to be active till a certain place and then a breakpoint would trigger at that place, so I could go through the debugger on the bar I need.

Set the condition

if(TimeCurrent() == nnnTime)
  DebugBreak();
and start debugging. As soon as the time reaches the specified time, the debugging will stop and after all manipulations press Shift+F11 to continue the tester.
 

Is there no way to enable Print in optimisation mode? The "Full optimisation logs" option is enabled, but only Print from OnInit gets into the logs, while I need it from OnTester, for example.

 
Compilation error
#define  MACRO( X ) aaa##X = X
#define  bbb  5
void OnStart()
{
    int MACRO(         bbb );
    printf( "%d",   aaabbb ); //Error: 'aaabbb' - undeclared identifier
}

And in C++ it's OK. ## has higher priority - bbb is substituted first, and then bbb is replaced by 5, which is not how it should end up:

    int aaa5 = 5; //неправильно (*)

This is how it should be:

    int aaabbb = 5; //правильно (**)

Because of this error, a routine operation cannot be replaced by a macro. (*) can be obtained by another record form if necessary, but (**) cannot be obtained in MQL in any way