Questions from a "dummy" - page 87

 

No, it doesn't work that way, except that MQ can handle exceptions for the preprocessor.

I can advise you to write a template and generate the same kind of code, it will not reduce the number of lines, but it will reduce the number of characters typed from the keyboard.

 
Urain:

No, it won't work that way, except that MQ will handle exceptions for the preprocessor.

I suggest writing a template and generating the same type of code, it will not reduce the number of lines, but it will reduce the number of characters typed from the keyboard.

Yes, I immediately had the idea to generate such code in Perl and feed it to MetaEditor... but I still hoped for native tools.
 
x100intraday:
I immediately had the idea to generate it in Perl and feed it to MetaEditor... But I hoped to use native tools.

I'm generating regular in MQL5, for example, here:

void OnStart()
  {
//---
   WriteFile("_Case_iCustom_");   
  }
//+------------------------------------------------------------------+
void WriteFile(string folder_)
  {
   int han=FileOpen(folder_+".mqh",FILE_WRITE|FILE_CSV|FILE_ANSI," ");
   if(han!=INVALID_HANDLE)
     {
      for(int i=1;i<62;i++)
        {
         string temp="";
         for(int j=0;j<i;j++)
           {
            temp+=",_P(pr["+(string)j+"])";
           }
         FileWrite(han,"case  "+(string)i+": hndl=iCustom(symbol,period,name"+temp+"); break;");
        }

      FileClose(han);
     }
   else Print(__FUNCTION__+" File open failed "+folder_+".mqh, error",GetLastError());
   ResetLastError();
   Print("В директории File был сгенерирован файл "+folder_+".mqh");
  }
//+------------------------------------------------------------------+

Then I copy and paste the generated fragment into the code.

 
Urain:

I generate a regular in MQL5, for example, here:

Then I copy and paste the generated fragment into my code.

And what is this strange thing you've generated? I'm running it to see)). Or it's just for example?
 
Urain:

I generate a regular in MQL5, for example, here:

Then I copy and paste the generated fragment into my code.

I was hoping to use the native tools - classes and structures, arrays and loop initialization, but not generation by MQL. But I'll keep an example in mind, thanks.
 
x100intraday:

Renat, the question was theoretical rather than practical.

So as not to get lost in the fog, I will refer you to an example from the iFractals help. It is true that there is an indicator there, but let's simplify the task to a single calculation of the graphic layout by a script.

Suppose I intended to find out the time of all top fractal bars on the whole history (or on its considerable part on some middle timeframe, where fractals would be abundant). Did I understand correctly, that it's better to repeatedly disturbCopyTime in loop at FrUpBuffer[shift]!=EMPTY_VALUE to a depth of 1 element:

and get faster results, rather than to eat history with CopyTime at a depth of FrUpBuffer:

If the first option is faster, is it an absolute gain or does it all depend on the total number of fractals caught (e.g. there are significantly more on small TFs)?

It is better to check it in practice.

Roughly: if the number of fractals is 1 per 100 bars, then the method of pulling out 1 bar at a time may be faster. Otherwise, it's better to use the proofreading in blocks of 16384 (for example) elements. This is a speed/memory compromise method.

 
tol64:
What is this obscure thing you've generated? I'm running it to see.) Or is it just for an example?
I wrote the function calling iCustom with two strings in parameters.
x100intraday:
I was hoping for the native tools - classes and structures, arrays of arrays, initialization in the loop, I mean, not generation by MQL means. But I still have in mind an example, thank you.
I described this method in my article Using Pseudo Templates as an Alternative to C++ Templates .
 

I remembered my question to Renate. Can someone clarify what was meant by:

Если я использую IndicatorRelease(), значит я совершаю огромную и концептуальную ошибку. 

Why?
 

Question number 1. On Windows 7 64 bit I installed tester 527 build, when I close the program in task manager the process with the same name disappears too, it comes out tester does not perform its tasks in silent mode. How can I fix it?

Question number 2. When you boot the operating system, the tester does not restart, the only way for himself found a direct hands put the program to autostart, which is not convenient, because at startup pops up a window with the program, I would like to silent mode of operation

Question number 3. On what principle distributes tasks, work computer with a 4-core and not ahti internet, does a lot more tasks than at home too, 4-core (but several times more productive) does tasks less, and then just stands. I read that people's testers are pumping out gigabytes of stories. Where can this be viewed, where does it pump.

Question number 4. Does everyone has a problem with sending an sms with a code. It is the third time I try to get an sms, it always comes out with trabble.

Thanks in advance for the answers.