Trend Quality IndicatorDescription
This indicator is my interpretation in Pinescript of the "Trend-Quality Indicator" by David Sepiashvili.
The Trend Quality indicator (Q-indicator) is an attempt to estimate trend in relation to noise. It answers the long-standing question of whether a trend change qualifies as significant and promising, or insignificant and better ignored. In terms of noise, trend estimation not only determines whether the trend is reliable, but also allows you to measure its strength gradually. Thus, regardless of their prices, trends of various securities can easily be compared to each other or against any index.
The Trend Quality indicator (or Q-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 semi-cycles 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 and banded oscillator format.
Calculation and Logic
To estimate the price dynamics, the cumulative price change (CPC) indicator is used, which measures the amount that the price has changed from a fixed starting point within a given semi-cycle. 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 t0. The trend within the given semi cycle can be found by calculating the moving average of the cumulative price change:
Trend = MA (CPC, m, t => t0)
Segmenting the price time series and constructing trends within the extracted semi-cycles offers the smallest average gap between actual and averaged data points. This results in a better fit of the real price dynamics.
Estimating Trend Performance
A basic criterion for estimating trend performance is the amount the trend changes over up or down semi-cycles. If there is little or no visible progress in the trend, it may be considered as nonefficient. Further, significant changes in trend may be considered as promising trading opportunities, but the term “significant” is relative and subject to interpretation.
The Q-indicator is calculated by dividing trend by noise with an appropriate correction factor.
The denominator of the Q-indicator — noise — can be defined as the average deviation of the cumulative price change from the trend. To determine linear noise, first we calculate
the absolute value of the difference between CPC and trend, and then smooth it over the n-point period:
Noise1 = MA(I CPC Trend I,n)
High positive values suggest strong uptrend, low negative values signify strong downtrend, and values fluctuating around the zero level indicate that trend and noise are in equilibrium, i.e., non-trending conditions might be present.
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.
The Q-indicator is intended to measure trend activity. Some benchmarks can be used to determine the strength of a trend. In the range of Q-indicator values from -1 to +1, the trend is buried beneath noise. It is preferable to stay out of this zone. The greater the Q, the less the risk of trading exceeds this level (absolute value of Q>2), it can be qualified as promising.
Readings in the range from +2 to +5, or from -2 to -5, can indicate moderate trending, and readings above Q=+5 or below Q=-5 indicate strong trending. Strong upward trending often leads to the security’s overvaluing, and strong downward trending often results in the security’s undervaluing. Readings exceeding strong trending benchmarks can indicate overbought or oversold conditions and signal that price action should be monitored closely.
Input Parameters’ Description
Fast Length - the number of bars used in calculation of fast SMA of Trending Periods.
Slow Length - the number of bars used in calculation of slow SMA of Trending Periods.
Trend Length - the number of bars upon which the trend is defined.
Noise Type - defines mechanism of defining noise: linear or root mean square.
Noise Length - the number of bars upon which noise is determined.
Correction Factor - multiplier used in noise calculation.
Threshold Value - In the range of Q-indicator values from -1 to +1, the trend is buried beneath noise. It is preferable to stay out of this zone. The greater the threshold Value of Q-Indicator, the less the risk of trading exceeds this level, it can be qualified as promising. Readings in the range from +2 to +5, or from -2 to -5, can indicate moderate trending, and readings above Q=+5 or below Q=-5 indicate strong trending.
Plots
• Green = buying pressure
• Red = selling pressure
• Yellow = sideways
• ZeroLine = the zero level
In the provided script, multi-timeframe analysis is achieved using the request.security function, which retrieves data from a different timeframe than the one on which the script is running.
Explanation of Multi-Timeframe Logic in Multi-Timeframe selection
• This option retrieves the Trend Quality (TQ) from a higher timeframe if the current chart is intraday.
• The higher timeframe is specified in minutes by the user and converted to a Pine Script timeframe string.
• If the current chart is not intraday or no higher timeframe is specified, the TQ is taken from the current timeframe
Summary:
• Trend Quality Indicator measures established TREND,
• can be used on different timeframes,
• works well on different timeframes,
• the threshold of 2 to 5 should be appropriate for most instruments. It can be modified in chart settings to adapt to your strategy.
The Trend Quality Indicator doesn't predict the future. It is intended to help traders assess the strength of the current trend, giving them a better understanding of the market conditions to make more informed trading choices.
Further Reading
1. "Trend-Quality Indicator" by David Sepiashvili. Technical Analysis of Stocks & Commodities, April 2004.
在腳本中搜尋"trend"
Trend Finder {Darkoexe}This indicator displays the end and start of trends using an ATR factor.
The ATR with trend factor is used to determine the minimum length for a trend to be considered a trend.
The ATR against trend factor is used to determine the minimum length price needs to move against a trend for it to break the trend.
The ATR factors are multiplied with the ATR to determine these lengths.
The labels indicate the starts and ends of trends;
The green label indicates the start of an up trend.
The red label indicates the start of a down trend.
The black/gray label indicates the start of a trend and the end of another trend at the same location.
The purple/pink label indicates the end of a trend.
All the label colors can be changed.
IMPORTANT NOTE: This is a repainting indicator, it should only be used to back test and analyze previous trends. Do not use this indicator for live trading.
Trend and Trendline DetectorTrend and Trendline Detector
Overview
The Trend and Trendline Detector indicator provides both major and minor trend analysis using Simple Moving Averages (SMA) and automatically plots dynamic support and resistance trendlines based on pivot highs and lows.
Key Features
Major Trend Detection: Uses a configurable SMA to determine primary market direction.
Minor Trend Visualization: Optional minor SMA with color-coded line segments to mark smaller trend fluctuations.
Dynamic Pivot Trendlines: Automatically detects pivot highs/lows and draws major (solid) and minor (dashed) trendlines, with user-controlled extension modes.
Customizable Inputs: User can adjust SMA lengths, pivot look back/look forward periods, line extend mode, and toggle features on/off.
Trend Detection with AlertsPurpose of the Script
The script identifies trends on a chart (uptrend, downtrend, or sideways trend) and provides both visual cues and alerts when a trend changes. It uses two methods for trend detection:
Moving Averages (MA): It compares a short-term moving average (fast) with a long-term moving average (slow).
An uptrend occurs when the short-term MA is above the long-term MA.
A downtrend occurs when the short-term MA is below the long-term MA.
Price Action:
Higher highs (HH) indicate bullish momentum.
Lower lows (LL) indicate bearish momentum.
When these methods align, the script determines the trend and notifies the user of any trend changes.
Key Features
Moving Average Calculation:
A short-term moving average and a long-term moving average are calculated to determine the overall trend direction.
Trend Determination:
An uptrend is detected when the short-term MA is above the long-term MA and higher highs are present.
A downtrend is detected when the short-term MA is below the long-term MA and lower lows are present.
Otherwise, the trend is classified as sideways.
Alerts for Trend Changes:
Alerts are triggered when the trend changes from one state to another (e.g., sideways to uptrend).
Custom messages indicate the type of trend detected.
Background Colors:
The script changes the chart’s background color based on the current trend:
Green for uptrends.
Red for downtrends.
Gray for sideways trends.
Visualization of Moving Averages:
The moving averages are plotted on the chart for visual reference.
How It Works
Inputs for Flexibility:
The user can configure the lengths of the short-term and long-term moving averages.
A lookback period is used to determine higher highs or lower lows for additional confirmation.
Trend Logic:
The script checks the relationship between the moving averages to identify general trends.
It also evaluates price action to confirm trend strength (e.g., whether a higher high or lower low occurred).
Alert System:
When the detected trend changes (e.g., from sideways to uptrend), an alert is triggered. This ensures the user is notified of important market movements.
Dynamic Background Coloring:
The background color of the chart changes to reflect the current trend, making it easy to interpret the trend visually.
Use Cases
Trend Identification: Helps traders quickly identify market trends for decision-making.
Alerts for Trend Changes: Notifies traders when a new trend begins, ensuring they don’t miss key opportunities.
Visual Assistance: Makes it easier to interpret trends through color-coded backgrounds and moving average overlays.
Customization Options
Adjust Moving Average Lengths: Users can modify the short-term and long-term moving averages to suit their trading strategies.
Change Lookback Period: The sensitivity of higher highs and lower lows can be adjusted.
Personalized Alerts: Alerts can be customized for different trading scenarios.
Summary
This script provides an intuitive way to detect and visualize market trends while offering real-time alerts for trend changes. It’s an excellent tool for traders who want to stay informed about market conditions and make data-driven decisions.
Trend-Filter [John Ehlers]Indicator Description — Trend-Filter
This indicator uses the SuperSmoother filter, created by John Ehlers, to smooth price data and identify trends with greater accuracy and less noise. It counts the number of consecutive bars in uptrend or downtrend to measure the strength of the movement and changes the line and background colors for easy visualization.
How to use this indicator:
SuperSmoother filter: smooths the price to reveal a clearer trend direction by filtering out fast oscillations and market noise.
Bar counting: monitors sequences of bars maintaining an up or down trend to identify consistent moves.
Dynamic colors:
Green line indicates a strong uptrend.
Red line indicates a strong downtrend.
Yellow line shows a neutral or undefined trend.
Optional colored background visually reinforces trend strength with transparency so it does not interfere with price reading.
Visual signals: arrows appear on the chart to mark the start of a strong trend, helping entry or exit decisions.
Adjustable parameters:
SuperSmoother Length: controls the filter smoothing (higher = smoother, less noise).
Trend Threshold: minimum number of consecutive bars to consider a strong trend.
Smooth colors: enable or disable line color smoothing.
Show signals: toggle trend start arrows on/off.
Show dynamic background: toggle the colored background indicating trend strength.
Recommendations:
Use alongside other technical analysis tools and risk management.
Can be applied on any timeframe, but interpretation is more reliable on charts with reasonable data volume.
Ideal for traders seeking to identify consistent trends and avoid market noise.
Trend Lines [AstroHub]1. Understand the basics of technical analysis: to fully utilize this system, you need to understand the fundamentals of technical analysis, such as identifying high and low prices, trendlines, etc. This will help you effectively use indicators and make more informed trading decisions.
2. Study the internal parameters: the system has input parameters, such as "Period," etc. Study their values and understand how they impact the indicator's performance. This will allow you to customize the system to fit your needs and trading strategies.
3. Pay attention to bars of different colors: the system marks bars with different colors depending on the price's position relative to trendlines. Pay close attention to these color changes as they can serve as entry or exit signals.
4. Be ready to adapt: the market is constantly changing, and the system may not always provide accurate signals. Be prepared to adapt and make decisions based on other factors, such as trading volume, news, etc.
5. Practice on historical data: before using this system in real-time, conduct some tests on historical data. This will help you understand how the system works and what results it can produce in different market conditions.
6. Be patient: the system may not always provide instant entry or exit signals. Be patient and wait for signal confirmation before entering or closing a trade.
7. Learn and discuss: trading knowledge and the use of this system are continuous learning processes. Be open to learning new strategies and discussing your experiences with other traders. This will help you improve your skills and better utilize this system.
Supertrend - Ladder ATRThis is a supertrend with slight twisted concept which can be very benefecial in strong trending markets to reduce stop loss distance and exit slightly quicker.
⬜ Concept
▶ When the instrument is trending up, regular ATR shows high values if there are big green candles. This affect the stoploss distance in regular supertrend which leads to wide stops or delayed lagging. When you are in long trade, what matters for stoploss is how much a negative candle can move within bar. Hence, using ATR derived only based on red candles is more beneficial for trailing stops on long signals. Same applies to short trades where using ATR derived from only green candles is more efficient than overall ATR.
▶ ATR will be minimal when the volatility is less and ATR will increase with volatility. That means, once you are in trade, the trailing of stoploss also will vary based on ATR (or volatility). With regular ATR and supertrend, chances of stop loss distance widening is high with increased volatility even though stoploss levels will not move down. This again poses the risk of higher drawdown during trade closure and also keeps in the trade during ranging market. To avoid this, the second trick we are using here is only to reduce the atr stoploss difference when in trade. That is, when in long trade and negative candles ATR is increasing, we will not consider that. We will consider the new ATR only if it is lesser than previous bar ATR.
Effect of these changes on the trending market is quite visual. Lets take example of USDTRY
Settings are quite simple and does not vary much from regular supertrend settings.
Cumulative Pivot HighLowThis indicator counts number of higher highs/lows and number of lower highs/lows and calculates trend based on that.
Indicator line shows (sum of higher highs/lows - sum of lower highs/lows) derived from last loopback periods. Indicator is green if last two consecutive highs/lows formed are on higher side. Red if on lower side. (Consecutive numbers can be controlled by parameter direction_threshold )
combineHighsAndLows if unselected shows not cumulative version but last consecutive highs and lows marked in red or green according to the trend.
Trendlines - JD This script draws trendlines from the pivot points in the price chart.
The input for the function that draws the trendlines is any calculation or function (eg. pivot points),
that most of the time and occasionally produces a 'non n/a' value.
The trendline function then connects the non n/a values and axtends the connections of those points in a trendline.
There is an option to draw the lines from the wicks or from the 'real bodies' of the candles.
The trendlines can either extend infinitely or only run for an adjustable amount of bars.
JD.
Trend Structure Shift By BCB ElevateTrend Structure Shift by BCB Elevate
This indicator helps traders identify trend structure shifts by detecting Higher Highs (HH) and Lower Lows (LL) to determine bullish, bearish, or neutral market conditions. It provides real-time trend classification to help traders align with market direction.
How It Works:
📌 Bullish Trend: A new Higher High (HH) is detected, signaling potential uptrend continuation.
📌 Bearish Trend: A new Lower Low (LL) is detected, indicating potential downtrend continuation.
📌 Neutral: No significant trend shift is detected.
Key Features:
✅ Dynamic Trend Detection – Identifies key trend structure shifts using swing highs and lows.
✅ Customizable Settings – Adjust the swing length to fine-tune trend detection.
✅ Trend Table Display – Shows current trend as Bullish, Bearish, or Neutral in a convenient on-chart table.
✅ Table Position Selection – Choose where the trend table appears on the chart (Top/Bottom Left or Right).
✅ Works on All Markets & Timeframes – Use it for Crypto, Forex, Stocks, Commodities, and Indices.
How to Use:
1️⃣ Apply the indicator to your chart.
2️⃣ Observe the Trend Table to determine the market condition.
3️⃣ Use it with support/resistance, moving averages, or other indicators for better trade decisions.
Trend Signals with TP & SL [UAlgo]The "Trend Signals with TP & SL " indicator is a versatile tool designed to assist traders in identifying potential trend continuation opportunities within financial markets Utilizing a combination of technical indicators and user-defined parameters, this indicator aims to provide clear and actionable signals to aid traders in making informed trading decisions.
🔶 Features:
Trend Continuation Signals : The indicator generates signals to identify potential trend continuation points based on the input parameters such as sensitivity, ATR length, and cloud moving average length.
Take-Profit and Stop-Loss Levels: It calculates and plots three levels of take-profit (1R, 2R, 3R) and stop-loss levels based on the entry price of the trade.
Short Position Example:
Long Position Example:
Visualization: The script visualizes the trend signals, entry points, take-profit levels, and stop-loss levels on the price chart, making it easier for traders to interpret the signals.
Alert System: The indicator includes an alert system that notifies the user when there is a change in trend direction or when a buy/sell signal is generated. The alerts provide essential information such as entry price, take-profit levels, and stop-loss levels.
🔶 Calculations :
Trend Calculation: Trend signals are determined based on the comparison between the current closing price and the upper and lower bounds calculated using the Average True Range (ATR) multiplied by a sensitivity factor. A trend is considered bullish if the closing price is above the upper bound and bearish if it's below the lower bound.
Entry, Stop Loss, and Take Profit Calculation: Entry points for long and short positions are identified when there's a change in trend direction.
Stop-loss levels are calculated as a percentage of the entry price, where users can define the percentage based on their risk tolerance.
Take-profit levels are calculated as multiples of the stop-loss level (1R, 2R, 3R).
Cloud Moving Averages: Simple moving averages (SMAs) are calculated for high and low prices over a specified period to create a "cloud" visualization on the chart.
MACD Clouds: Moving Average Convergence Divergence (MACD) indicator is used to determine the market's momentum and trend direction. Positive and negative clouds are plotted based on the MACD line and its signal line, indicating potential bullish or bearish trends.
Signal Generation: Buy and sell signals are generated based on specific conditions such as RSI, CMO (Chande Momentum Oscillator), and pivot points.
Signals are triggered when certain criteria are met, indicating potential opportunities for entering or exiting trades.
🔶 Disclaimer:
Use at Your Own Risk: Trading involves significant risk, and this script is provided for educational and informational purposes only. It does not guarantee profitable trades, and users should exercise caution and perform their own analysis before making trading decisions.
Parameter Sensitivity: The effectiveness of the indicator may vary depending on the chosen parameters, market conditions, and timeframe. Users are encouraged to backtest the script thoroughly and adjust the parameters according to their trading preferences.
Not Financial Advice: The information provided by this script should not be considered as financial advice. Users are solely responsible for their trading decisions and should consult with a qualified financial advisor if needed.
Backtesting and Validation: Before implementing this indicator in live trading, users are strongly encouraged to conduct rigorous backtesting and validation to assess its performance under various market conditions. Past performance is not indicative of future results, and users should carefully evaluate the effectiveness of the indicator based on their individual trading preferences and risk tolerance.
Trend Bar Dow Theory V-1.0The indicator is designed to signal the presence of a trend bar with reduced profit-taking the following day. Below, I explain the logic that I have defined for this first version.
The guidelines I provided are as follows: We identify a trend bar, if it sets a market change, between opening and closing, equal to or greater than 50 pips . This first guideline is used to find a day with good liquidity , which usually leads to a trend bar.
If the first guideline is met, the indicator should change the bar color to white . This way, we can proceed to the second guideline, to detect the presence of reduced profit-taking.
The second guideline should indicate the presence of reduced profit-taking, as explained by Dow Theory, to find a trend context with potential to exploit. Therefore, the second guideline involves coloring the bars near the trend bars in grey, if they have a range equal to or less than 30 pips.
Dow Theory states that a market in trend measures reduced profit-taking, within 33%, up to a maximum of 50% compared to the previous trend bar, but I have not yet been able to make Pine Script calculate the percentage value. If you have any suggestions, I would be grateful.
Trend Volume Indicator by [VanHelsing]Trend Volume and Momentum based indicator
How it works:
The principle of the volume zone oscillator was used here,
but instead of closes > closes (price momentum) was used RSI,
if RSI > 50 it is a positive momentum and we get + volume value, otherwise - volume
Instead of ema's here is a Volume-Weighted Average Price (VWAP) which gives us such shape of TVI line that in general less sensitive to the pullbacks inside a trend.
This indicator is good for catching and following trends.
You can use alerts as well for take values of trend (-1,1) from 1-10D timeframes
Here how to read it
TrendsThe Trends indicator is created for trend trading and (Bitsgap) crypto bots of crypto assets over longer time periods.
Works best for 4h, Daily and Weekly candles (even Monthly), but unsuitable for hourly candles and day trading.
This indicator shows you if a crypto pair is in a Bear, Bull or Sideways market.
The idea is to simplify decision making when to sell or buy, or what pairs to use with trading bots.
Stick to the rule of not having bots in a Bear trend!
- Blue = Bull trend
- Red = Bear trend
- Green = Sideways trend - which can be profitable with trading bots
Divergence-Support/ResistenceAnother script based on zigzag, divergence, and to yield support and resistence levels.
This idea started with below two concepts:
▶ Support and resistence are simply levels where price has rejected to go further down or up. Usually, we can derive this based on pivots. But, if we start looking at every pivot, there will be many of them and may be confusing to understand which one to consider.
▶ Lot of people asked about one of my previous script on divergence detector on how to use it. I believe divergence should be considered as area of support and resistence because, they only amount to temporary weakness in momentum and nothing more. As per my understanding
Trend > Hidden Divergence > Divergence > Oscillator Levels of Overbought and Oversold
⬜ Process
▶ Now combining the above two concepts - what we are trying to do here is draw support resistence lines only on pivots which has observed either divergence or hidden divergence. Continuation and indecision pivots are ignored.
▶ Input requires only few parameters.
Zigzag lengths and oscillator to be used. Oscillator periods are automatically calculated based on zigzag length. Hence no other information required. You can also chose custom oscillator via external source.
▶ Display include horizontal lines of support/resistence which are drawn from the candle from where divergence or hidden divergence is detected.
▶ Support resistence lines are colored based on divergence. Green shades for bullish divergence and bullish hidden divergence whereas red shades for bearish divervence and bearish hidden divergence. Please note, red and green lines does not mean they only provide resistence or support. Any lines which are below the price should be treated as support and any line which are above the price should be treated as resistence.
▶ Divergence symbols are also printed on the bar from where divergence/hidden divergence is detected.
↗ - Bullish Hidden Divergence
↘ - Bearish Hidden Divergence
⤴ - Bullish Divergence
⤵ - Bearish Divergence
▶ Script also demonstrates usage of libraries effectively. I have used following libraries in this code.
import HeWhoMustNotBeNamed/ zigzag /2 as zg
import HeWhoMustNotBeNamed/enhanced_ta/8 as eta
import HeWhoMustNotBeNamed/ supertrend /4 as st
Can be good combination to use it with harmonic patterns.
Zigzag CandlesCan't deny that I am obsessed with zigzags. Been doing some crazy experiments with it and have many more in pipeline. I believe zigzag can be used to derive better trend following methods. Here is an attempt to visualize zigzag as candlesticks. Next steps probably to derive moving average, atr (although there was an attempt of AZR made earlier) and probably supertrend too ;)
Input parameters include ZigzagLength (to calculate zigzag) and CandleSize (number of zigzag pivots in each candle)
CandleSize can be 3 or more. Every time we collect pivots which are equal to CandleSize, we derive one candle. And when we derive a candle, we remove all old pivots except the last one. Becauase, the last pivot acts as open to the next bar and is required.
Body of the candle tells the start and end zigzag pivot in the range. And Wicks signify highest and lowest pivots in the range. High and Low wicks are placed at the pivot where high and lows are formed. Hence, you can see them at different positions each time.
Thanks to @RicardoSantos for suggesting boxes for candles - while I was trying to achieve this with plotbar
Trendlines StrategyUsing the clever calculations and code by BacktestRookies, here is a strategy that buys
when the price breaks above the trend line and sells (or shorts) when it crosses below.
This logic can be reversed, which seems to work better with recent market conditions.
Elliot Wave - ImpulseLets dabble a bit into Elliot Waves.
This is a simple script which tries to identify Wave 1 and 2 of Elliot Impulese Wave and then projects for Wave 3.
Ratios are taken from below link: elliottwave-forecast.com - Section 3.1 Impulse
Wave 2 is 50%, 61.8%, 76.4%, or 85.4% of wave 1 - used for identifying the pattern.
Wave 3 is 161.8%, 200%, 261.8%, or 323.6% of wave 1-2 - used for setting the targets
Important input parameters
Length : Zigzag Length. Keep the numbers low if you are looking for smaller and shorter trades. Keep the numbers high if you are looking for longer and bigger trades.
Error Percent : Adjustments for ratios as it is not always possible to find exactly equal retracement ratio.
Entry Percent : Once Wave 2 is formed, entry is set after reversing 30% of wave 2. This number can be increased or decreased. Caution: Keeping the number too low may result in false signals.
Ignore Trend Direction : If unchecked, it will only look for pattern if Wave 1 has made a higher high. If not, it will ignore Wave 1 condition and only look at wave 1 to 2 ratio.
Handle Duplicates : Since, the labels are generated upon crossover of entry price, this crossover may happen multiple times. Or sometimes wave 2 can further extend and generate new signal with same wave 1. This parameter says how to handle such cases. Keep Last is set to default and is most preferred option.
ShowRatios and ShowWaves lets you display wave line and retracement ratios for each pivots
Previous High/Low MTFIndicator to plot higher time frame previous candle highs and lows.
One of the key factor in understanding the trend is to look at higher time-frames chart.
Parameters are explained below:
resolution : Chose resolution of higher timeframe. If set to same as symbol, it will consider next parameter HTFMultiplier for calculation of higher timeframe
HTFMultiplier : Multiply symbol timeframe to by HTFMultiplier to derive higher time-frame
Offset : Number of higher timeframe candles before to be plotted. 1 means - it will show highs/lows of previous higher timeframe candle.
Trend Direction Force Index v2 - TDFI [wm]TDFI can range from -1 to 1 and thus indicate the direction of the trend.
In periods of consolidation ratios take very low values close to zero as a rule, do not exceed the value of 0.05 (and -0.05), which have set arbitrarily as horizontal signal lines. Rate accelerates rapidly to higher values when the consolidation ends and is a good chance of becoming a permanent trend.
As an extension, the trader can assume that as long as the pointer moves above the signal line and does not come down to the low value of less than 0.05 for at least two bars the trend continues. So the descent below signal line and a return to higher values should be interpreted as a temporary weakening trend. Not before rate remains below 0.05 for at least 2 bars, can we consider that the market is likely to begin to consolidate
In addition, we can assess the strength of the trend, depending on the value of the index – the index reaches 1 trend is strong (-1 is a strong downward trend) and generally values above 0.6 should be so interpreted. Less than in decline should be considered that the trend is losing its momentum.
Change Log:
* Refactored tdfi implementation. Functionally exactly the same
* Added selectable smoothers
* Added finer grained inputs fora each smoother
Trend Lines+++scripts taken from
Nothing here is mine , just put it as I like the combination of those script together when I analyse data
so it make life easy to draw line automode
I suggest 4 hours or daily chart with MACD and RSI
Thanks to autors in scripts
trend hybridThis indicator based on two part
first part is the lower of the famous Darvas top
the upper part is made from EMA trend as replacement for th ethe top of the Darvas box
By similar logic we can decide to go long or short as the Darvas box but herfe by using the Ema trend line which is MTF type we can find better optimum for shorting or longing
So it a simple indicator but can ce very usefull to see trends if properly done
Trend Setter Max BarsThis script allows you to visualize trends. It counts continuous bars in the same direction, then makes an average of the maximum count in the look back period. If Green is above Red, its strength is upward and vice versa. This doesn't use returns or measure price moves.
*Positive Gray is current up bars count. Negative Gray down current down bars count
*Green and Red are average max counts.
This info could possibly be used to gauge trends or momentum.
Note: I finally figured out how to use loops and mutable variables in V3.