RelativeStrengthComparative_IBD_YRKI am publising Relative Strength Comparative.
It is be used to compare a Stock's Performance against another stock/index (Default NIFTY50)
I also devised a Plot RS Rating which is inspired from IBD's RS Rating and matches to some extent. You can turn off/on the RS Rating as per need.
Example: ITC vs NIFTY 50 it will be ITC / NIFTY
The Indicator can be used in Multiple ways:
1) Check Relative Strength
2) Check RS Rating (This is not Accurate as of now since IBD compares the ratings of all the stocks in an Exchange)
3) Can be used as a Spread Chart for the Division (We need to not divide every time we change Stocks)
4) Design a Template exactly as MarketSmith by using the TradingView feature of "Move to --> Existing Pane Above"
The Formula i used for RS Rating is below with more weightage on the 3 month performance and lesser on 12 month Performance. I am open to Modification of this Formula if a better suggestion
// relative strength IBD style
ThreeMthRS = 0.4*(close/close)
SixMthRS = 0.2*(close/(close*2))
NineMthRS = 0.2*(close/(close*3))
TwelveMthRS = 0.2*(close/(close*4))
Индикатор сравнение относительной силы
Price Relative / Relative StrengthThe Price Relative indicator compares the performance of one security to another. This indicator can be used to compare the performance of a stock against a benchmark index, such as the S&P 500, or its sector/industry group. This makes it possible to determine if a stock is leading or lagging its peers.
The Price Relative is used to gauge relative strength, which is important when it comes to stock selection. Many portfolio managers compare their performance to a benchmark, such as the S&P 500. Their goal is to outperform that benchmark. In order to achieve this goal, managers often look for stocks that are showing relative strength. Enter the Price Relative. The Price Relative rises when a stock shows relative strength and is outperforming its benchmark. Conversely, the Price Relative falls when a stock shows relative weakness and is underperforming its benchmark.
Source: school.stockcharts.com
This script allows the user to
Add a new indicator pane for Price Relative (PR)
Edit the benchmark symbol (Comparative Symbol)
Edit or hide the moving average
Quickly determine if the symbol is outperforming or underperforming its benchmark
Quickly determine if the symbols is trending higher or lower based on a simple moving average
Relative Strength 4DimensionIn the S&C September 2020 article “Tracking Relative Strength In Four Dimensions”, James Garofallou presents a metric for evaluating a security’s strength relative to 11 major market sectors and over several time periods. All this information is squeezed into a single value. Maybe at cost of losing other important information? In this article we’ll look into how to program such a beast, and how it fares when we use it for rebalancing a stock portfolio.
This is a redesigned version for an european point of view.
I used 10 index for the comparison.
feel free to tip me ;-)
Periodic price change comparisonPeriodic price change.
Application:
Sector rotation analysis by comparing different tickers.
Simple statistical analysis (with lookback period) for knowing how good they were.
If you are a believer in sector rotation, you can add different sector stocks to see which of them are lagged behind and buy them.
In this example, you could see tesla periodically fall behind the market. You can buy it when it is on that zone.
And you can also refer to the sharpe ratio and the average gain rate on the chart to see how good the stocks were.
Relative Strength (Mansfield RS)This version of the Mansfield Relative Strength Indicator uses the unflattened version of the indicator recommended on the Stage Analysis website, as the slope angle of "Zero Line" (52 week MA of the stock / S&P 500) gives additional useful information that can't be seen on the traditional flattened version of the Mansfield Relative Strength Indicator.
Price Volume Strength ComparatorBollinger bands says whether price or any source is relatively high or low at any particular point of time. We can apply Bollinger bands on RSI and volume indicator Price Volume Trend to identify if RSI movement or PVT movement is relatively high or low.
By calculating Bollinger %B, we can define the variation in a range between 0 to 1. By applying Bollinger %B on price, volume and strength, we are trying to compare how much they differ relative to each other.
For example, if Bollinger %B of volume is higher than Bollinger %B of price, which may mean, we can still expect continuation of upward movement. If volume %B is lesser, we can interpret this as price has moved more than the volume and may retrace back.
Note: I tried adding multiple volume/strength indicators as input choice. But, if condition did not work with simple string. Have no idea why. I will try adding that later if more people show interest.
Relative Strength Auto ComparisonRelative Strength Comparison with automatic selection of relevant index
Added support for most european and north american exchanges.
SPY RelativeShows an instrument's sentiment in a day (or week) compared to the market (SPY default). The Red line shows bearish sentiment compared to the market and the green is bullish. Technically this works like a proxy for Alpha/Beta factor.
Smart Relative Strength Can Remove False SignalsRelative strength is one of the most useful indicators in the market, highlighting when stocks and sectors are outperforming or underperforming a broader index.
Traditional RS compares the percentage change of one symbol over a given time frame and subtracts the percentage change of the S&P 500 over the same period.
This is handy, but it can produce false signals at times of volatility. For example, when the broader market is crashing, certain sectors may “outperform” simply by falling less than the S&P 500.
Smart Relative Strength addresses this shortcoming by requiring that the symbol’s absolute AND relative returns both be positive. Otherwise a zero is returned.
This was useful last week on the Dow Jones Transportation Average . Using simple relative strength, it had its best one-week performance against the S&P 500 since October 2008. This was obviously a false signal because October 2008 was a time that everything else was crashing.
Smart Relative Strength showed that, excluding periods of overall decline, DJT had its best week since January 2008.
Note: This chart uses a 1-period interval, while the code defaults to 21 periods.
JSE Top 40 Comparative Relative Strength RSI OscillatorThis code is the result of an idea by @MarcoOlivano. The question was that if putting the comparative relative strength as an RSI oscillator would help in understanding the relative strength of the stock to the overall market? As we both trade the JSE I have made the JSE:J200 or Top 40 the basis for comparison. This can be changed in the settings dropdown if you want to compare with the All Share Index (JSE:J201) or other markets such as the S&P.
On the chart above I have included the Comparative Relative Strength as a reference together with the Comparative Relative Strength RSI.
If you use the indicator or adapt it please let me know if it works for you, how you use it and if it has any value.
natLogarithmicRegressionCurveThis is my attempt to rebuild the Momentum Strategy as read in the book "Stocks on the move".
Correlation MatrixIn financial terms, 'correlation' is the numerical measure of the relationship between two variables (in this case, the variables are Forex pairs).
The range of the correlation coefficient is between -1 and +1. A correlation of +1 indicates that two currency pairs will flow in the same direction.
A correlation of -1 indicates that two currency pairs will move in the opposite direction.
Here, I multiplied correlation coefficient by 100 so that it is easier to read. Range between 100 and -100.
Color Coding:-
The darker the color, the higher the correlation positively or negatively.
Extra Light Blue (up to +29) : Weak correlation. Positions on these symbols will tend to move independently.
Light Blue (up to +49) : There may be similarity between positions on these symbols.
Medium Blue (up to +75) : Medium positive correlation.
Navy Blue (up to +100) : Strong positive correlation.
Extra Light Red (up to -30) : Weak correlation. Positions on these symbols will tend to move independently
Light Red (up to -49) : There may be similarity between positions on these symbols.
Dark Red: (up to -75) : Medium negative correlation.
Maroon: (up to -100) : Strong negative correlation.
FX Currency Strength IndicatorFX Currency strength indicator is a visual guide that demonstrates which currencies are currently strong, and which ones are weak.
FX Currency strength indicators include multiple calculation to choose from
1. Relative Strength Index (RSI)
2. True Strength Index (TSI)
3. Absolute Strength Index (ASI)
4. Linear Regression Slope (LRS)
5. Rate of Change (ROC)
6. Z-Score
Three display modes
1. Lines
2. Columns
3. Areas
Function Highest/Lowest by PeterONo matter how much I like PineScript, there are still things missing in the language. One of the most annoying issues is that you cannot set dynamic length value for highest/lowest functions. This length must be fixed integer. But it doesn't make sense in a lot of cases, when you'd like to know what was the highest/lowest value of a series SINCE EVENT in the past, but you don't know WHEN this event exactly happened.
Us, coders would like to do this: `highest(series,barssince(...))`
But it is not working.
Numerous coders are using RicardoSantos' f_highest/f_lowest script (), probably the most often copy/pasted snippet of PineScript code out there. It is doing more-less what `highest(series,barssince(...))` would be doing, but with hardcoded max bars back.
Ricardo is my idol by the way, but that didn't stop me from creating my own version of Highest/Lowest functions. They are fast, simple, effective and very light for Pine engine.
Please treat this as an OPEN SOURCE snippet of code, which can be used in variety of ways.
I have implemented a simple use-case myself, to demonstrate what can be done. The example shows what was the highest/lowest value of RSI since the previous cross of Stochastic. So that you don't enter SHORT on Stochastic crossunder, if RSI didn't reach oversold (<30) since the previous Stochastic crossunder = aka maybe the downtrend has exhausted.
I'm sure you'll find plenty of use cases for it in your studies and strategies as well. If you create your own code using my Highest/Lowest functions, don't hesitate to put a link down here in comments.
P.S. This is not a strategy in any way, so don't ask me "does it backtest well?".
P.S.2 This code doesn't repaint as well ;)
Relative Strength(RSMK) + Perks - Markos KatsanosIf you are desperately looking for a novel RSI, this isn't that. This is another lesser known novel species of indicator. Hot off the press, in multiple stunning color schemes, I present my version of "Relative Strength (RSMK)" employing PSv4.0, originally formulated by Markos Katsanos for TASC - March 2020 Traders Tips. This indicator is used to compare performance of an asset to a market index of your choosing. I included the S&P 500 index along side the Dow Jones and the NASDAQ indices selectively by an input() in "Settings". You may comparatively analyze other global market indices by adapting the code, if you are skilled enough in Pine to do so.
With this contribution to the Tradingview community, also included is MY twin algorithmic formulation of "Comparative Relative Strength" as a supplementary companion indicator. They are eerily similar, so I decided to include it. You may easily disable my algorithm within the indicator "Settings". I do hope you may find both of them useful. Configurations are displayed above in multiple scenarios that should be suitable for most traders.
As always, I have included advanced Pine programming techniques that conform to proper "Pine Etiquette". For those of you who are newcomers to Pine Script, this script may also help you understand advanced programming techniques in Pine and how they may be utilized in a most effective manner. Utilizing the "Power of Pine", I included the maximum amount of features I could surmise in an ultra small yet powerful package, being less than a 60 line implementation at initial release.
Unfortunately, there are so many Pine mastery techniques included, I don't have time to write about all of them. I will have to let you discover them for yourself, excluding the following Pine "Tricks and Tips" described next. Of notable mention with this release, I have "overwritten" the Pine built-in function ema(). You may overwrite other built-in functions too. If you weren't aware of this Pine capability, you now know! Just heed caution when doing so to ensure your replacement algorithms are 100% sound. My ema() will also accept a floating point number for the period having ultimate adjustability. Yep, you heard all of that properly. Pine is becoming more impressive than `impressive` was originally thought of...
Features List Includes:
Dark Background - Easily disabled in indicator Settings->Style for "Light" charts or with Pine commenting
AND much, much more... You have the source!
The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section, should you have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members, I may implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
CPR WidthThe indicator shows the width of the Central Pivot Range. Frank Ochoa call it It Pivot Range Histogram in his book.
Use it in conjunction with the Central Pivot Range indicator.
Below is the interpretation of the reading.
CPR Width > 0.5 - Sideways or Trading Range Day,
CPR Width > 0.75 - increases the likelihood of sideways trading behavior,
CPR Width < 0.5 - Trending type of day,
CPR Width < 0.25 - increases the likelihood of a trending market.
The above reading only increases the likely-hood of the possibility and not always right.
Crypto Performance vs IndexQuickly shows you if an altcoin is outperforming or underperforming it's peers. You can compare again indexes of high cap, mid cap and low cap indexes, which are provided by FTX.com. I intend to add some more features but am currently a bit busy so wanted to get it published as I've been finding it useful
Relative Strength RankRelative Strength Rank Indicator
( ( Long Term Price Change + Short Term Price Change ) / 2 ) / 10 Day ATR
Relative Strength Comparison (RSC) Indicator SignalsThis Relative Strength Comparison (RSC) indicator overlays a simple moving average (SMA) of the prior days values and changes color when the RSC crosses above and below that value as an indicator with bearish and bullish signals in comparison to another symbol.
Multiple BTC RSIs in a single indicatorPlots in a single indicator the Bitcoin RSI of multiple exchanges. The selected exchanges are Bitmex, Binance and Coinbase. The reason is that these are the ones with the highest 24h volume (coinmarketcap) and have a ticker available in Trading View.
One drawback with this indicator is that it doesn't automatically adjusts its resolution when the Bitcoin chart is rendered across timeframes. You have to manually update the time resolution in the settings window for the indicator.