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
Is it possible to get tooltips (tooltips) differently when hovering the mouse over individual graphics elements?
I was tracking CHARTEVENT_MOUSE_MOVE and then using coordinates of mouse cursor, which are represented in Canvas by the whole set of data of any taste and colour:
I was calculating for which object a hint would be output:
That's what I said.
I'm just wondering - can you do it yourself, and not just repeat my advice?
two of them are easy to output...
Code, please.
If you don't, I'll write it myself tomorrow when I wake up. But then I will call Fedoseev an idiot. ))
here is the longer way (not by much) that I talked about in the beginning without my library and that Fedoseev tried to give in to.
This is the better solution to your situation:
here is the longer way (not much longer) that I talked about in the beginning without my library and that Fedoseev tried to give in to.
This is more correct solution in your situation:
But you have to understand that the problem with ChartGet functions asynchrony is not solved by this.
These functions now consume not 99.76% but a bit less - 99.1%.
If they were not asynchronous, then everything would move together with the chart, instead of lagging a little behind.
Even more impressed with this place:
That's a lot of conceit. But you wouldn't even know what the joke of that humour is. It's embarrassing.Did Fedoseyev merge or what?
You're gonna lose your fly, baby.
Thank you for the examples! Very clear and informative, and not least quick.
All the graphics from the example on the kanvas in the object lists look like a single object.
Is it possible to get different tooltips (tooltips) when hovering the mouse on separate graphics items?
Or may I create a separate canvas object for each rectangle? Won't it affect the speed?
If you have some time, I'm waiting for an answer, maybe even a code sample.
You can use one canvas for each object instead of one.
It will even be a bit faster and the code won't be much bigger. At least less than with objects.
Kanvas is very fast. Objects are good too, as long as there are not too many of them. The bottleneck occurs when objects are several hundred or a thousand.
By the way, it is the same in JavaScript. There are also canvas and objects (html and CVG). Canvas always wins in speed and graphical capabilities, but loses in usability of control and management.
In JS, I myself have been actively mixing canvas and vector objects (html, css, svg), taking advantage of both.
But the real biggest problem in using canvas in MQL5 (as well as objects) is unbelievable dullness of ChartGet functions.
But this is if you are trying to bind to a price chart.
If you disable the entire chart and draw your own one, you won't have such a problem.
Even more impressed by this place:
That's a lot of conceit. But you won't even know what the joke is. It's embarrassing.It always amazes me when you're a local old timer, always trying to make something clever out of yourself.
So as not to be painfully painful for the wasted years.
I was tracking CHARTEVENT_MOUSE_MOVE and then using coordinates of mouse cursor, which are represented in Canvas by the whole set of data for all tastes and colours:
, calculate for which object a hint should be displayed:
you can use not one Canvas, but one for each object.
It will even be a bit faster and the code will not be much bigger. At least less than with objects.
Kanvas is very fast. Objects are good too, as long as there are not too many of them. The slowdown occurs when objects become several hundred or a thousand.
Thank you. I will try to test both variants.
Thank you. I'll try to check both options.
Vitaly, what video editor do you use for YouTube?
Very cool!
Adobe Premiere Pro?