Line drawing from Study  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
mirek
Posts: 24
Joined: 08 Jan 2013
Has thanked: 3 times
Been thanked: 3 times

Line drawing from Study

Postby mirek » 28 Nov 2013

Hi all,

I have read wiki and it says:
There are three types of drawings in MultiCharts .NET, which can be created from a study: TrendLine, Text, and Arrow.

I need to create line (not trend line) from study. Is it possible?

Should I use "Chart Custom Draw"? Is there a simple example for the line only?

Thank you
mirek

User avatar
Henry MultiСharts
Posts: 9093
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2923 times

Re: Line drawing from Study

Postby Henry MultiСharts » 29 Nov 2013

Hello mirek,

That is correct. If you do not want to use the Trendline drawing, then you can use ChartCustomDraw.
Unfortunately I do not have any sample code for plotting a line via ChartCustomDraw on hand.

mirek
Posts: 24
Joined: 08 Jan 2013
Has thanked: 3 times
Been thanked: 3 times

Re: Line drawing from Study

Postby mirek » 29 Nov 2013

Hi Henry,

thx for reply.

I have checked IChartCustomDrawer example in Test_CostomDrawGrB and it is a solution for me. i jut need to point how to change brush:
LinearGradientBrush linGrBrush

I do not want to use gradient, but something what is transparent or just to fill the background. Can you point me to the right direction?

I would like to get the same effect like drawing rectangle on the chart. Even filled rectangle allows me to see price bars.

I need opacity like this:
SolidColorBrush mySolidColorBrush = new SolidColorBrush(Colors.Gray);
mySolidColorBrush.Opacity = 0.25;


Thank you

Thank you
mirek
Attachments
CustomDrawGradientBar.pln
(1.89 KiB) Downloaded 451 times

mirek
Posts: 24
Joined: 08 Jan 2013
Has thanked: 3 times
Been thanked: 3 times

Re: Line drawing from Study  [SOLVED]

Postby mirek » 29 Nov 2013

Hi all,

it is solved by:
solidBrush = new SolidBrush(Color.FromArgb(80,80,80,80));

Where
A=80; //Alfa
R=80;//R part of Color.Gray
G=80;//G part of Color.Gray
B=80;//B part of Color.Gray

thank you to all for the help

mirek


Return to “MultiCharts .NET”