Deriving new financial indicators

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Phineas
Newbie
Newbie
Posts: 18
Joined: Wed Apr 09, 2008 12:00 am

Deriving new financial indicators

Post by Phineas » Tue Jan 27, 2009 11:15 pm

I have now incorporated all the TChart financial indicators into my project. I now need to add several more.

Multiple Moving Average
Money Flow Index
Average True Range
Rate of Change
William %R
etc

Would it be possible to see a Delphi example of deriving new financial indicators. For example, derive a Multiple Moving Average from a TteeMovingAverageFunction.

In the StatChar unit we have TMovingAverageFunction declared incorporating the Calculate function. I figure I could derive a TMultipleMovingAverageFunction from the TMovingAverageFunction class.

All I should need do is loop x number of times into the Calculate function incrementing the PERIOD each time. BUT I just cannot see when the calculate function is called. Any help, especially an example, would be appreciated.


Thanx in advance.

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

Post by Narcís » Wed Jan 28, 2009 9:17 am

Hi Phineas,

Sorry but I don't have an example ready now. However, Calculate is an overriden function from TTeeFunction and there it's used in the CalculateAllPoints and CalculatePeriodetc methods. In TTeeMovingFunction, which is the ancestor of TMovingAverageFunction, Calculate is used in DoCalculation.

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

Phineas
Newbie
Newbie
Posts: 18
Joined: Wed Apr 09, 2008 12:00 am

Post by Phineas » Thu Feb 05, 2009 1:49 am

Narcis, I have managed to derive a few more indicators and they work well. Multiple Moving Average, Money Flow Index, William%R etc. All derived from TeeFunction.

Question? Is it possible to have two different vertical scales overlayed in TCharts. One on the Left and one on the right, each displaying a different series, both scrolling and looking nice.

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

Post by Yeray » Thu Feb 05, 2009 12:09 pm

Hi Phineas,

Yes, it's possible. Please take a look at the tutorial 4.Axis Design. Both features demo an tutorials can be found at TeeChart's program group.

If you still find any problems doing it, don't hesitate to let us know.
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