- ago
I want to see a text tooltip for multiple candles in a row on the chart. Text hints are quite voluminous. I'm looking for a way to make a tooltip when hovering over a candle or other chart object attached to a candle, or the ability to draw a link so that when I click on it, I see the full text in the browser window.

Because if I draw text using the "DrawText" function, then the text overlaps and becomes unreadable.

Can you please tell me what to do?
5
900
24 Replies

Reply

Bookmark

Sort
- ago
#1
Are you looking to accomplish this programmatically or "Draw a Text Note" might suffice?
What about DrawBarAnnotation?
0
Cone8
 ( 4.98% )
- ago
#2
It's not possible yet.

Instead of DrawText() let's make a function called DrawHint().
DrawHint would be similar but would only display an (H) icon. The underlying text would be displayed only when you hover over (H). I like this!

Probably the text box could be Markdown sensitive, so you could include a hyperlink.

Marked as Feature Request. Add your vote in Post #1.

1
- ago
#3
QUOTE:
DrawHint would be similar but would only display an (H) icon.

Let's have it display a unicode dingbat like a light bulb (like Visual Studio) or a heart. I like the idea.
0
Glitch8
 ( 10.62% )
- ago
#4
It makes sense to allow the caller to specify the text displayed, no?
1
Cone8
 ( 4.98% )
- ago
#5
Definitely.
DrawHint could have an optional character for the symbol used, as suggested above, , but you have to specify the text to display for the tooltip-type hint.
0
Glitch8
 ( 10.62% )
- ago
#6
I meant it should have two parameters. One for the text that appears on the chart, and another for the larger text that appears once hovered over. We could also have a parameter that controls the color.
1
- ago
#7
QUOTE:
It makes sense to allow the caller to specify the text displayed, no?

Yes as long as it's a dingbat. Simply give an example of how to display an interesting unicode dingbat. We only need one character because we want to keep the tooltip icon as small as possible on the Chart.

I suppose one could overload the DrawHint(...) method so it behaves differently if a character is passed ('\u2665') verses a string ("\u2665"). Just give an example of using both so the difference is illustrated.
0
Glitch8
 ( 10.62% )
- ago
#8
A dingbat is just a character. You can copy and paste it inside quotes just like this "✭".
0
- ago
#9
QUOTE:

Probably the text box could be Markdown sensitive, so you could include a hyperlink.


Cone, hello!

I was unable to display the link using "Markdown".

I followed the guide from the link: https://www.markdownguide.org/basic-syntax/#links

Please help me paste the link into a text message.
0
- ago
#10
This is a feature request, you cannot do it now.
1
- ago
#11
I'm trying to replace my DrawText calls with DrawHint calls instead so the message text is expressed as a ToolTip avoiding overstrikes (see screenshot below). The problem is I don't see how to specify a paneTag parameter on DrawHint like I can with DrawText. Can you add an optional paneTag parameter to DrawHint?

0
- ago
#12
Hello!

Thanks for adding this feature.

I would like to see the following improvements:

1. We cannot correctly draw two or more hints on the same candle because they overlap each other. I would like to either manually control the hint height, similar to how you can do it in the DrawText function.

2. The hint is drawn aligned to the middle of the candle. I wish there were left or right alignment options available. You could also add a tail to the rectangular hint title box, pointing to the candle. Similar to dialogue in comic books, where the tail points to the character speaking the line.

3. I would like to have an option for automatic line wrapping.

4. In the case of large text in hint, I would like to have vertical and horizontal scroll bars.

5. I would like to be able to add transparency to the main hint text.

6. I would like to be able to insert a link into both the title and the main text of the hint.
0
- ago
#13
Sounds like our Concierge support service may fit your request the most through a custom drawing object extension.
0
Glitch8
 ( 10.62% )
- ago
#14
You should be able to add transparency by using a WLColor with an alpha (A) property value less than 255.
0
- ago
#15
QUOTE:
3. I would like to have an option for automatic line wrapping.

What's wrong with controlling the newline instances yourself by inserting "\n" in your text string where you need a new line? That's what I do.

