[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 1027

 
Aleksander:
The point is - it's looking for the minimum on the current timeframe, which is indicated on another TF - and there is either no such data, or they don't match... because MT4 does not build bars on higher timeframes out of minutes... as in MT5 for example...

How can it find anything here?

If you have not found it, you should double-check it and see if the data has been updated three times, then forget about this bar and let the user understand the inconsistency through the print and sleep, probably.

  int per=1;   // узнать минимальный тф на баре i1st. per это period какбэ
 while(true)                    {
              //iLowest( на мин_тф, свеч внутри, iBarShift(                     )+1)
     int lowest=iLowest(NULL,per,1,Period()/per, iBarShift(NULL,per,Time[i1st-1])+1);
   if(pr(iLow(NULL,per,lowest))==pr(Low[i1st]))   // если (лоу лоуест бара == лоу кур_ТФ бара)
    { i1tf=per; break; }
// иначе - увеличивать тф:
      switch (per)           {
      case 1:  per=5;
      case 5:  per=15;
      case 15: per=30;
      case 30: per=60;
      case 60: per=240;
      case 240:   per=1440;
      case 1440:  per=10080;
      case 10080: per=43200; }  }
 
well there's a logic flaw in calculating the minimum...
 

Why are you bothering with the switch :) - He went through the minutes - did not find it - 5 minutes, there is no 15 and so on and so on ...

Why does he need to find the PERIOD (TF)? - please describe in more detail what he wants....

 
Aleksander:
why bother with the switch :) - went through the minutes - couldn't find it - felt the 5minutes, no 15 and so on and so on...

Yes where is the interruption in the switch, it will always switch until it gets to the end or finds a default.

Dawo probably didn't practice ;)

 

i1tf is the timeframe of the 1st end of the line bar) was 1tf, but you can't start names with numbers:)

costy, you should have just said so)

 
I don't see that logic suffers anywhere)
 
Yes... I was wrong about that :) of course he needs a breach after every cassé...
 

Hey, Eddie - since you're here - in your own words, tell me what you want...

What TF are you throwing at and what do you expect to get as a result?

 
eddy:

i1tf is the timeframe of the 1st end of the line bar) was 1tf, but you can't start names with numbers:)

costy, you should have said so straight away)

Write the problem, it will be faster to solve it than to explain the methods, but in an easier way, without mcool, in manly terms.

"i1tf is a timeframe " what does i1tf do in

Time[i1st-1]
 
on any ff I throw, I get the minimum available ff in bar n. The figure explained