Set/get property of the object in pixels on the chart.  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
MaRCHeW
Posts: 37
Joined: 16 Nov 2013
Has thanked: 21 times
Been thanked: 8 times

Set/get property of the object in pixels on the chart.

Postby MaRCHeW » 02 Feb 2014

Hi :)

I'd like to put some a text at the left top corner of the chart (for example the spread value).
Is it possible set/get property of the object in pixels on the chart?

I'm asking because I don't see this possibility in constructors of ChartPoint class:

Initializes a new instance of ChartPoint.

public ChartPoint(DateTime,double)
Initializes a new instance of ChartPoint.

public ChartPoint(double)
Initializes a new instance of ChartPoint.

public ChartPoint(int,double)


Please give me a clue, how can I do it?

Regards
Karol Marchewka

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

Re: Set/get property of the object in pixels on the chart.  [SOLVED]

Postby Henry MultiСharts » 04 Feb 2014

Hello Karol,

It can be done with the help of IChartCustomDrawer. When you are calling EventDraw you can send the DrawContext parameter. You can specify regular coordinates and convert them into bar coordinates with it. Check "DrawContext Environment" in the help file for more information.

Here is an example how to plot candles with gradient colors in MC .Net using IChartCustomDrawer. There is also a prebuilt indicator called _Market_Depth_on_Chart_2_ that can be used for reference.


Return to “MultiCharts .NET”