Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 474
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
@Konstantin Nikitin Are you suggesting to take these parameters outside the function body? Or leave them as I wrote in the last screenshot?
Put it on the global level. You will always have them equal to 0, because each time the function is called, a new one will be declared.
Of course, it is outside the function. You are constantly updating and comparing them by calling this function.
You're telling yourself little by little what...
Did you originally look at the function itself???
And how are DayT BarTime supposed to change here? They will always be wound 0.
It will always work as the truth, and
as a lie.
Did you look at the function yourself initially???
You said to put them in global variables. It's enough to make them static, not to put them all in one pile.
It turns out you can also do this????
And if I put them on a global level, they can also be queried from other functions