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
Set/get property of the object in pixels on the chart. [SOLVED]
- 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]
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.
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.