Some of the features you want cannot be done with a Windows OS ToolTip object, which is what DrawHint is based on. So we are talking about creating a totally different method (not DrawHint), which doesn't use a ToolTip object. That's a whole new development project, and not everyone needs all this.

If all you want is a button to open a web link, there's a Feature Request for that. https://www.wealth-lab.com/Discussion/Programmable-function-buttons-10458 It's already been rejected, but I might be willing to split the cost of building such a feature request.

As an alternative, you might consider opening a Child window and placing all your messages in there. You could also open a second Chart and link it to the first Chart and use DrawText to populate the second Chart with your messages.
0
- ago
#16
QUOTE:

You should be able to add transparency by using a WLColor with an alpha (A) property value less than 255.


Glitch, hello!

I was talking about the transparency of the tooltip body, not the header.
0
- ago
#17
QUOTE:

What's wrong with controlling the newline instances yourself by inserting "\n" in your text string where you need a new line? That's what I do.


Superticker, hello!

That's exactly what I do.

Thank you for your advice.

I need the link functionality in hints only to display html content, as well as for large pieces of text that do not fit into a standard hint.

I'm not sure that what you want to do is the same as what I want to do.

QUOTE:

As an alternative, you might consider opening a Child window and placing all your messages in there. You could also open a second Chart and link it to the first Chart and use DrawText to populate the second Chart with your messages.


Can you please provide example code and result?

Better I'll say what exactly I'm trying to do:

I have a list of news, each news is tied to a specific candle. There can be several news items for one candle at once. I want to see only news headlines on the chart. When I hover over the title, I want to see the full text of the news, or, if I cannot see the html content in the standard hint, a link that will open my html file with the news in the browser.

In general, it wouldn't be difficult to make a hint popup if I only knew how to bind to the hover event of the candle.
0
- ago
#18
QUOTE:
There can be several news items for one candle at once. I want to see only news headlines on the chart.

A couple years ago in an effort to reduce the event icon clutter, we've introduced a new event item by the SeekingAlpha event provider: "News (Brief)". It will condense the multiple news to a single event item per daily bar.
0
- ago
#19
Eugene, hello!

When I say news, I mean my own body of text, which is in no way related to the existing WL news mechanics.
0
- ago
#20
QUOTE:
I need the link functionality in hints only to display html content, as well as for large pieces of text that do not fit into a standard hint.

I'm not sure that what you want to do is the same as what I want to do.

Perhaps the programmable function buttons I mentioned in Post #15 would get you part way there. You would need to make them context sensitive, so when you mouseover a Hint, they would appear.

As I said, I would be willing to partially fund the programmable function buttons part, but the rest of this job is very specific to your particular requirements.
0
Glitch8
 ( 10.62% )
- ago
#21
The programmable function buttons are not on the table.

We already have a mechanism to create programmable input controls, albeit not buttons but menu items.
0
- ago
#22
With respect to writing my data window extension (image shown in another post), a hurdle I encountered was finding the chart object instance. I needed the chart object so that I could register an event handler for when the mouse moves over a bar. The code has to go through a bunch of snooping of the windows and controls to finally arive at the chart object that has the bar changed event. I won't detail that here, but it took me hours figure out how to finally get to that point.

So, it would be nice if some functionality was added so that extensions could more easily get to any user strategy chart, its bars and events. Afterall, charts and bars are a big part of WL, so I think it should be easier for an extension to interact with them. Or, I've overlooked the easy part.

Also, my data window extension is a bit clunky if you open the same strategy more than once, because the data window extension allows for one data window per strategy. (It has to discern the chart it has to deal with by snooping for the chart title according to strategy name.) So, with the aforementioned proposed extension functionality, it should probably include some way for extension code to easily determine the association between the strategy and the chart. Obviously, this only applies if the strategy is being run for interactivity, like in a backtest.
0
- ago
#23
Hello!

I noticed that there is a limit to the number of tooltips displayed on the chart (about 10,000).

Is it possible to somehow increase this limit?
0
- ago
#24
No, you cannot change this limit as it's hardcoded for chart drawing optimization.
0

Reply

Bookmark

Sort