Skip to main content
Message Font: Serif | Sans-Serif
 
No. of Recommendations: 1
I am looking for the definitions of the terms found in the "Chart" options - SMA and EMA. I can figure out that the MA means moving average. What do the S and E stand for.


S = Simple
E = Exponential

Yahoo has a short explanation here:
http://help.yahoo.com/help/us/fin/chart/chart-11.html


When they say 60 days, is that calendar days (2 months) or 60 trading days?


Hmmm - I don't know for sure, but I would assume trading days, because as far as markets care, they're just non-existent on non-trading days.


Anyone have the exact algorithm in COBOL, FORTRAN, C, or whatever people are using these days?



float SMA(int Days, float *Prices)
{
float Result = 0.0;

for (int x = Days; x > 0; x-- )
Result += Prices[x];

return Result / (float) Days;

}

As far as EMA, well, it looks more complicated, I'm too tired. If you slide some cash my way I'd be happy to though :)

Tech
Print the post  

Announcements

What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.