Aaaaaah!!! The problem is the Period() in the EventSetTimer? But... how can I call the timer attached to a specific timefrime then? Sorry sir and thank you!!! Merry Christmas!
Marcos Gomes Artischeff: Aaaaaah!!! The problem is the Period() in the EventSetTimer? But... how can I call the timer attached to a specific timefrime then? Sorry sir and thank you!!! Merry Christmas!
That is not the reason that it is not working.
I asked you
Keith Watford:
/--- creating a timer!EventSetTimer(Period());
Why are you using Period() ??
because it doesn't make sense. It the chart time-frame is H1, Period() will equal 60 and that means that you are setting
/--- creating a timer!EventSetTimer(
60 );
That means that you are calling OnTimer() every minute!
Why??????????
Why even use a timer?
You are only working with closed bars so you only need to check the values when a bar has just closed.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Looks like this now, but not working yet.
Of course it is not "working"!
Why ask for help if you are going to completely ignore the answer?
Aaaaaah!!! The problem is the Period() in the EventSetTimer? But... how can I call the timer attached to a specific timefrime then? Sorry sir and thank you!!! Merry Christmas!
That is not the reason that it is not working.
I asked you
Keith Watford:
Why are you using Period() ??
because it doesn't make sense. It the chart time-frame is H1, Period() will equal 60 and that means that you are setting
That means that you are calling OnTimer() every minute!
Why??????????
Why even use a timer?
You are only working with closed bars so you only need to check the values when a bar has just closed.
My relevant post that you ignored was #7