The code is executed in OnTick() every minute, after you write if(Minute()!= x), but it checks Minute() value onevery tick.
OnTimer() is bound to the initialization time of EventSetTimer()
Makar, don't be rude. When I told you not to mess with the man's head, I suspected exactly that (among other things)... It was not matching the given distance in points because of the time delay. And you've only come to that now.
Alexey Viktorov: Makar, don't be rude. When I told you not to mess with people's heads, I suspected exactly that (among other things)... It was a discrepancy with the distance you had set in pips because of the time lag. And you've only come to that now.
Alexey, I'm not being snarky, it's just that a person is just getting into MQL and your phrase "The code is executed in OnTick() every minute" is misleading.
You're a smart coder and have helped me many times, but sometimes your posts are late and misleading again.
Alexey, I'm not being snarky, it's just that a person is just getting into MQL and your phrase "The code is executed in OnTick() every minute" is misleading.
You're a smart coder and have helped me many times, but sometimes your posts are late and misleading again.
OnTimer() is bound to the initialization time of EventSetTimer()
And my messages are delayed because I either have no companion at all or am away on business... Which is pretty much the same thing - I either did some housework or went away on housework...
Regarding my phrase "The code is executed in OnTick() every minute" you just need to combine this phrase with the quoted message and the highlighted phrase in it. And then everything will come together.
And my messages are delayed because I either have no companion at all or am away on business... Which is, in general, one and the same, or did household chores, or went away on household chores...
Regarding my phrase "The code is executed in OnTick() every minute" you just need to combine this phrase with the quoted message and the highlighted phrase in it. And then everything will come together.
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.
It's a habit from BASIC. It's easier with it) You can do it without it.) And if the condition is inserted in several places, the entry is shorter.
Below is my original code without your additions
Below is the code with your latest improvements
Maybe, if(TimeSeconds(TimeCurrent())==0) should be applied only to those sections where no orders are opened, and where the next low is searched for?
If I am not mistaken, your function has started to execute my code only at the beginning of each minute candle.
Thanks for the help.
Well, you have come to the problem yourself...
I would have been happy if my timer was flailing. But as it turns out, the timer doesn't work in the MT4 tester.
What's the difference?
Well, you've come to the trouble yourself...
What's the difference?
Thanks for the valuable information.
What is the time in OnTimer() linked to ?Thanks for the valuable information
What is time bound to in OnTimer()?Never mind...
The code is executed in OnTick() every minute, after you write if(Minute()!= x), but checks the Minute() value on every tick.
OnTimer() is bound to the initialization time of EventSetTimer()
Never mind...
The code is executed in OnTick() every minute, after you write if(Minute()!= x), but it checks Minute() value on every tick.
OnTimer() is bound to the initialization time of EventSetTimer()
Got it. Thanks. No more questions left..... it seems to me.
Never mind...
The code is executed in OnTick() every minute, after you write if(Minute()!= x), but it checks Minute() value on every tick.
OnTimer() is bound to the initialization time of EventSetTimer()
Makar, don't be rude. When I told you not to mess with people's heads, I suspected exactly that (among other things)... It was a discrepancy with the distance you had set in pips because of the time lag. And you've only come to that now.
Alexey, I'm not being snarky, it's just that a person is just getting into MQL and your phrase "The code is executed in OnTick() every minute" is misleading.
You're a smart coder and have helped me many times, but sometimes your posts are late and misleading again.
I wouldn't even dream of being snide)
Alexey, I'm not being snarky, it's just that a person is just getting into MQL and your phrase "The code is executed in OnTick() every minute" is misleading.
You're a smart coder and have helped me many times, but sometimes your posts are late and misleading again.
I wouldn't presume to be slanderous).
Then how do you understand this phrase
every tick .
OnTimer() is bound to the initialization time of EventSetTimer()
And my messages are delayed because I either have no companion at all or am away on business... Which is pretty much the same thing - I either did some housework or went away on housework...
Regarding my phrase "The code is executed in OnTick() every minute" you just need to combine this phrase with the quoted message and the highlighted phrase in it. And then everything will come together.
Then how do you understand this phrase
And my messages are delayed because I either have no companion at all or am away on business... Which is, in general, one and the same, or did household chores, or went away on household chores...
Regarding my phrase "The code is executed in OnTick() every minute" you just need to combine this phrase with the quoted message and the highlighted phrase in it. And then everything will come together.
I tried to search the forum, but I couldn't find the correct option for this task:
I need to calculate profit/loss in pips (yes, for strategy tester) for any instrument, any amount in deposit currency and any contract size.
For example: for XAGUSD, for a lot of 0.05, and for the amount of 15000 rubles (ruble deposit) to know how much it is in pips?
Maybe someone has got the hang of it and has already written this bicycle?