[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 108

 
For example, I enter the market at 1.4200/ looking for highs relative to 1.4200 +-10 pips it finds 1.4205. Here hurrah it turns out to be a 999 bar. And if it turns out to be 1001 bars. the alt says bro, I haven't found it. It was 1001 bars though. What to do?
 
sergey_r:
e.g. I enter the market at 1.4200/ looking for highs relative to 1.4200 +-10 pips it finds 1.4205.Here hurrah it turns out to be 999 bars. And if it turns out to be 1001 bars. the alt says bro, I haven't found it. It was 1001 bars though. What to do?

a) Explore all the bars that are available (Bars pieces of them)

b) to deal separately with the situation when such a bar is not found at all (it has broken the historic maximum/minimum)

 
HOW TO DO IT PROGRAMMATICALLY. I CAN SEE THIS BAR IN THE WINDOW AND IT IS 1023 BAR, BUT THE SOFTWARE DID NOT FIND IT. I'M TIRED OF COUNTING. IS THERE ANY OTHER WAY?
 
sergey_r:
HOW TO DO IT PROGRAMMATICALLY. I SEE THIS BAR IN THE WINDOW AND IT TURNS OUT TO BE A 1023 BAR, BUT THE SOFTWARE DIDN'T FIND IT. I GOT TIRED OF COUNTING. IS THERE ANOTHER WAY?

Print(Bars);

What result is output?

 
HAVEN'T TRIED IT, BUT ALERT("MAX", MAX)=1001 =0; THIS IS
 

Hello.

I have faced with a problem: MT4 has a conflict with Windows 7 (the terminal is slow even with 1 simple chart indicator, in MetaEditor I cannot edit scripts or advisors, and there are some other minor issues). Running compatibility with earlier versions of the OS solves this problem only partially (EA and script editing becomes available). I suspect I'm not the only lucky one. Can you please advise whether there is a solution to this problem, or where can I read about it?

Thank you in advance.

 
sergey_r:
HAVEN'T TRIED IT, BUT ALERT("MAX", MAX)=1001 =0; THIS IS
I didn't doubt you hadn't tried it. Give it a try.
 
Asked to indentify bars give int?
 
sergey_r:
Is asking to indentify bars give int?

not bars, but Bars. do not indentify

https://docs.mql4.com/ru/predefined/variables/bars

 
The output is 12365 bars. Now what's the problem?