[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1026

 
eddy:

why do I need a break in the switch?

It's written, it's necessary for increasing the tenf. When the low bar of the current tenf coincides with the low bar of the current tenf, the cycle should be interrupted.

Read and learn https://book.mql4.com/ru/operators/switch

If the condition is not fulfilled the break will not work.

 
the switch is fine, it does what it's supposed to do - it increases the tf
 


 
eddy:

why do I need a break in the switch?

It is written that if the low bar of the currentfactor matches the low bar of the currentfactor, the cycle should be interrupted.

the switch is ok, it does what it should - increase thef

However, you are lazy and do not trust those who you ask, in this script by analogy the alert should return 15, but it will return 43200 (see the script below).

Read and learn https://book.mql4.com/ru/operators/switch or see EXAMPLE below (practical).

void start(){
  int per=5;
  switch (per)           {
      case 1:  per=5; // тут должны быть break;
      case 5:  per=15;//тут должны быть break;
      case 15: per=30;
      case 30: per=60;//тут должны быть break;
      case 60: per=240;
      case 240:   per=1440;//тут должны быть break;
      case 1440:  per=10080;
      case 10080: per=43200; 
      }  
 Alert(per);  //15  да уж нет  43200 почему?
}

Please do not criticize, but study.

If not, no one will want to have a dialogue with you and will continue the monologue!

Files:
temp_2.mq4  3 kb
 
eddy:

Picture

Please, you don't understand mcule4, rephrase the question.

If there is a problem that you cannot solve, then ask for advice, but in a language that everyone can understand.

Let's put it this way:

- I need to find a pattern (repeating combination of candlesticks..bars) with three-bar binding on a certain timeframe (H1 is interesting), namely .....

"We'll see about that in the morning...

 
and in the hover there will be... because of inconsistent data on different TFs... the quotes seem to be out of whack in the database...
 
Aleksander:
and in the hover there will be... because of inconsistent data on different TFs... the quotes seem to be out of whack in the database...
Very funny ))
 
no, it's not :) -
i1tf=???? - что это
 
Aleksander:
no problem :) -

And what do "crooked quotes" have to do with it, even if there aren't any at all? If they were flat, that would be different (just makes me laugh for some reason) ;)

 
The point is - it's looking for a minimum on the current timeframe, which is indicated on another timeframe - and there is either no such data or it doesn't match... Because MT4 does not build bars on higher timeframes from minutes... as for example in MT5...