Skip to main content

Let’s explore the exciting world of algorithmic trading with the Price Momentum Oscillator (PMO) Amibroker AFL Code. This amazing tool is available for free and ready to enhance your trading experience on Amibroker.

Exploring the Price Momentum Oscillator (PMO)

The Price Momentum Oscillator (PMO) is your go-to tool for gauging the pace of price changes in the stock market. It’s like a magnifying glass that zooms in on how prices close over time, smoothing the data with a double exponential moving average to spot trends like a pro. Traders and investors love using the PMO in technical analysis to find those golden moments to buy or sell in the financial markets.

Also Read: Acceleration Bands AFL Code

Price Momentum Oscillator AFL

//  Formula Name:    Price Momentum Oscillator
//  Website:

_SECTION_BEGIN("Price Momentum Oscillator");

_N(Title = StrFormat("{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Plot( Close, "Price", colorWhite, styleCandle );

// Define the period for the moving average calculation
period = 35;

// Calculate the percentage change in closing prices
pc = 100 * ROC(Close, 1);

// Calculate the PMO using a double exponential moving average
pmo = EMA(EMA(pc, 10), 35) - EMA(EMA(pc, 20), 35);

// Plot the PMO on the chart
Plot(pmo, "PMO", colorBlue, styleOwnScale);


A Glimpse of the PMO in Action

Check out how the PMO AFL looks on Amibroker:


Breaking Down the PMO AFL

  • Starting off, the PMO formula is (Close - Open) / (High - Low).
  • It calculates the PMO by first figuring out the percentage change in closing prices.
  • Then, it uses two exponential moving averages over different periods and blends them together for a clearer signal.
  • Last but not least, it visually presents the PMO on the chart in a striking blue color, making it easier for you to spot key market trends and trading opportunities.

The PMO is an awesome tool for any trader looking to understand market trends and time their trades perfectly.

Also Read: How to do External API Calls from Amibroker AFL?

Leave a Reply