The SMA is accelerated during a trend and slowed down during a sideways market, so as to avoid false signals. It's using the fractal dimension as computed by iliko [arcsin5@netscape.net] in his indicator called fractal_dimension.mq4, and makes use of it to smooth the SMA. I feel it is best used in combination with it, so I attached the file (though both indicators are independent and can be used alone).
Code : Download