Buy/Sell Arrows at intersection of plot of two Series !!

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Satish
Newbie
Newbie
Posts: 37
Joined: Fri Mar 04, 2005 5:00 am

Buy/Sell Arrows at intersection of plot of two Series !!

Post by Satish » Mon Apr 11, 2005 1:35 pm

I need to plot buy/sell signal (green/red graphical arrows) for stocks related data on my chart. Is this feasible and how could one do that ?

Will appreciate suggestions/advice/code stubs. Thanks !!

Satish

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

Post by Narcís » Mon Apr 11, 2005 1:43 pm

Hi Satish,

I don't understand exactly what you want to achieve, but you might be interested in using ArrowSeries.
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

Satish
Newbie
Newbie
Posts: 37
Joined: Fri Mar 04, 2005 5:00 am

Post by Satish » Tue Apr 12, 2005 2:02 am

Hi Narcis,

I should have explained the problem in detail in my first post. Anyway here are the precise details:-

1. Have two series Series1(TCandleseries) & Series2(TLineSeries). Series2 is 30 days EMA of the CloseValue of Series1. Logic for plotting siganls is as follows:-

a) Buy signal/green arrow when Series1(closevalue) crosses Series2( EMA 30) from below. Series1[close] of yesterday < Series2 value of yesterday & Series1[close] of today > Series2 value of today.

a) Sell signal/red arrow when Series1(closevalue) crosses Series2( EMA 30) from above. Series1[close] of yesterday > Series2 value of yesterday & Series1[close] of today < Series2 value of today.


I need the arrows to appear on the chart. Hope this clarifies the requirement.

Regards,

Satish

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 Apr 12, 2005 8:56 am

Hi Satish,

According to your description I'd use ArrowSeries as I suggested you previously.

You can get CandleSeries values for each date compare them with LineSeries and use TArrowSeries.AddArrow(Const X0, Y0, X1, Y1: Double; Const ALabel: String; AColor: TColor): Integer; to add each arrow in the direction and color you desire.

An alternative could be using 2 arrow series one for each direction/color.
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