Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 968

 
Yevhenii Levchenko:
Are the quotes stored in the tester/history folder?

No.

\history\downloads\symbol*.dat - archive of quotes.

\history\server\*.hst - quotes.

\tester\history\*.fxt - generated from *.hst files every time you start test or optimization.

Forum on trading, automated trading systems and strategy testing

Question to MT4 developers: Tester files

Sergey Basov, 2016.01.14 07:25

I'm not an MT4 developer, but I can answer from personal experience.

Deleting them will not affect anything. They will just be generated again during the next testing or optimization.

The quotes are stored in *.hst files, from them the tester generates *.fxt files, and each time they are generated anew.


 
Sergey Basov:

No.

\history\downloads\*.dat - archive of quotes.

\history\server\*.hst - quotes.

\tester\history\*.fxt - generated from *.hst files every time you run a test or optimisation.


This stuff puts a lot of strain on the drive on startup... Why doesn't the tester delete it if it generates it again every time? Is there any way to set it up?

 
Nauris Zukas:

Hello! I wanted to get the opening time of the current month's bar, but got an error 4074 (ERR_NO_MEMORY_FOR_HISTORY). It's also interesting that if I start testing from June 1, everything is correct, but from June 2 the error starts to appear. How to solve this month's problem?

Hello!

I faced the same error 4074(ERR_NO_MEMORY_FOR_HISTORY) when testing with quotes from another broker. And it's not the first 3rd party quotes that I use. I haven't got such error with others. What is the reason for the error, and how to fix it, maybe someone has already figured it out?

 

Why does the simplest code in mt5 work completely differently than in mt4? For example, the following code, which calculates the average mt4 muwings buffer value:

for (int i=0; i<nLimit; i++){
         double value;
         for(int k=i; k<i+AveragePeriod; k++){
            value+=Buffer1[k];
         }
         AverageBuffer[i]=value/AveragePeriod;
      }

...doesn't work in mt5. To make it work in more or less similar way (by gut feeling method), you need it like this:

 for (int i=0; i<nLimit; i++){
         double value;
         for(int k=i; k<i+AveragePeriod; k++){
            value+=Buffer1[k];
         }
         value/=(AveragePeriod+1);
         AverageBuffer[i]=value;
      }

And then, the first 7 buffers show some prohibitive values. Everything further seems to work fine. My jaw tightened by such a trifle)

Please advise how to solve this correctly?

 

Added Comment between calculations and everything fucking redrawn :D

 for (int i=0; i<nLimit; i++){
         double value;
         for(int k=i; k<i+AveragePeriod; k++){
            value+=Buffer1[k];
         }
         if(i==2)
           

  Comment(value); // вот это добавил

         value/=(AveragePeriod+1);          AverageBuffer[i]=value;                }
What's the big deal?
 
I can't figure out how to write such a condition with iFractal? If:
First Fractal_up< Second Fractal_up then.....
And the same for down fractal
 
Vladimir Baskakov:
I can't figure out how to write such a condition with iFractal? If:
First Fractal_up< Second Fractal_up then.....
And the same with down fractal

Weekend. Fooling around...

 
Vladimir Baskakov:
I can't figure out how to write such a condition with iFractal? If:
First Fractal_up< Second Fractal_up then.....
And the same with down fractal

out of ready, this is how you look for fractals:

//_______________________________________________________________________
int GetLastFractals(int bar,int mode) // bar - с какого бара начинать поиск, mode = MODE_UPPER или MODE_LOWER , результат № бара где найден фрактал
  {
   int i=bar; 
   while(i<Bars && iFractals(NULL,0,mode,i)<_Point) i++;
   return(i);
  }
//_______________________________________________________________________

You need to call 2 times to find the first fractal and the subsequent Up, roughly like this:

int barfrup_1 = GetLastFractals(1,MODE_UPPER);
int barfrup_2 = GetLastFractals(barfrup_1+1,MODE_UPPER);
 
Yevhenii Levchenko:

Added Comment between calculations and everything fucking redrawn :D

What's the trick?

ArraySetAsSeries(true) for indicator buffers.

 
Igor Makanu:

from ready-made, this is how you look for fractals:

You need to call you 2 times to find the first fractal and the next Up, like this:

Thanks, it works, only one condition is met:

        if(barfrup_1<barfrup_2 && barfrdown_1<barfrdown_2)

And I need

        if(barfrup_1<barfrup_2 && barfrdown_1>barfrdown_2)

And I can't open positions with it for some reason.

Reason: