Page 1 of 1

How to use function and period

Posted: Fri May 20, 2005 8:46 pm
by 8129925
Hi,
i plan to write a custom function, first or second order derivative. The forms are very close to Moving Average. I need to calculate a new value for each value based on its nearby values. Got a few questions here

What the range in the Calculate() mean? Are they the range controlled by period style or?

Ex. if i want to do average of nearby values
Old Data 1 2 3 4 5 6 7
New Data (1+2)/2 (1+2+3)/3 (2+3+4)/3 ...
New Value 1.5 2 3 ...

How exactly shall I write the Calculate()? and where shall I store all the new values?

Best regards
Fang

Posted: Thu May 26, 2005 11:44 am
by Pep
Hi Fang,

have you read the TeeChart for Net Tutorial - Working with Functions - Deriving Custom Functions ?
It shows how to create a new custom function including an example.

Posted: Fri May 27, 2005 10:03 pm
by 8129925
that's the question I have after read it :lol: I'll re-read it.