Page 1 of 1

Moving Average - whats the actual algorithm

Posted: Thu Nov 27, 2008 9:18 pm
by uzzi
Hi guys,

I'm creating some moving average graphs to go with my candlestick graphs by using the following code:

XYDataset dataset2 = MovingAverage.createMovingAverage(dataset, "Moving Average", 30 * 24 * 60 * 60 * 1000L, 0L);
mainPlot.setDataset(1, dataset2);
mainPlot.setRenderer(1, new StandardXYItemRenderer());

However, as its for a uni project, my conscience is saying that I'm taking a short cut!

Is it possible that I could get the source code for the Moving Average algorithm, in order to fully understand it and then make my own one.

I appriciate it won't be much different to algorithm of the MovingAverage.createMovingAverage source code, but nonetheless it will better my understanding and allow me to do the next steps of my project.

Thanks in advnace :-)

Posted: Fri Nov 28, 2008 6:39 pm
by skunk