Anchored TWAP with StDev Bands [MrShadow]TWAP with:
- Anchoring: Custom, Day, Week, Month, Quarter, Year (custom anchoring can be selected by dragging a vertical line through the chart)
- Standard Devation Bands
- Auto-coloring depending on the trend
Trend
Pivot Trend LevelsYou can use this indicator to detect the levels and trend.
I used the highest of the two last highest pivots and the lowest of the two last lowest pivots to calculate "max" and "min" or high level or low level.
I also calculate the average of the 4 values to reach the average line which could be a trend detector in higher lengths.
Default length is 3 but using 10 or 20 as length is really good as trending detector.
I need help to upgrade a trend detector system. please read the script for more information.
Thank you so much.
Triple ThreatThis indicator provides buy and sell signals for Bitcoin based on confluence from well-known momentum, volatility, and trend indicators. It has successfully captured the major directional trends on Bitcoin's daily chart since 2018, and the settings are currently optimized for this chart in particular. This indicator implements RSI to gauge momentum, BBWP to gauge volatility, and an EMA to gauge trend. Maximum confluence signals are represented by horizontal bars in the indicator's pane, where the tallest green bar is a confirmed buy signal, and the tallest red bar is a confirmed sell signal. The shortest bar represents a momentum-only signal, and the second-shortest bar represents a volatility signal in confluence with the previously given momentum signal.
To track momentum, the RSI is plotted to the indicator plane against a moving average of the RSI. A momentum signal is generated when the RSI crosses over its moving average, retests/approaches the moving average, and then continues in the crossover direction (i.e., it fails to cross the moving average to the opposite side, creating a successful retest). The settings that affect this trigger are the "Crossover Threshold," which specifies how much the RSI should exceed the moving average to be considered a crossover, and the "Retest threshold," which specifies how closely the RSI should approach the moving average to be considered a retest. A momentum signal is ALSO generated if the RSI or its moving average exceed their counterpart by a certain threshold. For example, if the threshold was set at 10, a BUY signal would be generated when the RSI exceeds the moving average by 10, or a SELL signal would be generated when the moving average exceeds the RSI by 10. This threshold can be set using the "Instant Signal Threshold" setting. Either type of momentum signal will be plotted on the pane as the shortest horizontal bar, with its color indicating the signal's direction.
Volatility is primarily measured using the Bollinger Band Width Percentile (BBWP) indicator, which was created by The_Caretaker. BBWP plots the volatility of the asset's price, given by Bollinger Band width, relative to past volatility by assigning the volatility readings into percentiles. The indicator also includes a moving average of the BBWP itself, where a crossover to the upside represents expanding volatility and a crossover to the downside represents contracting volatility. This indicator is used to confirm a signal given by the momentum indicators - a momentum signal that is given during a period of expanding volatility has a greater likelihood of success. Therefore, when the BBWP crosses above its moving average by a given threshold, a previously triggered momentum signal is considered to be "confirmed." The threshold for this crossover can be set using the "BBWP Confirmation Threshold" setting. However, it is also relevant that periods of extreme volatility often accompany an extremity in price action (a "top" or "bottom"), in which case the BBWP is likely to contract after price reaches such an extremity. This phenomenon is captured by also using "extreme reads" on the momentum indicator to signal that there has already been enough volatility to confirm a momentum signal. If the RSI gives an "extreme read" before triggering a signal, the momentum signal is also considered to be confirmed. For example, if the RSI is above 80, breaks below 80, and then gives a SELL signal, this sell signal is considered to be confirmed without requiring the BBWP to crossover its moving average to the upside. The threshold that would confirm a SELL signal can be set with the "Overbought" setting, and the threshold that would confirm a BUY signal can be set with the "Oversold" setting. Whenever a volatility signal confirms a momentum signal, a medium-sized horizontal bar will be plotted on the pane in the same directional color as the momentum signal. Note that a momentum signal may trigger at the exact same time as the volatility signal which confirms it; in this case, only the medium-sized bar will be visible on the pane, but its direction can still be identified by its color.
Lastly, to reduce the likelihood of "false signals," a trend indicator is used to confirm the direction of the signal. This is typically an exponential moving average. If a confirmed volatility SELL signal is given, and the closing price is below the moving average, then the SELL signal is also confirmed by the trend. Likewise, if a confirmed volatility BUY signal is given, and the closing price is above the moving average, then the BUY signal is confirmed by the trend. The type and length of the moving average used to verify the trend can be set using the "Moving Average Type" and "Moving Average Length" settings found below the momentum/volatility settings. A trend signal is plotted on the pane as a tall horizontal bar, and is more deeply colored than the momentum and volatility signals.
For maximum confluence, it is recommended that the trend signal, given by the tallest bar, is the one that forms the basis of trades executed while using the Triple Threat indicator. It is possible to enter more aggressive trades with better entries by using only the volatility signal, given by the medium-sized bar, however this entails greater risk and should only be done in confluence with an additional trading strategy of your own discretion. Backtesting has shown that using the volatility signal alone underperforms using the volatility signal in confluence with the trend signal.
Please also be advised that the default setting are optimized for Bitcoin's daily chart only. The indicator is still applicable to other timeframes and asset classes, but the settings may need to be modified. I have a list of settings for other Bitcoin timeframes, and I would be happy to share them upon request.
I hope you can find this indicator to be of some use to your trading strategies. I'd be happy to hear any feedback from the community, so please don't hesitate to reach out. Stay safe, and happy trading.
Trend Trading with Currency Strength MeterThis is a trend trading strategy designed mainly for forex made of two big components:
First we have the currency meter, which is made of taking TSI of different INDEXes such as EUR, USD, GBP, JPY, NZD, AUD , CHF and CAD.
Once we establish which one is the weakest and most powerful, we pair them together and we go on that chart.
Lastly we check with the EMA 200 to confirm our direction.
We can see in this example for the USDJPY chart, that USD is the strongest, JPY is the weakest and ema confirm our bullish trend.
For timeframe in general I recommend big timeframes, 1-4h+ , and as a mentality a swing trading mentality, we can stay in trade for days/weeks.
For exit in general I recommend to exit when either one of the pairs losses/gain power or when the EMA is crossing with current candle
If you have any questions, let me know !
[_ParkF]FractalTop gray line is the fractal resistance.
Bottom gray line is the fractal support.
Central red line is the average of the top&bottom fractal.
Fractals can be displayed as support and resistance, and the red fractal average line indicates a trend.
상단 회색선은 프랙탈 저항,
하단 회색선은 프랙탈 지지,
중앙 빨간선은 프랙탈 상,하단의 평균,
프랙탈은 지지와 저항으로 표시되고 빨간색 프랙탈 평균선은 추세입니다.
TRADING MADE SIMPLEThis indicator shows market structure. The standard method of using Williams Highs and Lows as pivots, is something of an approximation.
What's original here is that we follow rules to confirm Local Highs and Local Lows, and strictly enforce that a Low can only follow a confirmed High and vice-versa.
-- Highs and Lows
To confirm a candle as a Local High, you need a later candle to Close below its Low. To confirm a Local Low, you need a Close above its High.
A Low can only follow a High (after it's been confirmed). You can't go e.g High, High, Low, Low, only High, Low, High, Low.
When price makes Higher Highs and Higher Lows, market structure is said to be bullish. When price makes Lower Lows and Lower Highs, it's bearish.
I've defined the in-between Highs and Lows as "Ranging", meaning, neutral. They could be trend continuation or reversal.
-- Bullish/Bearish Breaks
A Bullish break in market structure is when the Close of the current candle goes higher than the previous confirmed Local High.
A Bearish Break is when the Close of the current candle goes lower than the most recent confirmed Local Low.
I chose to use Close rather than High to reduce edge case weirdness. The breaking candle often ends up being a big one, thus the close of that candle can be a poor entry.
You can get live warnings by setting the alert to Options: Only Once, because during a candle, the current price is taken as the Close.
Breaks are like early warnings of a change in market bias, because you're not waiting for a High or Low to be formed and confirmed.
Buy The Dip / Sell The Rally
Buy The Dip is a label I gave to the first Higher Low in a bullish market structure. Sell The Rally is the first Lower High in a bearish market structure.
These *might* be good buying/selling opportunities, but you still need to do your own analysis to confirm that.
== USAGE ==
The point of knowing market structure is so you don't make bullish bets in a bearish market and vice versa -
or if you do at least you're aware that that's what you're doing, and hopefully have some overwhelmingly good reason to do so.
These are not signals to be traded on their own. You still need a trade thesis. Use with support & resistance and your other favourite indicators.
Works on any market on any timeframe. Be aware that market structure will be different on different timeframes.
IMPORTANT: If you're not seeing what you expect, check your settings and re-read this entire description carefully. Confirming Highs and Lows can get deceptively complex.
MTF MACD (PPO) [TANHEF]Mult-Timeframe Moving Average Convergence Divergence (MACD) and Percentage Price Oscillator (PPO) indicator that allows for viewing of 1 to 5 different Timeframes.
Brief Summary
The primary benefit of multi-timeframe indicators is getting better entries and confirmation from viewing multiple time frames at once, which can often get overlooked.
MACD shouldn't be only used by itself, it is a lot more consistent when applied in the same direction as the trend as well as multiple other things including support, resistance, and volume improve the outcomes of the MACD results.
Personally, I look for good entries on higher and lower time frames (multiple timeframes must agree with the buying or selling). For example, if a higher timeframe looks like a good long entry (MACD line is crossing up and below the zero line), then the lower timeframes should be checked to ensure they are not oversold or overextended (the MACD line must be low or below the zero), once the lower and higher timeframes are in agreeance an entry can be made.
What is Moving Average Convergence Divergence (MACD)?
Moving average convergence divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of the price. The MACD is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA.
What is the Percentage Price Oscillator (PPO)?
The PPO is identical to the MACD indicator, except the PPO measures percentage difference between two EMAs, while the MACD measures absolute (or dollar) difference. The PPO has the advantage of being comparable to other assets with different prices, whereas MACD readings are not comparable. For example, regardless of the asset's price, a PPO result of 10 means the short-term average is 10% above the long-term average.
A signal line can be displayed on Timeframe, including:
- MACD & Signal Line crosses (Green when MACD above Signal Line and Red when MACD below Signal Line)
- Histogram Direction (fast and slow EMA gap)
- SuperTrend for identifying trend direction (green for uptrend, red for downtrend)
- EMA Trend for identifying trend direction (above EMA = up trend and green, below EMA = down trend and red)
Cross Dots and Potential cross dots
- Green Dot, is displayed when the MACD crosses the Signal Line
- Red Dot, is displayed when the MACD crosses the Signal Line
- Yellow Dot. Potential cross up (green dot) on next bar. Displayed when if the same distance a MACD moves on a bar is applied to the next bar will cause a MACD and Signal Line Cross. This is calculated by checking if the value change of one bar is added to the current MACD value would lead to a cross on the next bar, the it is a potential up dot.
- Purple Dot. Potential cross down (red dot) on next bar. Displayed when if the same distance a MACD moves on a bar is applied to the next bar will cause a MACD and Signal Line Cross. This is calculated by checking if the value change of one bar is added to the current MACD value would lead to a cross on the next bar, the it is a potential down dot.
Best Fit Settings
- Can be applied to the MACD, Signal Line, and Histogram to re-scale (stretch) to fit them within the space of the +2 and -2 range that each timeframe is provided on this indicator.
- The lookback distance value is used to lookback a certain distance to ensure everything scaled to fit well.
Labels are displayed on the right of the indicators, including:
- a label identifying 'line indicator' is currently being displayed
- the Timeframe corresponding to each MACD or PPO indicator
- the MACD or PPO of each Timeframe
Heikin-Ashi Candle ColoringThis script will change the color of normal candlesticks to the color that the corresponding Heikin-Ashi candles would have.
This allows to spot a trend or a trend reversal just by looking at candles, without using Heikin-Ashi candles, which distort the appearance of a typical chart.
Bias Pivot PointA simple indicator that uses Pivot Points as a filter and to generate a Directional Bias .
How to use this indicator?
1. Directional Bias
Bullish => Closing Price > Pivot Point
Bearish => Closing Price < Pivot Point
2. Support / Resistance
Each Pivot Points can be used as Support or Resistance
3. Take Profit Targets
Each Pivot Points can be used as targets for taking profit
Leading Indicator [TH]The leading indicator is helpful to identify early entries and exits (especially near support and resistance).
Green = trend up
Red = trend down
How it works:
The leading indicator calculates the difference between price and an exponential moving average.
Adding the difference creates a negative lag relative to the original function.
Negative lag is what makes this a leading indicator.
The amount of lead is exactly equal to the amount of lag of the moving average.
The leading indicator has lagging signals at turning points.
The leading indicator will always have noise gain, which gets eliminated by applying a moving average.
Modifying the alpha values will modify the amount of noise and change the sensitivity of trend change.
Example 1: Changing alpha1 from 0.25 to 0.15 lowers noise, more clearly identifies trend, and adds delay to this indicator.
Example 2: Changing alpha1 from 0.25 to 0.35 increases noise, less clearly identifies trend, BUT more quickly indicates a trend change.
Calculations:
Where:
alpha1 = 0.25
alpha2 = 0.33
Leading = 2 * (arithmetical mean of current High and Low price) + (alpha1 - 2) * (arithmetical mean of previous High and Low price) + (1 - alpha1) * (previous 'Leading' value)
Total Leading = alpha2 * leading + (1 - alpha2) * (previous 'Total Leading' value)
EMA = 0.5 * (arithmetical mean of previous High and Low price) + 0.5 * (previous 'EMA' value)
Uptrend when 'Total Leading' value is greator than the EMA
Downtrend when 'Total Leading' value is lesser than the EMA
Cybernetic Analysis for Stocks and Futures, by John Ehlers (page 231-235)
Mix1 : Ema Cross + Trend Channel [Gu5] - BacktestBacktest of the indicator "Mix1: Ema Cross + Trend Channel "
Trend indicator, by the crossing of moving averages
SMA200 with a channel as a filter confirms the trend.
The crossing of two moving averages, give alert only in trend.
Bitcoin Inflation-Adjusted Support and Resistance5year breakeven inflation rate fitted for log BTC chart as Support and Resistance
Trend-Quality IndicatorBINANCE:BTCUSDT
Open source version of the Trend-Quality Indicator as described by David Sepiashvili in [ Stocks & Commodities V. 22:4 (14-20) ]
Q-Indicator and B-Indicator are available both separately or together
█ OVERVIEW
The Trend-Quality indicator is a trend detection and estimation tool that is based on a two-step filtering technique. It measures cumulative price changes over term-oriented semicycles and relates them to “noise”. The approach reveals congestion and trending periods of the price movement and focuses on the most important trends, evaluating their strength in the process. The indicator is presented in a centered oscillator (Q-Indicator) and banded oscillator format (B-Indicator).
Semicycles are determined by using a short term and a longer term EMAs. The starting points for the cycles are determined by the moving averages crossover.
Cumulative price change (CPC) indicator measures the amount that the price has changed from a fixed starting point within a given semicycle. The CPC indicator is calculated as a cumulative sum of differences between the current and previous prices over the period from the fixed starting point.
The trend within the given semicycle can be found by calculating the moving average of the cumulative price change.
The noise can be defined as the average deviation of the cumulative price change from the trend. To determine linear noise, we calculate the absolute value of the difference between CPC and trend, and then smooth it over the n-point period. The root mean square noise, similar to the conventional standard deviation, can be derived by summing the squares of the difference between CPC and trend over each of the preceding n-point periods, dividing the sum by n, and calculating the square root of the result.
█ Q-INDICATOR
The Q-Indicator is a centered oscillator that fluctuates around a zero line with no upper or lower limits, is calculated by dividing trend by noise.
The Q-Indicator is intended to measure trend activity. The further the Q is from 0, the less the risk of trading with a trend, and the more reliable the trading opportunity. Values exceeding +2 or -2 can be qualified as promising
Values:
in the -1 to +1 range (GRAY) indicate that the trend is buried beneath noise. It is preferable to stay out of this zone
in the +1 to +2 or -1 to -2 range (YELLOW) indicate weak trending
in the +2 to +5 range (BLUE) or -2 to -5 range (ORANGE) indicate moderate trending
above +5 range (GREEN) or below -5 (RED) indicate strong trending
Readings exceeding strong trending levels can indicate overbought or oversold conditions and signal that price action should be monitored closely.
█ B-INDICATOR
The B-Indicator is a banded oscillator that fluctuates between 0 and 100, is calculated by dividing the absolute value of trend by noise added to absolute value of trend, and scaling the result appropriately.
The B-indicator doesn’t show the direction of price movement, but only the existence of the trend and its strength. It requires additional tools for reversal manifestations.
The indicator’s interpretation is simple. The central line suggests that the trend and noise are in equilibrium (trend is equal to noise).
Values:
below 50 (GRAY) indicate ranging market
in the 50 to 65 range (YELLOW) indicate weak trending
in the 65 to 80 range (BLUE) indicate moderate trending
above 80 (GREEN) indicate strong trending
The 65 level can be thought of as the demarcation line of trending and ranging markets and can help determine which type of technical analysis indicator (lagging or leading) is better suited to current market conditions. Readings exceeding strong trending levels can indicate overbought or oversold conditions.
Ehlers Leading Indicator [CC] RibbonQuoted from Cheatcountry : “The Leading Indicator was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pg 235) and as the name implies, this is a leading indicator that provides super early signals. Feel free to change the alpha values to adjust to your needs. Buy when the indicator line is green and sell when it is red.”
His original script:
This is a mod of Cheatcountrys script. I put it into a function and plotted several and implemented a tally of all.
Credit to him and John Ehler. Published with permission.
ADX DI EMA Clouds
EMA clouds colored by DI and ADX indicator:
9 EMA and 21 EMA Cloud turns green in a bull trend and red when in a bull trend...if the trend is half bulll and half bear..the clouds turn white.
I also coded if the momentum in increasing (yellow) or if the momentum is decreasing (blue) or if the momentum is flat (white).
The Clouds are colored based off the Di (+/-)
9 EMA is colored based of ADX momentum strength
ADX:
ADX is used to quantify trend strength. ADX calculations are based on a moving average of price range expansion over a given period of time. The default setting is 14 bars, although other time periods can be used.1
ADX can be used on any trading vehicle such as stocks, mutual funds, exchange-traded funds and futures .
DI (+/-):
The directional movement index (DMI) is an indicator developed by J. Welles Wilder in 1978 that identifies in which direction the price of an asset is moving. The indicator does this by comparing prior highs and lows and drawing two lines: a positive directional movement line ( +DI ) and a negative directional movement line ( -DI ). An optional third line, called the average directional index ( ADX ), can also be used to gauge the strength of the uptrend or downtrend.
This indicator has the length changed from 14 to 9 so you can have more updated price calculation
I also add the 4 levels I use for day trading; the 10, 20, 30, 40-50 are the levels I like to see the Di to break over.
A lot of traders use different levels, but these I have and found most useful. You can set alerts when any Di crosses over the 40 for true trend breakout!
Linear Regression Channel - Auto Volume BasedBased on oryginal TV indicator BUT with a little twist. ;)
I really like the regression channel - but the problem is that the length needs to be always manually adjusted.
In this script I try to solve this issue.
This is modified version on TV indicator - Linear Regression Channel.
The main difference is that now you don't get static length - it is automatically adjuested to the recent price action (determined by highest volume in last 300 bars).
MTF EMA TrendThe indicator plots directional arrows on top of the chart to visualize the market's price trend. The plots are based on candle closing below all three multitimeframe EMAs, downtrend, when the EMAs are also in order (1 below 2 and 2 below 3). Opposite situation is uptrend.
It also marks a breakdown when the price closes under the third (supposedly always the slowest) EMA outside of aforementioned downtrend situation. Opposite is true for breakup to be marked.
Please always make sure, that the three EMAs are in order of EMA 1 being the fastest and 3rd the slowest. Default settings are used on the 5 minute timeframe.
Indicator can be used to quickly check the overall trend of the market as told by three MTF EMAs without needing to clutter the chart with the actual EMA plots. This is useful, for example, if you mainly base your scalping trades on other types of indicators, but you want a quick peek of the market direction or indecision.
GMC Trend FilterAvoid Fake Signals, and identify the trend.
How it works ?
- it calculates main trend direction by using the length that is user-defined. so you can change it as you wish
- then it calculates trend direction for each 9 lower lengths. if you set the length = 20 then the lengths are 19, 18,...11
- and it checks if the trend directions that came from lower lengths is same or not with main trend direction.
- it changes the trend color of the ribbon.
Candilator RSI [AstrideUnicorn]OVERVIEW
The name Candilator comes from blending the words "candlestick" and "oscillator". And as the name suggests, this indicator is a good old RSI plotted as a candlestick chart. To produce a candlestick chart, Candilator RSI calculates four RSI's based on the open, high, low, and close time series. It also has a candlestick patterns detection feature.
HOW TO USE
You can use Candilator RSI as a normal RSI to analyze momentum, detect overbought and oversold markets, and find the oscillator's divergences with the price. You can also get creative and apply all sorts of technical analysis to the RSI candlestick chart, including candlestick patterns analysis.
Candilator RSI can automatically scan the price for some candlestick patterns in the overbought and oversold zones. This feature can help detect price reversals early.
SETTINGS
The indicator settings are divided into two groups: Main Settings and Pattern Detection. In the Main Settings, you can find standard RSI settings. In the Pattern Detection part, you can turn on and off the automatic search for a particular candlestick pattern.
Naked Bar Upward ReversalAMEX:SPY
The Naked Bar Upward Reversal is a three bar candlestick pattern with an inside candle as a entry point. This pattern is bullish since it has a candle closing red from the previous candle; the most bearish pattern possible. The following inside candle is a reversal of its previous candle with an open above the previous candle's close. Look to buy the next open above the inside candle's close.
This is a bullish reversal pattern and should be used in this context. Successful entries are found in corrections along an upward trend, or buying into a dip. Performance drops when the pattern appears at tops. To improve profitability, use a cluster of evidence to enhance the performance of this pattern. The intended time frame is within the daily and weekly.
Levels Of Greed
The Levels Of Greed indicator is based on the same idea as the Levels Of Fear one and was suggested by several traders in the comment section. It helps analyze price advances to find the best levels for closing a long position in an asset after a quick surge or longer up-trend. In finance, volatility is a term that describes the degree of variation of an asset price over time. It is usually denoted by the letter σ (sigma) and estimated as the standard deviation of the asset price or price returns. The Levels Of Greed indicator helps measure the current price advance in the standard deviation units. It plots seven levels at distances of 1, 2, 3, 4, 5, 6, and 7 standard deviations (sigmas) above the base price (the recent lowest price or lower bound of the established range). In what follows, we will refer to these levels as levels of greed.
HOW TO USE
When the price in its surge reaches a certain level of greed, it means that it has surged from its recent lowest value by a corresponding number of standard deviations. The indicator helps traders see the maximum levels to which the price may rise and estimate the potential height of the current surge. Five-seven sigma surges are relatively rare events and correspond to significant market exuberance. Careful traders and shorter-term ones would not want to participate in the bandwagon effect and herd behavior that drive market bubbles. They prefer to take their profits when the market is not exceedingly overbought.
SETTINGS
Window : the averaging window or period of the indicator. The algorithm uses this parameter to calculate the base level and standard deviations. Higher values are better for measuring deeper and longer surges.
Levels Stability : the parameter used in the up-move detection. The higher the value is, the more stable and long the greed levels are, but at the same time, the lag increases. The lower it is, the faster the indicator responds to the price changes, but the greed levels are recalculated more frequently and are less stable. This parameter is mostly for fine-tuning. It does not change the overall picture much.
Mode : the parameter that defines the style for the labels. In the Cool Guys Mode, the indicator displays the labels as emojis. In the Serious Guys Mode, labels show the distance from the base level measured in standard deviation units or sigmas.
Super Multi Trend [Salty]This script uses the 5, 8, 13, 21, 34 low, 34 close, 34 high, and 55 EMAs in comparison to each other to gauge momentum and trend strength for the current ticker. Additionally, it provides the ability to compare to 3 additional tickers at the same time (Uncheck boxes in settings to hide if desired). For the Super Trend Row darker colors are more bearish than lighter colors, and consequently lighter colors are more bullish than darker colors. Yellow indicates a neutral or choppy market. Fully stacked EMAs are shown with a Light Green (Lime) color for the bullish condition, and Dark Red for the bearish condition.
Linear Regression Relative Strength[image/x/iZvwDWEY/
Relative Strength indicator comparing the current symbol to SPY (or any other benchmark). It may help to pick the right assets to complement the portfolio build around core ETFs such as SPY.
The general idea is to show if the current symbol outperforms or underperforms the benchmark (SPY by default) when bought some certain time ago. Relative performance is displayed as percent and is calculated for three different time ranges - short (1 mo by default), mid (1 quarter), and long (half a year). To smooth the volatility, the script uses linear regression to estimate the trend and takes the start and the end points of the linear regression line to compute the relative strength.
It is important to remember that the script shows the gain relative to SPY (or other selected benchmark), not the asset's gain. Therefore, it may indicate that the asset is profitable, but it still may lose value if SPY is in downtrend.
Therefore, it is crucial to check other indicators before making a decision. In the example above, standard linear regression for one quarter is used to indicate the direction of the trend.