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
Text based "indicators" - how to do it?
- 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?
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 ?
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 ?
- 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?
You can use ChartCustomDraw to achieve your goal.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 ?
Re: Text based "indicators" - how to do it?
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
- 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?
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.
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.
- 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?
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*.It seems that I display the text without having a plot of some type?