That's something I didn't get until quite recently . . . static variables get initialised only once not every time the function they are in is called. https://docs.mql4.com/basis/variables/static
Along those lines, have anyone else noticed that global scale
bools
(not terminal global) don't save their values between function calls? Or is it just me ... I haven't really tested it extensively, I'm hoping to get a quick confirmation.
RaptorUK:
That's something I didn't get until quite recently . . . static variables get initialised only once not every time the function they are in is called. https://docs.mql4.com/basis/variables/static
ubzen:
Along those lines, have anyone else noticed that global scale
bools
(not terminal global) don't save their values between function calls? Or is it just me ... I haven't really tested it extensively, I'm hoping to get a quick confirmation.
I hope it's just you . . otherwise my extern bools wouldn't be doing what they seem to be doing. ;-)
RaptorUK:
I hope it's just you . . otherwise my extern bools wouldn't be doing what they seem to be doing. ;-)
Now I really have to go test this. I've put it off long enough ;)
Update: they all worked!! Yeaaa. I must have had a logical issue when I dealt with it back-then. I've just got-by on using integers. This outta help shorten, optimize and save some resources.
RaptorUK:
That's something I didn't get until quite recently . . . static variables get initialised only once not every time the function they are in is called. https://docs.mql4.com/basis/variables/static
Statics get initialized only once on load. They do not get reinitialized on each deInit/Init cycle. This it my pattern for initialized globals/statics, statics become global as they are now shared between OnInitX() and X()
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.
You misunderstood. He was using the variable i for BOTH the current chart AND the D1 chart.
ledzep, why you have use this condition?
Isn't it always true?
Thanks for your reply.
That's something I didn't get until quite recently . . . static variables get initialised only once not every time the function they are in is called. https://docs.mql4.com/basis/variables/static
Along those lines, have anyone else noticed that global scale bools (not terminal global) don't save their values between function calls? Or is it just me ... I haven't really tested it extensively, I'm hoping to get a quick confirmation.
I hope it's just you . . otherwise my extern bools wouldn't be doing what they seem to be doing. ;-)
Now I really have to go test this. I've put it off long enough ;)
Update: they all worked!! Yeaaa. I must have had a logical issue when I dealt with it back-then. I've just got-by on using integers. This outta help shorten, optimize and save some resources.
That's something I didn't get until quite recently . . . static variables get initialised only once not every time the function they are in is called. https://docs.mql4.com/basis/variables/static
Hi all one
So is possible to add linee average HIGH - LOW of the previus day?