OnGetMarkText - Event of a TBigCandleSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

OnGetMarkText - Event of a TBigCandleSeries

Post by Woehr.Mi » Thu Oct 16, 2008 12:32 pm

Hello,

I'm using the "OnGetMark"-Event of a TBigCandleSeries to set some Marks visible and the other Marks of the Series invisible.

In this Event i'm comparing the var "MarkText" with Values calculated in my Application:

Code: Select all

if ((MarkText=FloatToStr(MinMarkValue[0])) or (MarkText=FloatToStr(MaxMarkValue[0]))) then
 Series1.Marks.Item[ValueIndex].Visible := True;
But the "MarkText"-String only contains the Candle close-Values of each TBigCandleSeries-Point. How can I get the other values of a BigVCandleSeries-Point like Open, High, Low in the MarkText-String to compare if the Mark has to be visible or not?

Best Regards.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 16, 2008 1:09 pm

Hi Woehr.Mi,

In that case you can also use ValueIndex argument for retrieving other values, for example:

Code: Select all

procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
  ValueIndex: Integer; var MarkText: String);
var
  tmpStr: String;
begin
  tmpStr:=FloatToStr(Series1.OpenValues[ValueIndex]) + ', ' +
          FloatToStr(Series1.HighValues[ValueIndex]) + ', ' +
          FloatToStr(Series1.LowValues[ValueIndex]) + ', ' +
          FloatToStr(Series1.CloseValues[ValueIndex]);

  MarkText:=tmpStr;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Post by Woehr.Mi » Thu Oct 16, 2008 1:18 pm

Thanks Narcís,

now it works the way I want.

with best regard's.

Michael

Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Post by Woehr.Mi » Fri Oct 17, 2008 11:48 am

Hello Narcis,

I've got one more question about the Marks of a TBigCandleSeries. How is it possible to draw lines from the Mark (with the Value) to the corresponding Point in the TBigCandleSeries (Min, Max, Open and Close).

In TLineSeries it works fine.There I've enabled the option Marks-Arrows-Pointer = visible.

With best regards.

Michael

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 17, 2008 1:12 pm

Hi Michael,

Sorry but I'm not sure about what you are trying to achieve. Would you like a mark arrow from the mark to Open, High, Low and Close values? This would mean 4 arrows each mark or would you like 4 marks per value?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Post by Woehr.Mi » Fri Oct 17, 2008 1:26 pm

Hi, Narcis.

When you enable the Marks of a TBigCandleSeries you have 4 single Marks around every Series-Point (High, Open, Close, Low).
And when I have Series-Points, that are very close to the next one, it's often not easy to see to which Candle-Point they belong.

So I want to draw one arrow (or line) per Mark to the corresponding value (High, Open, Close, Low) of the TBigCandleSeries.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 21, 2008 11:23 am

Hi Woehr.Mi,

In that case the only solution we can think of is using annotation tools for each mark and manually set a custom position for the annotations according to series' values and using CalcXPos/CalcYPos and CalcXPosValue and CalcYPosVAlue methods, for example:

http://www.teechart.net/support/viewtopic.php?t=6155
http://www.teechart.net/support/viewtopic.php?t=6527

For the arrows you can manually draw them in the chanvas using Chart1.Canvas.Arrow method.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply