[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 51

 
IgorM:

I have already racked my brains, I cannot find an optimal solution for calculations in the indicator:

How to find the bar number on the lower TF where the day begins (or 4 hours) and where the day ends (or 4 hours)?

Have you looked at iBarShift?(https://docs.mql4.com/ru/series/iBarShift)
 
smshev: have you looked at iBarShift ?(https://docs.mql4.com/ru/series/iBarShift)

Yes I did - I'm aware of that, thanks to Victor, he's already helped, that's about it:

extern int  TFrame      =  1440;

................

bool NevBar(int pos){
   static int prevtime=0;
   if(TFrame==0){
      if(Time[pos]==prevtime) return(false);
      prevtime=Time[pos];
      return(true);
   }else{
      int posbase=iBarShift(NULL,TFrame, Time[pos]);
      if(iTime(NULL,TFrame,posbase)==prevtime) return(false);
      prevtime=iTime(NULL,TFrame,posbase);
      return(true);
   }
return(false);
}
 
XmaksasX:

yosuf


Make yourself a bat file which will check the connection and, if it fails, re-establish it

How to do this?
 

Create a plain text document and put this text in it

:LOOP
ping 8.8.8.8 | find "100%" && (rasdial /disconnect & rasdial "YOUR CONNECTION NAME" login pass)
ping -w 1000 -n 30 127.0.0.1

goto LOOP

Save it and change the extension from *.txt to *.bat, run it, minimise it and be happy))

 
XmaksasX:

Create a plain text document and put this text in it

:LOOP
ping 8.8.8.8 | find "100%" && (rasdial /disconnect & rasdial "YOUR CONNECTION NAME" login pass)
ping -w 1000 -n 30 127.0.0.1

goto LOOP

Save it and change the extension from *.txt to *.bat, run it, minimize it and be happy))


Thank you very much.
 

Please tell me, in which cases the EA "hangs" and when you try to view its properties, the table of parameters does not appear? What to do in such situations?

What else has been invented?

2012.04.06 3:08:25 '***** ': Buy order 0.10 EURUSD open at 1.3066 SL: 0.0000 TP: 0.0000 failed [Trade Timeout]

 
yosuf:
Please tell me, in which cases the EA "hangs" and when you try to view its properties, the table of parameters does not appear? What should I do in these situations?

So, your Expert Advisor is working in a looped mode, not by ticks (standard)
 
In 419, the EA properties window does not always open, even in non-cycled EAs. In my opinion, it depends on the incoming tick. The tick comes - the window opens.
 
Zhunko:
In 419, the EA properties window does not always open, even in non-cycled EAs. In my opinion, it depends on the incoming tick. The tick comes - the window opens.

It does not depend on it at all. Maybe on something else, but not on the ticks - I checked. In general, the new build has completely changed the terminal's operation with respect to the EA's flow. Now the looped EA clearly fulfills all iterations of the loop irrespective of the terminal operation, in old versions, there were delays in loading the main thread. And by the way, the amount of CPU resources consumed by the looped Expert Advisor has been drastically reduced.
 
yosuf:
The internet often goes down, is there no way to automate it programmatically to get it up and running again? Or what is known in this direction? Is there a way to power up two or more ISPs at the same time, I mean in parallel? Thank you in advance.
See this page, in particular the information on the links on He-go-ing...