Silverlight : MACD function

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Priya Hatipkar
Newbie
Newbie
Posts: 46
Joined: Wed Jan 28, 2009 12:00 am

Silverlight : MACD function

Post by Priya Hatipkar » Fri Jul 24, 2009 11:57 am

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
Attachments
FxSample_1day.JPG
FxSample_1day.JPG (56.34 KiB) Viewed 6923 times

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

Re: Silverlight : MACD function

Post by Narcís » Fri Jul 24, 2009 2:44 pm

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.
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

Priya Hatipkar
Newbie
Newbie
Posts: 46
Joined: Wed Jan 28, 2009 12:00 am

Re: Silverlight : MACD function

Post by Priya Hatipkar » Mon Jul 27, 2009 7:06 am

thanks Narcis ,

i will take a look at the tutorial and revert .

regards,
aniket

Post Reply