Libraries: MultiTester - page 25

 
fxsaber:

Take advantage of the KB bug: the zip file contains the first release.

Alas, it has files from 12/25/20 inside.
I still have the files from November 2019, but there's already...
Do you have any?
 
Edgar Akhmadeev:
Do you have one?

Only found one for December 2019. MTTester doesn't seem to have deleted old functions.

 
fxsaber:

Found only for December 2019. I don't think I deleted old functions in MTTester.

Maybe, at least in the form of an idea - how to set parameters of Expert Advisor optimisation from the code?
Probably I'm confused by the long time ago and there is no such possibility.
 
Edgar Akhmadeev:
Maybe, at least in the form of an idea - how to set parameters of the Expert Advisor optimisation from the code?
Probably I'm confused by the long time ago, and there is no such possibility.

Only such possibilities.



But nothing prevents working in parallel via the common clipboard. Just make an additional check.

 
fxsaber:

But there is nothing preventing working in parallel via a common clipboard. Just do an extra check.

This is the first thing I tried. I spent several days debugging the file semaphore in COMMON, but I didn't get stable work. Maybe the inbuilt file functions are timing out a bit differently than I think they should.
Maybe I should try files through WinAPI, shared memory or even semaphore API (for sure there is one, maybe someone can tell me; MutEx came to my mind at once, I will think about it).
If you want to analyse my Lock and Release functions (they are short), I can post them day after tomorrow. No?
 
Edgar Akhmadeev:
This is the first thing I tried. Spent a few days debugging the file semaphore in COMMON, but didn't get it to work consistently. Maybe the inbuilt file functions are timing out a bit differently than I think they should.
Maybe I should try files through WinAPI, shared memory or even semaphore API (for sure there is one, maybe someone can suggest it; MutEx came to mind immediately, I'll think about it).
If you want to analyse my Lock and Release functions (they are short), I can post them day after tomorrow. No?

Well, you've made a mess of things! Enter a string-input, into which you shove the path to the Terminal through the buffer. After shoving the settings in, read them and check if they are correct. In particular, by this string-input. Press the Start button as soon as the check is successfully completed.


Something similar is even done.

  static bool SetSettings2( string Str, const int Attempts = 5 )
  {
    bool Res = false;

    for (int j = 0; (j < Attempts) && !Res; j++)
    {
      string Str1;
      string Str2;
      string Str3;

      Res = MTTESTER::SetSettings(Str) && MTTESTER::GetSettings(Str1) &&
            MTTESTER::SetSettings(Str) && MTTESTER::GetSettings(Str2) &&
            MTTESTER::SetSettings(Str) && MTTESTER::GetSettings(Str3) &&
            (Str1 == Str2) && (Str1 == Str3);
    }

    return(Res);
  }
 
fxsaber:

You've made a lot of sense! Enter a string-input, into which you shove the path to the Terminal through the buffer. After shoving the settings in, read them and check if they are correct. In particular, by this string-input. Press the Start button as soon as the check is successfully completed.

It's not that I'm being clever, I'm just being too direct. Multi-access means semaphores.
Well, I asked for an idea and I got it. Thank you!
 

Accelerating GA.

The Expert Advisor in frame mode receives OnTester from Agents. If for 100-1000 passes nothing good is found - we press Stop.

Optimisation can be accelerated by an order of magnitude.
 
fxsaber:
You can speed up Optimisation by an order of magnitude .

I made 470 optimisations (each on a different symbol) in 4.5 hours on real ticks (a month).

 

1. I would switch from GetTickCount() to GetTickCount64() in Sleep2. Otherwise, overflow threatens not quite correct logic. And it happens noticeably less often in the 64-variant. In other works, perhaps you should switch to it too.


2. The second ArrayResize ra ises questions here

      ::ArrayResize(Buffer, (int)Size / sizeof(T));

      kernel32::ReadFile(handle, Buffer, (uint)Size, Read, 0);
      Res = ::ArrayResize(Buffer, Read);

Most likely it should be

Res = ::ArrayResize(Buffer, Read / sizeof(T));


3. And lastly some different types

static void Sleep2( const uint Pause )


  static bool IsReady( const int Pause = 100 )
  {
    if (MTTESTER::IsReady2())
      MTTESTER::Sleep2(Pause);