RSI indicator on tick graph

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Shimon
Newbie
Newbie
Posts: 22
Joined: Tue Nov 04, 2008 12:00 am

RSI indicator on tick graph

Post by Shimon » Mon Mar 23, 2009 7:32 am

I am trying to use TRSIFunction with a DataSource of TLineSeries and not TCandleSeries but I am receiving an exception.

As far as I know the RSI indicator has meaning also in tick graphs (when every half second or so you have point on the line series).

Any ideas how can I accomplish that?

Thanks

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 Mar 23, 2009 4:00 pm

Hi Shimon,

At the present moment TRSIFunction only accepts TCandleSeries as a datasource. I'll add your request to the wish-list to be considered for inclusion in future releases.

In the meantime, the only solution I can think of is internally using a dummy candle series (not visible) with line values so that RSI function can be calculated.
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

Shimon
Newbie
Newbie
Posts: 22
Joined: Tue Nov 04, 2008 12:00 am

Post by Shimon » Mon Mar 23, 2009 5:31 pm

How do you suggest to compute the dummy candle series ?

Take each point as a candle in this case the open and close and high low will be equal.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Mar 24, 2009 9:50 am

Hi Shimon,

Note that, as explained here, the RSI function calculates line points differencing between "positive" days and "negative" days. So, I'm not sure on the meaning of having only "unsigned" days.

Here is an example but, of course, the RSI results in a horizontal line at 100:

Code: Select all

// series1: source line series
// series2: dummy candle series
// teefunction1: RSI function

uses DateUtils;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=0 to 25 do
    Series1.AddXY(Today + OneHour*24*i, random*1000);

  for i:=0 to Series1.Count-1 do
    Series2.AddCandle(Series1.XValue[i], Series1.YValue[i], Series1.YValue[i], Series1.YValue[i], Series1.YValue[i]);

  Series1.XValues.DateTime := true;
  TeeFunction1.Period := 2;
  Series2.Visible := false;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply