Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1794
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
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, help and discussion on algorithms and codes
MakarFX, 2021.12.06 12:14
And in the case of an error, what will your function return, true?
And in the event of an error, what will your function return, true?!
This, yes, should work.
Are you talking about colour change via property? I have such a variant, I need to understand why this one doesn't work.
It works, but reacts to any OnChartEven, i.e. deletes->creates with price "0"->moves to cursor. Hence the flickering
Are you talking about colour change via a property? I have that option, I need to understand why it doesn't work.
No. It's so that objects don't flicker and appear/disappear, don't bounce around like scalded and the CPU doesn't make noise...
So, what's wrong, when object in main window is "0" your function will return false? Explain the point with>=0... or equal to zero.
Look carefully.
At what range of values will the condition return true?
What error? Give an example.
What is usually true? Anything that is not 0 (I mentioned it above). And you have true only when the condition returns false at 0. The object is in the basement (ObjectFind(ch, name) > 0) - false. But error (-1) is true.
So, here is the correct variant:
No. It's so objects don't flicker and appear/disappear, jump around like scalded and the CPU doesn't make noise...
Pay close attention.
At what range of values will the condition return true?
what then?
It works, but reacts to any OnChartEven, i.e. deletes->creates with price "0"->moves to cursor. Hence the flicker.
why? Why it does not happen for green line? The conditions are identical only inverse (price > Ask) for yellow and (price < Bid) for green.
It prevents objects from flickering and appearing/disappearing, bouncing around like scalded animals and CPU noise...
For some reason, green and red lines have only one copy and do not flicker when the cursor is moved.
Look carefully.
At what value range will the function return true?
What is usually true? Anything that is not 0 (I mentioned it above). And you have true only when the condition returns false with a value of 0.
Look again carefully
Look again carefully.
Amended the message. Test your function and mine with incorrect Chart ID and when object is created in subwindow. And see what your function will return and what mine will return. And read the documentation carefully. All links and quote are given above.