Some few years back Crucial Point posted his understanding at ff on how to calculate Moving averages. Here is his explanation.
People either forget or don't understand how Moving Averages are calculated. If you understand it, then you won't be curve-fitting a moving average that looks beautiful to you. The number used in a Moving Average is the number of candlestick bars that was calculated. Example: 60 (MA) is the representation of 60 andlesticks that was calculated.
Simple enough, but here's the problem... On an hourly chart, people would use 50, 60, 100 (MAs) and other values. On a 5 min chart, people would use 15, 50, 100 and other values. They use these numbers because they look nice on the graph they are looking at.
Here is the logic:
There are 24 hours in a day... so you should be averaging the 24 hours to get some consistency (using 24MA). You should be using 24MA (in an hourly chart), yet people would use 30 or 40 MA. Why would you want to be averaging 30hrs or 40hrs? So here are the MA numbers on an hourly chart 24MA (1day), 48MA (2day), 72MA (3day)... it is a multiple of 24. For a 15 min chart it is a multiple of 4 (because there are 4 15mins within an hour) = 4, 8 , 12, 16, 20, 24, 36, 40,.... 80, 120, 160, 200, 360, 400, etc.
For a 5 min chart it is a multiple of 12 (because there a 12 5mins within an hour) = 12, 24, 36, 48,.... 120, 240, 360, 480, etc. For 1 min chart, it is a multiple of 60 or a number that can be divided by 60 evenly = 1, 2, 3, 4, 5, 6, 10, 15, 20, 30, 60. Multiple of 60 = 60, 120, 180, 240, 300, 360, 420, etc. The rule is a number that can be divided by the hour evenly (or divisible by the number of candlestick within the hour evenly). Why hourly?... because the world's clock is synchronized hourly.
Hi Folks, joining the group. Just plugged the EA in my demo VPS, but with the default params. I'm reading the stuff, if you want me to test an specific case just let me know. Meanwhile I'll be learning the ropes.