Scripting Martin Pring’s Momentum Oscillators – KST

by | Nov 22, 2017 | Featured, All Articles, Technical Analysis, Education

In his debut as an author in Stocks and Commodities magazine in August of 1992 Martin Pring introduced his analytical methods using rate of change (ROC) momentum oscillators. Before we continue, we offer a brief review of how momentum and ROC are calculated and plotted.

Momentum is a simple indicator that measures the velocity of price changes. It is calculated by periodically finding the difference between two prices over a fixed time period. For example, a 21-day momentum indicator is calculated by continually subtracting the current closing price by the close 21 sessions prior. This value is then plotted around a zero line. The formula for momentum is: M = V – Z, where V is the most recent closing price and Z is the closing price n days ago (in this case n = 21 days). If the recent close is greater than 21 days ago a positive value is plotted above the zero line, while if the latest close is lower than 21 days ago a negative value is plotted below the zero line. The WTI Crude Oil futures chart below displays a 21-day momentum indicator in the lower panel. This is achieved in Optuma by applying the Momentum tool and changing the period to 21 bars in the Properties box.


Rate of Change (ROC) is a ratio version of a simple momentum indicator. Instead of subtraction, the ROC oscillator utilizes division. The formula is ROC = 100 x (V / Z), where V is the latest close and Z is the close n days ago. Again, if the last close is higher than the close n days ago, the value is plotted above zero. If the last close is lower, the value is plotted below zero. The chart below shows the same WTI Crude futures with a 21-day ROC.


Note how the momentum calculation employs subtraction, while the ROC calculation utilizes division. The difference between these two methods is highlighted in the following example: Over a long period of time a security may trade at $50 and years later at $100. A $5 move when the security is trading at $50 is 10%, while a $5 move when the security trades at $100 is 5%. Using the ROC division method is far superior because proportional price moves are displayed by an equal rise or fall in the oscillator regardless of the price level. Short-term charts may not be dramatically affected by this issue, but longer-term charts will.

In the August 1992 article, Pring suggests that using ROC helps identify some of the cyclical movements in markets, giving advance warning of a reversal in the prevailing trend, but adds that ROC can give misleading signals in a market with a sustained trend. He goes on to say that because ROC is “jagged” it can often give false signals, and this why he prefers to smooth the oscillator with a moving average. This can be accomplished easily in Optuma by adding a moving average to the ROC (in this case we have applied a simple nine period moving average in green) and then clicking back on the ROC oscillator and unchecking the “Visible” button in the Properties box on the left, leaving only the smoothed oscillator. The result is shown in the chart below.


Although helpful as a technical tool, using only one smoothed ROC oscillator as a reference of underlying momentum is limited because it amplifies only one of many cycles that are work in any given security. Pring addresses the limitations of using only one smoothed ROC as the sole momentum indicator by “stacking” multiple smoothed time frame ROC oscillators underneath the price chart. The examples that he put forth in his article were on a longer-term monthly price chart of 25 years in length. For our example, we will show a daily chart that uses different period ROCs. The solution that we have formulated uses daily data on the WTI Crude Oil Futures chart used in the previous examples, although we have lengthened the time frame shown.

As Pring says in his instructional video, “there is no Holy Grail”, and he recommends experimentation. We started by finding the dominate daily cycle in the WTI Crude Oil futures contract by using the “Cycles” tool in Optuma. We used a long, intermediate and short cycle periods to build three ROCs and then smoothed them with shorter-term moving averages. The chart below shows the three oscillators plotted below the price chart using Pring’s “stacked” method, but uses our own ROC time frame and smoothing periods. On the top of the “stack” we have plotted a long term 320-Day ROC smoothed with a 30-Period MA, in the center we have sandwiched a 160-Day ROC smoothed with a 30-Period MA and on the bottom is the shorter-term 80-Day ROC smoothed with a 20-Period MA. The resulting chart and analysis follow with similar notations used by Pring in his online tutorial.


The red arrows mark periods of time where all three indicators have turned and begun to track lower, while the green arrows identify when all three indicators have turned and begun to track higher. Commonality is exhibited when all three time frames have turned and are tracking in the same direction, signaling a change of trend has occurred. The blue arrows mark periods of conflict between the different cycles at play and suggest a potentially trendless condition. One of the early signs that the 2014 second half downtrend had exhausted itself was the non-confirmation in the shorter-term smoothed ROC (purple dashed line). Also, note that when the shorter-term smoothed ROC rolled over at points “A” & “B” the oscillator was signaling that the short-term countertrend price rally had reached its terminus.


