SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 339 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

Red, SymbolType.None);
pane.AxisFill = new Fill(Color.White, Color.AntiqueWhite);
Axis.Default.MinGrace = 0;
Axis.Default.MaxGrace = 0;
pane.AxisChange(g);
}
The GetAverage and GetStandardDeviation helper functions that the application uses
are as follows:
public double GetAverage(double[] num)
{
double sum = 0.0;
for (int i = 0; i < num.Length; i++)
{
sum += num[i];
}
double avg = sum / System.Convert.ToDouble(num.Length);
return avg;
}
public double GetStandardDeviation(double[] num)
{
double Sum = 0.0, SumOfSqrs = 0.0;
for (int i = 0; i < num.Length; i++)
{
Sum += num[i];
SumOfSqrs += Math.Pow(num[i], 2);
}
CHAPTER 10 ?–  BUILDING A SAMPLE APPLICATION USING ASP.NET AJAX 252
double topSum = (num.Length * SumOfSqrs) - (Math.Pow(Sum, 2));
double n = (double)num.Length;
return Math.Sqrt(topSum / (n * (n - 1)));
}
To display this in the Analytics pane directly below the price history chart, an extension
is made to the of the third TabPanel with the following markup:







???
Bollinger Band Analytics???

runat="server" />

Nothing new here, just like the previous chart, an ASP.


Pages:
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351