public MomentumPct(DataSeries source, int period, string description)
public static MomentumPct Series(DataSeries source, int period)
public static double Value(int bar, DataSeries source, int period)
||Indicator calculation period
MomentumPct is the current price divided by the price of a previous period
and the quotient is multiplied by 100. The result is an indicator that oscillates around 100. Values less than 100 indicate negative momentum, or decreasing price, and vice versa.
- MomentumPct can be interpreted in a similar way as the standard Momentum indicator. However, MomentumPct has the additional advantage of indicating the amount of commitment to the current trend in a consistent manner over a broad range of prices. For example, assume that ABC is priced at 60 and XYZ is quoted at 20. After X Periods, ABC is now 62 and XYZ is 22. Though Momentum is the same (2.0) for both issues, MomentumPct is 103.33 and 110.0, respectively, indicating that the price movement is more significant for the lower-priced security, i.e., 10% vs. 3.33%.
- Subtract a constant 100 from MomentumPct to yield the absolute percentage change over the specified Period to yield the same result as the ROC indicator.
MomentumPct = 100 * Pricetoday
/ Pricen periods ago
public class MyStrategy : WealthScript
protected override void Execute()
// Duplicate the MomentumPctSeries calculation
int Period = 20;
DataSeries hTmp = ( Close >> Period );
DataSeries hMomPct = ( Close/hTmp ) * 100;
ChartPane MomPctPane = CreatePane( 30, true, true );
PlotSeries( MomPctPane, hMomPct, Color.Red, WealthLab.LineStyle.Solid, 2 );
PlotSeries( MomPctPane, MomentumPct.Series( Close, Period ), Color.Black, WealthLab.LineStyle.Solid, 2 );