Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1701
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It's much simpler than that.
it's the same thing)
Why do you need a KillCount variable when you can just put tickCount%100
"find the difference".
so the same thing)
Why do you need a KillCount variable when you can just put tickCount%100?
"find the difference."
He needs a variable that resets at every hundred.
I already wrote there "if" isn't needed at all, just
int KillCount=tickCount%100;
And you're back on the horse!)))
What might be the secret meaning of such a design?
What might be the secret meaning of such a design?
Where did you find this?
Maybe the author wanted to execute OnTick() during initialization
What could be the secret meaning of such a construct, tell me.
To run OnTick logic immediately at load (restart), without waiting for a new tick. It makes sense on inactive pairs, although it's better to remove it in the timer.
There must be IsConnected, TradeAllowed and similar checks
Run OnTick logic immediately at load (restart), without waiting for a new tick. It makes sense on inactive pairs, although it's better to remove it in the timer.
There should be IsConnected, TradeAllowed and similar checks
There are checks). But isn't the first OnTick after OnInit called on tick arrival, not forced?
no
Eventsonlygenerated for experts when a new tick is received
no
Eventsis onlygenerated for experts when a new tick is received
There are checks). But isn't the first OnTick after OnInit called when a tick comes, and not forced?
No tick - no OnTick(), even on first run.
There are cases when graph objects are drawn in OnTick, but if there is no tick, it will not draw anything. That's why we made a single call to OnInit.