Page 1 of 1

Deriving new financial indicators

Posted: Tue Jan 27, 2009 11:15 pm
by 10548832
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.

Posted: Wed Jan 28, 2009 9:17 am
by narcis
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!

Posted: Thu Feb 05, 2009 1:49 am
by 10548832
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.

Posted: Thu Feb 05, 2009 12:09 pm
by yeray
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.