Text based "indicators" - how to do it?

Questions about MultiCharts .NET and user contributed studies.
MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Text based "indicators" - how to do it?

Postby MidKnight » 26 Aug 2013

Hi there,

I'm trying to create some tools that will display textual information on my charts. Currently I have it implemented to plot on the status line but enabling this within my chart will plot all the study values on the status line which I do not want. This potentially is the first of several text based "indicators" I'll be running. What is the MC.net way for achieving this?

With kind regards,
MK

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Text based "indicators" - how to do it?

Postby Henry MultiСharts » 26 Aug 2013

Hello MidKnight,

You need to use the Text Drawing to achieve this goal.

FB2013
Posts: 20
Joined: 12 Mar 2013
Has thanked: 3 times
Been thanked: 5 times

Re: Text based "indicators" - how to do it?

Postby FB2013 » 12 Sep 2013

I have done that TextDrawing but is there a way to place the text not under a bar but always at a fixed position within the chart window.
One way to achieve this would be to create a windows form which is set to transparent and placed at the desired position within the chart.
Therefore the chart screencoordinates are needed, where can those be accessed ?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Text based "indicators" - how to do it?

Postby Henry MultiСharts » 13 Sep 2013

I have done that TextDrawing but is there a way to place the text not under a bar but always at a fixed position within the chart window.
One way to achieve this would be to create a windows form which is set to transparent and placed at the desired position within the chart.
Therefore the chart screencoordinates are needed, where can those be accessed ?
You can use ChartCustomDraw to achieve your goal.

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: Text based "indicators" - how to do it?

Postby MidKnight » 22 Oct 2013

Hello MidKnight,

You need to use the Text Drawing to achieve this goal.
OK so I have done this as per the above URL describes but viewing the text is a problem. I really need to be able to say, put this text in this location on a chart and leave it there. Is there a chartpoint concept that lets me do that somehow? Maybe something that could divide a subplot into say 6 or 8 segments across the X-axis and then I could put various text with each box. Or maybe something that would allow multi-lined text in the top left corner?

With kind regards,
MK

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Text based "indicators" - how to do it?

Postby Henry MultiСharts » 22 Oct 2013

Hello MidKnight,

Please check the built-in From_Broker_To_Strategy_MP_Synchronizer signal.
It shows how to plot a text drawing (both 1 line and multi line) in the top right corner of the chart window and keep their position unchanged.

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: Text based "indicators" - how to do it?

Postby MidKnight » 22 Oct 2013

Exactly what I was after - thank you!

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: Text based "indicators" - how to do it?

Postby MidKnight » 22 Oct 2013

It seems that I display the text without having a plot of some type?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Text based "indicators" - how to do it?

Postby JoshM » 23 Oct 2013

It seems that I display the text without having a plot of some type?
Yes, just like you can also use arrows and trendlines drawings without instantiating an IPlotObject for that. That is, unless you want to display a string in the status line, then you'd need to use the IPlotObjectStr interface (p. 27 programming manual). Otherwise you can do without an IPlot*.


Return to “MultiCharts .NET”