[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 505

 

to sergeev:

Yeah, luckily I'm not doing anything for money yet, that would be a shame. Thanks again, made it OK, everything is deleted as it should be :)

 

Can you tell me how to make an EA work not by ticks, but with the arrival of a new bar? I just googled this, but it does not work:

int oldTime; int init() { oldTime = Time[0]; return(0); } int start() { if(IsNewBar()) { //code here is executed every bar } } bool IsNewBar() { if(oldTime < Time[0]) { oldTime = Time[0]; return(true); } else return(false); }

 
AndrejFX:

Can you tell me how to make an EA work not by ticks, but with the arrival of a new bar? This is the only one I've Googled, but it doesn't work:


use the SRC button
 

Replace

if(oldTime < Time[0])

to

if(oldTime != Time[0])
 
Hello, could you please tell me if it is possible to insert the return operator to exit a function within a switch operator in one or more cases?
 
Diubakin:
Hello, could you please tell me if it is possible to insert the return operator to exit a function within a switch operator in one or more cases?

Yes, you can
 
Good people, help me find a mirrored transaction copier.... everyone says it's in codebase but i can't find it there(((
 
ALigarx:
Good people, help me find a mirrored transaction copier.... everyone says it's in codebase but i can't find it there(((

https://www.mql5.com/ru/code/9477
 
thank you very much! but this is just the wrong advisor, it just copies trades, and I need a reverse copier that copies all the actions backwards....
 
ALigarx:
thank you very much! but this is just the wrong advisor, it just copies trades and i need a reverse copier that copies all the actions backwards....
is google not working or is it yandex?
Reason: