Page 1 of 1
Buy/Sell Arrows at intersection of plot of two Series !!
Posted: Mon Apr 11, 2005 1:35 pm
by 9236155
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
Posted: Mon Apr 11, 2005 1:43 pm
by narcis
Hi Satish,
I don't understand exactly what you want to achieve, but you might be interested in using ArrowSeries.
Posted: Tue Apr 12, 2005 2:02 am
by 9236155
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
Posted: Tue Apr 12, 2005 8:56 am
by narcis
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.