The Know Sure Thing Indicator


In his second article in Stocks and Commodities magazine published in September of the same year, Pring introduced his summed rate of change indicator that he called “Know Sure Thing” Indicator, or KST. The KST Indicator combines multiple stacked smoothed ROCs into one indicator. As noted in the formula below, construction is not simply the addition of four different period smoothed ROCs. The KST is weighted so that the longer-term primary time span has a heavier weighting then the intermediate and short-term smoothed ROCs. The weighted numerical values for each time frame are summed and the resulting number is plotted as that day’s KST value. Pring suggests in his KST Online Tutorial, “Now I’m not saying that four time frames are the absolute best, or that these are the best time frames to use, but what I have found over the years is that they do work reasonably consistently, and it is consistency rather than perfection that I am looking for.” The authors agree with the theory of consistency not only in this case, but across all tools in technical analysis.  Below are his original KST formulas for different time frame applications.


It is easy to create a custom tool in Optuma using the Scripting Language. The script for the Short-Term (D) KST is shown below and plotted underneath the Daily WTI Crude Oil futures chart using a Show View tool with multiple outputs.

We start by creating four variables (r10, r15, r20 and r30) which calculates the moving averages of the ROCs, and multiplies the result by the weighting (Wt in the table above). So in the case of r30, we take the 15-period moving average of the 30-period ROC, and multiply it by 4. From those variables the Oscillator, its 9-period MA and the histogram can be easily calculated:

//Create the Rate of Change MAs and weightings
r10 = MA(ROC(BARS=10), BARS=10, CALC=Close);
r15 = MA(ROC(BARS=15), BARS=10, CALC=Close) * 2;
r20 = MA(ROC(BARS=20), BARS=10, CALC=Close) * 3;
r30 = MA(ROC(BARS=30), BARS=15, CALC=Close) * 4;

//Calculate KST Oscillator
Plot1 = r10 + r15 + r20 + r30;
Plot1.Color = Black;
Plot1.LineWidth = 3;

//Signal Line
Plot2 = MA(Plot1, BARS=9, CALC=Close);
Plot2.Color = Red;
Plot2.LineWidth = 1;

Plot3 = Plot1-Plot2;
Plot3.Plotstyle = Histogram;



As Pring states in his book on Market Momentum, “KST should be interpreted using the same principles that you would apply to other oscillators. Divergences, overbought and oversold conditions, trendline violations, and price-pattern analysis are as relevant to the KST as they are to rate-of-change, RSI, MACD and so forth. Trendline violations in the KST do not occur very often; but when they do, they have the effect of strong reinforcement for the KST moving average crossover signals.” The authors recommend technicians experiment with the suggested KST formulas by plotting them on the same chart to help visualize the resulting differences.



Pring, Martin J. [1992]. “Rate of change,” STOCKS & COMMODITIES, August

Pring, Martin J. [1992]. “Summed Rate of Change (KST),” STOCKS & COMMODITIES, September


Share Link
Timothy Brackett, CFTe

Timothy Brackett, CFTe

Technical Analyst

Timothy Brackett is a technical analyst with 35 years’ financial markets experience both on the sell and buy side and is currently working with a portfolio management team monitoring portfolio positions and searching for investment ideas at Marketfield Asset Management LLC. His focus includes, but is not limited to, Median Line analysis, Elliott Wave Principle, multiple time frame price momentum work in concert with candlestick studies. Mr. Brackett holds the CFTe designation and continues to co-author The Weekly Speculator (since 2004). He can be reached at

Kyle Crystal, CMT, CFTe

Kyle Crystal, CMT, CFTe

Principal of Crystal Capital Advisors, LLC and Lakeshore Technical Analysis, LLC

Kyle Crystal is a Principal of Crystal Capital Advisors, LLC and Lakeshore Technical Analysis, LLC. Mr. Crystal has over 10 years of investment experience managing long/short, long only, global macro and commodity strategies. He holds the CMT and CFTe designations and specializes in multiple time frame analysis, market geometry (including median line analysis), Elliott Wave Principle and momentum analysis. You can reach him at


Submit a Comment

Your email address will not be published. Required fields are marked *

2 × 4 =

Blog Signup

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.