Could you please write this formula in Amibroker program? Thanks so muchOne of the core components of Stan Weinstein's method is the use of Relative Performance compared to an index such as the S&P 500, to a sector or to another stock. Which was referred to in his book as Relative Strength.
However, this should not to be confused with the popular RSI (Relative Strength Index developed J. Welles Wilder), which is a momentum oscillator that measures the speed and change of price movements on a single stock. And so, to avoid any confusion when talking about the kind of Relative Strength we are interested in, I've renamed to be "Relative Performance".
Weinstein defines it as the following on page 18 of the book:
Relative Performance Indicators
On here I have two ways of representing the Relative Performance on a chart. The first version I show is the representation that people are used to from the book (#1 on the below chart) which is the Mansfield Relative Strength Indicator. The second version that I show immediately below (#2 on the below chart) is the standard relative performance line that you get if you divide the closing price of the stock by the index that you want to reference, which in the majority of cases will be the S&P 500 Index unless otherwise stated.
So as you can see, these two indicators are identical, however, they show the Relative Performance data in slightly different ways, which I personally find useful to see. For example, the "zero line" on the Mansfield version is a flattened 52 week moving average which shows the data more like an oscillator and so is easier to see when it reaches extremes. However, on the standard relative performance line the slope of the 52 week moving average (zero line) can be seen, which can give further clues to the relative performance of the stock versus the index on a longer term basis.
Below is a weekly chart of Apple (AAPL) showing the two versions of the Relative Performance Indicator versus the S&P 500 Index.
Standard Relative Performance indicator
The formula for calculating standard relative performance indicator is quite simple:
And then a 52 week moving average is added to the indicator to show the zero line.Code:
RP = ( stock_close / index_close ) * 100
So the longer version is:
Standard Relative Performance = (today's close of the stock divided by today's close of the index) * 100
Mansfield Relative Performance indicator
The formula of this indicator is a bit more difficult than the regular Standard Relative Performance indicator:
MRP = (( RP(today) / sma(RP(today), n)) - 1 ) * 100
RP = Standard Relative Performance indicator (see above)
SMA = Simple moving average over n days.
n = 52 for weekly charts, and n = 200 on daily charts
So to make it a bit clearer:
Mansfield Relative Performance = (( Today's Standard Relative Performance divided by Today's Standard Relative Performance 52 Week Moving Average )) - 1) * 100
I hope the above calculations all make sense, but if you need further assistance then chartmill.com did a good article on it which you can find here: ChartMill.Com | Articles on Technical Analysis Indicators and Screeners
Hi joyman1710, you can find the code for creating the Mansfield Relative Performance Indicator on amibroker and some other charting programs too in the How to create the Mansfield Relative Performance Indicator thread on the Stage Analysis forum here: https://stageanalysis.net/forum/showthread.php?tid=31&pid=8865#pid8865Could you please write this formula in Amibroker program? Thanks so much
i had not heard of these "NYSE Percentage of Stocks above" indicators before, thank youAttached is the NYSE Bullish Percent Index and the NYSE long, medium and short term moving average breadth charts.
The NYSE Bullish Percent Index
Note: Bear correction status
View attachment 250908View attachment 250918
NYSE Percentage of Stocks above their 200 Day, 150 Day and 50 Day Moving Averages P&F charts
Note: 200, 150 and 50 day charts have moved back to Bear confirmed status
View attachment 250910View attachment 250912View attachment 250914
NYSE Percentage of Stocks above their 200 Day, 150 Day and 50 Day Moving Averages line charts
View attachment 250916View attachment 250920View attachment 250922
|Thread starter||Similar threads||Forum||Replies||Date|
|S||Weinstein rules for traders and 10 wma||Discretionary Trading||2|
|S||Clarification needed for Stan Weinstein's Technical Analysis||Technical Analysis||2|
|E||Stan Weinstein's Relative Strength||Technical Analysis||4|
|Stan Weinstein: secrets for profiting in bull and bear markets||Educational Resources||10|
|A||HSBA and STAN||Technical Analysis||1|