Libraries: MultiTester - page 56

 

Sometimes it is necessary to view some piece of price history in the form of a table. This can be done via CTRL+U, selecting the Bars/Ticks tab. Entering the necessary interval there by hand. It is tedious.


That is why I created an additional functionality, which is demonstrated by the following Expert Advisor.

#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/en/code/26132
#include <fxsaber\Keyboard\Keyboard.mqh> // https://www.mql5.com/en/code/48393

input bool inTicks = true; // true - Ticks, false - Bars
input int inBefore = -60; // Before in seconds
input int inAfter = 60;   // After in seconds
input ENUM_TIMEFRAMES inPeriod = PERIOD_CURRENT; // Period (Bars mode)

datetime GetTime( const int X )
{
  int Window;
  datetime Res;
  double Price;
    
  return(ChartXYToTimePrice(0, X, 0, Window, Res, Price) ? Res : 0);
}

void OnChartEvent( const int32_t id, const long &lparam, const double&, const string& )
{
  if ((id == CHARTEVENT_CLICK) && KEYBOARD::IsControl())
  {
    const datetime Time = GetTime((int)lparam);

    if (Time)
    {
      if (inTicks)
        MTTESTER::CopyTicks(_Symbol, Time + inBefore, Time + inAfter);
      else
        MTTESTER::CopyRates(_Symbol, inPeriod, Time + inBefore, Time + inAfter);      
    }    
  }
}


You click (with CTRL pressed) on the necessary place of the chart and automatically get the corresponding tabular data at once.

Selected functions simply fill in certain data fields and query them. Then through the GUI you see what you were interested in. Automation, in general.

 
Perhaps the idea of writing an EA tool that combines various handy features would be a good one.
 

5430 The windows still blink when preparing a task.

How do you fix this?

 
Aleksei Skrypnev #:

5430 Windows still blinks when preparing an assignment.

How do you fix this?

In this way.
Попробуйте загрузить все файлы в архиве.
Попробуйте загрузить все файлы в архиве.
  • 2025.12.22
  • www.mql5.com
если бы время файлов в архиве совпадало со временем модификации в кодобазе. Не соответствует времени изменения конкретного файла. Я вижу корректную структуру после разархивирования а ведь сам редактор позволяет загрузить все эти файлы именно так
 
fxsaber #:
Thus.

It's a great theme. But I downloaded before everything separately still blinks.

I saw that in the file MultiTester_Example.mq5

added lines to the MultiTester_Example.mq5 file.

#define  FAKE // Remove - bypass to place the code in the KB.

#ifdef  FAKE
  void OnStart() {}
#else // #ifdef FAKE
#endif // #ifdef FAKE #else

I have commented so or should I do it differently? Or can I delete all these 4 lines?

//#define FAKE // Remove - bypass to place code in the KB.

#ifdef FAKE// void OnStart() {}

#else // #ifdef FAKE

#endif // #ifdef FAKE #else


P.S. I saw that I took the old list of tasks without these lines and it flickered. With the new lines it doesn't blink.

But did I correctly comment out only 1 line?

 
Aleksei Skrypnev #:

It's a great theme. But I downloaded before that everything separately still blinks.

I saw that in the file MultiTester_Example.mq5

added lines

I have commented it this way or should I do it differently? Or can I delete all these 4 lines in general?


P.S. I saw that I took the old task list without these lines and it was blinking. With new lines it doesn't blink.

But have I commented only 1 line correctly?

Your understanding is correct: remove the comments or delete these 4 lines completely.