# Apply a moving average to momentum

I was wondering if anybody here knows how to make an indicator that has a moving average applied to the momentum indicator.
Basically it would be in a seperate window like the momentum indicator (28 period), except there would be another line (a simple moving average - 28 period), applied to it. I want the moving average to be calculated using the values of momentum.
Anybody have any pointers for me? Im trying to program it myself, but honestly, i cant do it without help cause i cant even program in Visual Basic.

You do realize, right, that putting a 28-day average on a 28-day momentum essentially doubles the lag time of what you’re looking at?

The indicator wouldn’t exactly be used on a daily time frame. Plus the original momentum line would still essentially be… the original momentum line. There would just be another line added to the window, indicating the average of it’s past values. I would use it on 5 min-1 hour time frames. Daily time frames might be too long. Either way, i think the momentum indicator is a great indicator no matter what time frame it is in. If you’re wondering where i got the idea, it was from Jacob Bernstein’s [I]The Ulitimate Day Trader[/I]. He uses the above indicator on his TradeNavigator platform and it works well.

What platform…MT4?

Ok, you don’t need programming for that.

Load your Momentum indicator and then drag and drop the MA indicator into the SAME window as the Momentum indicator. From the properties box of the MA indicator, click on Apply to and select the last option “First Indicator’s Data”

Unfortunately not a seperate window but I’m sure it will suffice. You can always select the momentum indicator color to the same as the background if you really don’t want to see it.

OH WOW. Thank you. Been using MT4 for a year and a half and never knew you could do that.

But Id like to use the MQL code to get my own indicator up and running.

iMA(NULL, PERIOD_CURRENT, 14, 0, MODE_SMA, (iMomentum(NULL, PERIOD_CURRENT, 14, PRICE_CLOSE, 0)), 0);

This is what i have but its not working.