[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 393

 
Kogalym >>:
Ему тоже большой привет =D

He prefers money, usually in the amount of the deposit :))

And if you have something to say, speak up, they will help you get rid of your illusions, and maybe even find some rationality.

 

I want to log the parameters that MT requests from the broker before each Optimisation.

1. During Optimisation, only a limited amount of information is written to the log. How can I add my own?

2. (!) What other broker parameters, besides the spread, should I pay attention to?

 
chief2000 писал(а) >>

I want to log the parameters that MT requests from the broker before each Optimisation.

1. During Optimisation, only a limited amount of information is written to the log. How can I add my own?

2. (!) What other broker's parameters, besides spread, should I pay attention to?

I'm forming my own optimization report. I save Expert Advisor's parameters and optimization results. I can save external conditions in the same way.

 
Vinin >>:

Я формирую свой отчет оптимизации. Сохраняю параметры советника, результаты оптимизации. Можно точно так же сохранять и внешние условия

Are your "External Conditions" what I was asking about? (the most important question is what does the optimiser get from the broker?) Can you elaborate a bit more?

 
chief2000 писал(а) >>

Are your "External Conditions" what I was asking about? (the most important question is what does the Optimizer get from the broker?) Can you elaborate a bit more?

The library example (first version) is here http://vinin.ucoz.ru/forum/10-38-1, there is a usage example in the archive.

My last post

 
Vinin >>:

Пример библиотеки (первый вариант) лежит тут http://vinin.ucoz.ru/forum/10-38-1, в архиве пример использования.

Мой последний пост

My task is much simpler now :) I would like to take the value (Ask-Bid) (etc.) and save it to a log file

(or create a separate file) at the start of the Optimisation run. Tried to do the following, but the text file from EA is not created:


// ````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
   if( Write_Experts_Inputs_To_File==true) {
      Write_Experts_Inputs_To_File = false;

      string file_name = StringConcatenate("Experts_Inputs_", TerminalCompany(), "_", Symbol(), ".txt");
      int    file_open = FileOpen( file_name, FILE_CSV| FILE_READ| FILE_WRITE,';');

      int    TimeCurrent_variable = TimeCurrent();
      string time_current         = TimeToStr( TimeCurrent_variable, TIME_MINUTES);

      FileSeek( file_open, 0, SEEK_END);
      FileWrite( file_open, TimeToStr( TimeCurrent_variable, TIME_DATE), "   DayOfWeek = ", DayOfWeek(), "   Server (GMT) Time = ", time_current, 
         "   SWAPLONG = ", MarketInfo(Symbol(),MODE_SWAPLONG), 
         "   SWAPSHORT = ", MarketInfo(Symbol(),MODE_SWAPSHORT), 
         "   MARGINREQUIRED = ", MarketInfo(Symbol(),MODE_MARGINREQUIRED), 
         "   LOTSIZE = ", MarketInfo(Symbol(),MODE_LOTSIZE), 
         "   LOTSTEP = ", MarketInfo(Symbol(),MODE_LOTSTEP), 
         "   MINLOT = ", MarketInfo(Symbol(),MODE_MINLOT), 
         "   MAXLOT = ", MarketInfo(Symbol(),MODE_MAXLOT), 
         "   STOPLEVEL = ", MarketInfo(Symbol(),MODE_STOPLEVEL), 
         "   SPREAD = ", (Ask-Bid)/ PointX);
      FileClose( file_open);
   }
// ````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````


- Is it possible to create it when starting EA?

 
chief2000 >>:

- Можно ли его создать при запуске Советника?

Maybe file_read is redundant
 
chief2000 >>:

Моя задача сейчас намного проще :) Я бы хотел взять величину (Ask-Bid) (и т.д.) и сохранить ее в лог-файл

(или создать отдельный файл) в самом начале запуска Оптимизации. Пытался сделать следующее, но текстовый файл из Советника не создается:


- Можно ли его создать при запуске Советника?



can be created at any point before the intended write...

and Write_Experts_Inputs_To_File variable takes true at every moment before writing ?

 
splxgf >>:
Может file_read лишнее

The same code works in the Indicator.

 
keekkenen >>:

создать можно в любом месте до предполагаемой записи..

а переменная Write_Experts_Inputs_To_File принимает true в каждый момент перед записью ?

The Write_Experts_Inputs_To_File variable is set to "true" at the beginning (before init()), so writing to the file

occurs only once per session. All this to keep afterwards parameters with which the Optimisation was running - if the results will be different, it will be possible to open the file and see what were the input parameters

in that particular case. But this is in theory, in practice the file is not created.

Reason: