Page 1 of 1

Silverlight : MACD function

Posted: Fri Jul 24, 2009 11:57 am
by 13051589
Hi,

Ideally the MACD function periods are 12/26/9 days .
I can see period/period2/period3 as 3 periods for the function , which one should i set 12(SMA)/26(long EMA) and 9(signal) .
I have 250,000 datapoints in my graph for time against bid price , the plot for bid price can be as high as 10 times a second , see the attached graph for sample data for a day with 2.5Lakh datapoints.

How can I use the MACD function to do the following .
1) Set the period in Milliseconds for the 3 periods , instead of in days .
2) set the period in dateperiods and/or number of points (i read the helpfile but example will be better).
3) What is the threshold for MACD graph , i mean , beyond hw many datapoints does it break or leak memory (assume 2 GB RAM) . have you done any stress tests for the same . On my machine with 2GB MACD is giving memory issues and CPU(P4 hyperthreaded) usage shoots to 99% .
4) Am not sure what the values of period/period2 and period3 should be , and how i can select a subset of my datapoints for MACD . I mean i should be able to select only the first 20000 datapoints for MACD , then what will be the function call like ?

thanks
aniket

Re: Silverlight : MACD function

Posted: Fri Jul 24, 2009 2:44 pm
by narcis
Hi Aniket,
1) Set the period in Milliseconds for the 3 periods , instead of in days .
Yes, you can use DateTimeSteps like this:

Code: Select all

			macd1.Period = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.OneMillisecond);
2) set the period in dateperiods and/or number of points (i read the helpfile but example will be better).
Yes, as described in reply above.
3) What is the threshold for MACD graph , i mean , beyond hw many datapoints does it break or leak memory (assume 2 GB RAM) . have you done any stress tests for the same . On my machine with 2GB MACD is giving memory issues and CPU(P4 hyperthreaded) usage shoots to 99% .
TeeChart doesn't have limits of any kind when dealing with number of series and number of points on it. The only limit is what the machine where the applications runs can handle. We don't have figures for that as this highly depends on each machine specific configuration.
4) Am not sure what the values of period/period2 and period3 should be , and how i can select a subset of my datapoints for MACD . I mean i should be able to select only the first 20000 datapoints for MACD , then what will be the function call like ?
For information on how Period works please read tutorial 7. Tutorials can be found at TeeChart's program group. In that case you should use MACDFunction's Calculate and CalculateMany methods or use a function having a subset of the points as function's datasource.

Re: Silverlight : MACD function

Posted: Mon Jul 27, 2009 7:06 am
by 13051589
thanks Narcis ,

i will take a look at the tutorial and revert .

regards,
aniket