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

 
Valeriy Yastremskiy:

https://www.mql5.com/ru/forum/160683/page1109#comment_15711102

Thank you very much. This is exactly what I have been missing. Namely adequate information for further development. And that this information would be more or less collected in one place.

 
Valeriy Yastremskiy:

In the tester, the file will be in the folder \tester\files, and if you put it on the window, it will be in the folder \MQL4\Files. And Kovalev has it in detail.

I would be very grateful if you could give me a hint where in the Kovalev's book this subject is dealt with in detail. My memory does not recall anything similar ... It's not a small textbook.

Thank you.

 
ANDREY:

I would be very grateful if you could give me a hint as to which section of the Kovalev textbook deals with this topic in detail. I can't think of anything similar... It's not a small textbook.

Thank you.

9.3.6 File Operations517

The tutorial is small, it's the manual and help is big))))

 

Hello!

I'm writing an EA based on Japanese candlesticks and indicators. I'm facing a problem with counting the number of candlesticks in candlestick patterns.

Suppose there is such an example.

void Trend_Ending_Patterns_Bulls()
  {
   Ending_Bulls=false;
//Параметры повышающихся свеч
   double body_size_white_1=(Close[1]-Open[1])/Point();
   double size_min_white_1=(Open[1]-Low[1])/Point();
   double size_max_white_1=(High[1]-Close[1])/Point();
   double body_size_white_2=(Close[2]-Open[2])/Point();
   double size_min_white_2=(Open[2]-Low[2])/Point();
   double size_max_white_2=(High[2]-Close[2])/Point();

if(body_size_white_2>0 && size_min_white_2>=(2*body_size_white_2) && size_max_white_2<=1 && body_size_white_1>0)
     {
      Ending_Bulls=true;
      Print("Модель Hammer - Молот быки");// Молот
     }
}

There are about 50 candlestick patterns. How to make calculation of bars if we do not know what pattern will be found at a certain moment and we should get indicator values from the last bar to the first one? Or how to change the function so that it can get bool and int values?

 
How do I know in which subwindow an object is drawn?
 
Fast235:

top and basement? that's the minimum

Sill

 
Vladimir Pastushak:
How do I know in which subwindow an object is drawn?

The question is closed, the solution is found...

 

In a year

1).365 days. In this case you must also add a leap year.

2). A more accurate calculation shows that time is not constant. Presently it was found that the year has 365 days, i.e. 5 hours 46 minutes and 12 seconds, or 365.25 days.

Hence the question arises, taking into account these nuances, which calculations uses mql4 based on the first option or the 2nd, and also affects the methodology of storing time in seconds, because in fact it is possible to go beyond the long.

 
Seric29:

In a year

1).365 days. In this case you must also add a leap year.

2). A more accurate calculation shows that time is not constant. Presently it was found that the year has 365 days, i.e. 5 hours 46 minutes and 12 seconds, or 365.25 days.

Hence the question arises, taking into account these nuances, which calculations is used by mql4 according to the first or 2nd option.

It is accepted worldwide that there are 24 hours in a day, 60 minutes in an hour, 60 seconds in a minute. I think that these calculations are used in MQL4.

 
Seric29:

In a year

1).365 days. In this case you must also add a leap year.

2). A more accurate calculation shows that time is not constant. For the time being it is possible to calculate that the year has 365 days, i.e. 5 hours 46 minutes and 12 seconds, or 365.25 days.

Hence the question arises, taking into account these nuances, which calculations uses mql4 based on the first or second option.

Datetime is ulong - The integer type ulong takes 8 bytes and allows to store values from 0 to 18 446 744 073 709 551 615.

It takes 584 billion years to go beyond, during which time the universe will disappear and reappear several times)

Reason: