I was exploring a simple idea how I can visualize the ticker performance against the underlying Index (or any other ticker) performance.
how it works:
When the line is moving up (blue zone), the ticker is performing better than the underlying index (e.g. SPX)(configurable).
When the line is moving down (red zone), the ticker is performing worse than the...
Relative strength is a ratio between two assets, most often a stock and a market average (index). This implementation uses the method described here and the second method described here to calculate its value: "To calculate the relative strength of a particular stock, divide the percentage change over some time period by the percentage change of a particular...
With the new Pine Script features you can build pretty interesting scripts.
Here is my try to expand functionality of basic comparison tool you have in TradingView.
When you apply it on your chart you can select a bar when do you want to start comparing your instrument from.
In parameters you can specify up to 32 symbols to compare. You can also disable symbols...
This script allows you to compare the percentage-based change in the price of any two securities on any given (and supported) timeframe on the chart. This can give you a very simple way to compare any two securities against one another.
Ex: If your base security gained 5%, and the other security gained 3% in a single day, the change comparison would show a green...
I compared custom median (using the sorting solution by @apozdnyakov) with built-in median (using percentile_nearest_rank function)
If you see the zero line this means the solutions give the same results.
The best results was achieved on the odd lengths.
1) Do not try to reinvent the wheel.
2) Always check the Pine Script docs to find already...
This indicator allows to compare the performance (% change) of a given symbol with the larger market ( AMEX:SPY ) and/or with a custom symbol, which defaults to AMEX:XLK (an ETF tracking technology companies from the S&P 500).
The performance for the current symbol is displayed as a blue histogram, while performance for the AMEX:SPY and the custom symbol are...
Compares the major forex currencies to to each other, good for seeing relative strength and choosing trading pairs based on that.
Original script is by @aelius from 2016. I just made it a bit more responsive, easier on the eye, and I added labels.
Calculates a divergence between 2 series
bullish(_src, _low, depth) Calculates bullish divergence
_src : Main series
_low : Comparison series (`low` is used if no argument is supplied)
depth : Fractal Depth (`2` is used if no argument is supplied)
Returns: 2 boolean values for regular and hidden...
This is an original indicator so a true hidden gem in my opinion. I based this idea off of the work by Giorgos Siligardos (Stocks and Commodities Aug 2012) with his indicator called the Sector Rotation Model. This indicator is best used as a trend confirmation in combination with another indicator such as a leading indicator. This will show you how strong the...
This one compares the total candle height (Low to High), body size, also top and bottom wick sizes. I really don't know when it would be best to use this, but it gives a 0 baseline to compare candles side-by-side also to compare body size to wick size.
- The tallest of course is high minus low
- whether or not the close is above the open, the body...
Kendall Rank Correlation Coefficient script.
This way to measure the ordinal association between two measured quantities described by Maurice Kendall (1938, Biometrika, 30 (1–2): 81–89, "A New Measure of Rank Correlation").
In this script I compare Kendall Coefficient and Pearson Coefficient (using built-in "correlation" function).
This script is very much beta!
This is a simple script to visualize how two symbols move in relation to each other. For example if the underlying symbol is a 2x Gold ETF (meaning the ticker moves at 2x the spot price of gold---if gold goes up 3% this ticker should go up 6%) and the comparison symbol is an 2x inverse gold ETF (at gold up 3% this should move down...
"In time series analysis, dynamic time warping (DTW) is an algorithm for
measuring similarity between two temporal sequences, which may vary in
speed. For instance, similarities in walking could be detected using DTW,
even if one person was walking faster than the other, or if there were
accelerations and decelerations...
There are plenty of indicators that aim to measure the volatility (degree of variation) in the price of an instrument, the most well known being the average true range and the rolling standard deviation. Volatility indicators form the key components of most bands and trailing stops indicators, but can also be used to normalize oscillators, they are therefore...
ReDraw script calculates the historical returns and drawdown for the given periods.
By default, the return of the linear regression trends is displayed (can be turned off in settings). In this mode, two linear regression trends are being computed for both long and short periods, and the percent value indicates the "return of the trend" for the corresponding...
Here I bring you an array of methods to compare the swings and consistency between assets.
This indicator is excellent for swing traders and scalpers looking to maximize their profits by examining which of two closely related pairs provides greater price fluctuation during given period.
This indicator works against two assets, which are to be configured in...
This is a public library that include the functions explained below. The libraries are considered public domain code and permission is not required from the author if you reuse these functions in your open-source scripts