I am trying to generate a function series under program control, program stub given below:-
Chart1.AddSeries(TLineSeries);
lastseries:=Chart1.SeriesCount-1;
Chart1.Series[lastseries].ParentChart:=Chart1;
Chart1.Series[lastseries].SetFunction(TMovingAverageFunction.Create(Self));
// connect function series to datasource: in this case to first series
Chart1.Series[lastseries].DataSource:=Series2;
// How do I specify it to use close values of Series1 (Candleseries) ??
// Set additional EMA function properties:
With (Chart1.Series[lastseries].FunctionType as TMovingAverageFunction) do
begin
Period :=20;
end;
Chart1.Series[lastseries].CheckDataSource;
....
Series1 is a Candle Series. How does one specify that the values to use for the Moving Average are CLose values of CandleSeries ? I t is pretty easy in the Chart Editor but am unable to find the right syntax to do it inside the progra.
Will appreciate help/suggestions.
Satish
Function Series under Program Control
Hi, Satish.
It's relatively simple:How does one specify that the values to use for the Moving Average are CLose values of CandleSeries ?
Code: Select all
Chart1.Series[lastseries].YValues.ValueSource := 'Close';
...
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Satish,
Thank you very much for your kind words but here the credit goes for Marjan .
Thank you very much for your kind words but here the credit goes for Marjan .
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |