Trendmaster - Crypto Miner Confidence MetricWhat it is:
The Crypto Miner Confidence Metric analyses a handful of highly utilized Crypto networks to gain insight into the potential sentiment amongst those securing them and more specifically Crypto miners.
What it does:
It takes into account the overall trend in the increase or decrease of current computational power securing the networks, otherwise known as the hashrate - as well as the overall network inflows/outflows and holdings of those miners.
How to use it:
Using this data we can conclude whether their stance is currently Bullish or Bearish, with a value of 100 indicating an extremely positive future outlook from miners and a value of 0 representing a severe lack of confidence. Changes or pivots in the direction of miner confidence can indicate a shift in their Bullish or Bearish stance.
"trend" için komut dosyalarını ara
Trendmaster - Collated Funding RatesCollated Funding Rates is a Crypto Specific Indicator that pulls Exchange Funding Rate Data from several exchanges for both Bitcoin and Ethereum.
By combining both the Funding Data for Bitcoin and Ethereum across several exchanges, a Trader can see the Collated Funding Rates from several Crypto Exchanges.
What are Funding Rates?
Funding rates are periodic payments either to traders that are long or short based on the difference between perpetual contract markets and spot prices.
Therefore, depending on open positions, traders will either pay or receive funding. Crypto funding rates prevent lasting divergence in the price of both markets
These Funding Rates also incentivize Liquidity Providers to take certain positions whether Long or Short based on the Funding Rate.
What are Liquidity Providers?
A Liquidity Provider, also known as a Market Maker, is someone who provides their crypto assets to a platform to help with the decentralization of trading.
In return, they are rewarded with fees generated by trades on that platform, which can be thought of as a form of passive income.
H ow to use Collated Funding Rates:
When the Funding Rate is positive, the price of the perpetual contract is usually higher than the market price.
Thus, traders who are long pay for short positions. Conversely, a negative Funding Rate means that short positions pay for longs.
As the funding rate increases from negative to positive Traders and Liquidity Providers are incentivized to take short positions.
This can be seen on the indicator as it moves from down to up and changes from red to green.
As the funding rate decreases from positive to negative Traders and Liquidity Providers are incentivized to take long positions.
This can be seen on the indicator as it moves from up to down and changes from green to red.
Funding Rates are used by Exchanges to manipulate the price.
Because of this fact, Collated Funding Rates can show trend changes based on when a specific up or down move in Price is incentivized by Exchange Funding Rates.
Trend detection for stocksThis Pine Script indicator combines exponential moving averages (EMA) with the Average Directional Index (ADX) to identify clear upward and downward trends. The chart colors the background according to the trend and optionally displays buy and sell signals as well as alerts.
Functionality in detail:
The Fast EMA (Standard 21) reacts quickly to price changes.
The Slow EMA (Standard 55) smooths the trend more.
If the Fast EMA is above the Slow EMA and the ADX is above the defined threshold, the background turns green – indicating a clear upward trend.
Conversely, a red background signals a dominant downward trend.
Buy and sell arrows appear at the EMA crossover as soon as the ADX confirms that a trend is intact.
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.
Trendline with bands .
Introduction
A trendline indicator that plots bands around a set trendline is a technical analysis tool used in financial markets to identify potential support and resistance levels. This indicator typically consists of a central trendline, which represents the general direction of the market (uptrend, downtrend, or sideways), and two bands plotted above and below this trendline. These bands are usually set at a fixed percentage or standard deviation from the trendline, creating a channel within which the price is expected to move
The bands help traders visualize the volatility of the asset and identify overbought or oversold conditions. When the price touches or moves outside the upper band, it may indicate that the asset is overbought and could be due for a correction. Conversely, when the price touches or moves outside the lower band, it may suggest that the asset is oversold and could be poised for a rebound.
Institutions might use similar but more sophisticated methods to buy and sell in a trend.
Settings
To set up your trendline indicator, follow these steps:
Begin by selecting two points on the chart. These points will serve as your coordinates, representing both time and price.
Choose your price source, which will be used to calculate the trendline.
Finally, configure the z-scores for your bands to determine their distance from the central trendline.
Trends and Peaks [AgJ]Trends and Peaks
The Trends and Peaks indicator is designed to identify and visualize trends and key peaks in the price series. It provides three main functions:
Trends
The indicator detects the formation of trends in the price series and marks uptrend periods in green on the chart. This helps identify where the market is trending in a particular direction.
Peaks
The indicator uses a combination of custom and standard indicators to identify significant peaks in the price action. It classifies these peaks into two categories:
Parabolic Stages : Where the price exhibits accelerated, parabolic growth or decline.
Localized Stages : Where smaller, local peaks occur within a broader trend.
Slowing Trend
In parabolic stages, local peaks can serve as a signal of a slowing trend . As the price begins to plateau, the indicator helps identify areas where the trend might be losing momentum.
NOTE : The default settings are calibrated for BTC. If you're using the indicator on other assets, you may need to adjust the parameters for optimal performance.
Configuration notes
Peaks Settings
Cutoff Limits : Adjusts the width of the area where peaks are detected, allowing you to narrow or widen the peak detection range.
Peak Limits : Offers finer control over the peak detection formula, enabling more precise calibration of what is considered a "peak."
Trends Settings
Algo Parameters : Adjust the algorithm settings to fine-tune trend detection based on your preferences.
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.
TRENDSPOTTERHi Guys,
So TrendSpotter uses multiple indicators to catch trend moves as they happen. All you have to do it follow the entries when 2 green or red arrows appear, you enter the move.
Basically it has a few rules.
1.I trade the 1 min time-frame
2.The background turns Red ( Short ) or Green ( Long ) when the stock is going that direction.
3. Wait until the Psar is under for Long and over for Short.
4. Wait until the second Green for Long or Red for Short Arrow to appear. You are getting in on the end of the first one.
Here's my profile on Tradingview.com with all the explanations of how to use it. It can be used for FOREX and CRYPTO also.
www.tradingview.com
Check out my videos to see it's not that complicated.
If you have any questions please contact me.
Thanks,
Enda
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 RiderTrend Rider is an all-in-one trading tool that helps you catch reversals, confirm trends, and spot key market levels with precision. It blends EMA clouds, volume filters, Bollinger Bands, swing levels, and session ranges into one streamlined system.
What makes Trend Rider powerful
• Dual EMA Clouds – clearly show short-term vs. long-term trend direction.
• Buy/Sell Signals – triggered on EMA crossovers, confirmed by volume strength.
• BB Reversal Mode – filters trades with Bollinger volatility and proximity to band extremes.
• Swing Levels – auto-plot important Highs/Lows as dynamic support and resistance.
• Session Ranges – highlight U.S. session and weekend boxes to track liquidity and gaps.
• Timeframe Guard – optimized exclusively for the 15-minute chart for higher accuracy.
• Alerts – every signal can fire TradingView notifications on bar close for higher reliability.
Core Value
Instead of stacking multiple tools, Trend Rider merges everything into one: trend confirmation, volume analysis, volatility filters, and key levels. The result is cleaner charts, sharper signals, and faster decisions.
Сreated with vibecoding using ChatGPT and Claude.
Multi-Timeframe TrendTrend Analyze for All Timeframes and All Pairs – Indicator Description
This indicator is built to give traders a clear and comprehensive understanding of market direction across all timeframes and currency pairs. It starts with a full trend analysis that automatically scans multiple timeframes—from lower timeframes like M1 and M5 to higher ones such as H1, H4, D1, and beyond—providing a complete overview of whether the market is currently in an uptrend, downtrend, or sideways phase.
Unlike basic trend tools, this indicator intelligently detects the dominant trend using a combination of technical structures such as swing highs and lows and support & resistance zones (SNR). It gives traders a quick but in-depth snapshot of market strength and direction, helping to reduce confusion and increase confidence in decision-making.
One of the key features is its all-pairs compatibility. Whether you're trading major pairs, minor pairs, or exotic currencies, the indicator can analyze them all. There's no need to open charts one by one — this tool helps you save time by providing a consolidated trend view in a compact dashboard.
Key Features:
Multi-Timeframe Trend Scanner – Instantly analyze trends across different timeframes in one glance.
Dashboard Display – A compact panel on your chart showing trend status for each selected timeframe.
All Pair Compatibility – Works seamlessly with all forex pairs, including majors, minors, and exotics.
Adaptable to All Trading Styles – Suitable for scalping, intraday, swing, and even long-term trading.
This indicator is perfect for traders who use multi-timeframe analysis (MTFA) and want to spot high-probability entries based on confirmed trends. Whether you're a beginner looking for clarity or an experienced trader wanting to streamline your analysis, this tool is designed to help you stay one step ahead in the market
Trend Breakout Description:
This Pine Script indicator identifies pivot high and pivot low points based on user-defined left and right candle legs, detecting breakouts to signal potential trend changes. It plots horizontal lines at pivot highs (lime) and pivot lows (red), marking breakout signals with labels ("Br") when the price crosses above a pivot high or below a pivot low. The indicator also changes the background color to reflect the trend (green for uptrend, red for downtrend) with adjustable transparency. The indicator primarily focuses on recognizing specific pivot patterns to define trends and generate trading signals.
How It Works
• Pivot Detection: Identifies pivot highs and lows using configurable left (Left side Pivot Candle) and right (Right side Pivot Candle) periods.
• Pivot Highs (PH): A pivot high is identified when a candle's high is greater than a specified number of preceding candles (left leg) and succeeding candles (right leg).
• Pivot Lows (PL): Similarly, a pivot low is identified when a candle's low is less than a specified number of preceding and succeeding candles.
The script then tracks the last three pivot highs and pivot lows.
Trend Detection and Breakouts
1. High Line (Resistance): When a middle pivot high (out of the three tracked) is higher than both the previous and the next pivot high, a lime green line is drawn from that pivot high. This line acts as a dynamic resistance level.
2. Low Line (Support): Conversely, when a middle pivot low is lower than both the previous and the next pivot low, a red line is drawn from that pivot low. This line acts as a dynamic support level.
________________________________________
Trading Signals : The indicator generates signals based on price crossing these dynamically drawn lines .
• Long Signal (Uptrend):
o A "Long" signal is triggered when the close price crosses above the current high line (resistance), and the indicator is not already in an uptrend.
o When a long signal occurs, the background turns green, and the high line becomes dotted and thinner. A "Br" (Breakout) label appears below the candle.
• Short Signal (Downtrend):
o A "Short" signal is triggered when the close price crosses below the current low line (support), and the indicator is not already in a downtrend.
o When a short signal occurs, the background turns red, and the low line becomes dotted and thinner. A "Br" (Breakout) label appears above the candle.
________________________________________
Customizable Settings
The indicator provides three user-adjustable inputs:
• Right Side Pivot Candle (fpivotLeg): This setting (default 10) determines the number of candles to the right that must have lower highs/higher lows for a pivot to be confirmed.
• Left Side Pivot Candle (bpivotLeg): This setting (default 15) determines the number of candles to the left that must have lower highs/higher lows for a pivot to be confirmed.
• Adjust Color Visualization (Colortrnp): This setting (default 85) controls the transparency of the background color changes, allowing you to adjust how prominently the green (uptrend) and red (downtrend) backgrounds are displayed.
________________________________________
How to Use It
This indicator can be used by traders to:
• Identify potential reversals: The formation of new pivot highs and lows can signal shifts in market direction.
• Spot breakout opportunities: Crossing above the high line or below the low line can indicate the start of a new trend or the continuation of an existing one.
• Confirm trend strength: The presence and extension of the high and low lines can provide visual cues about the prevailing trend.
• Ideal for swing traders or trend-following strategies.
• Use the breakout labels ("Br") and background color to confirm trend direction.
• Adjust pivot leg inputs to fine-tune sensitivity for different timeframes or assets.
• Customize transparency to suit chart readability.
Example:
On a breakout above a pivot high, a green "Br" label appears, the background turns green, and the pivot line becomes dotted. This signals a potential uptrend, helping traders identify entry points or trend confirmations.
Disclaimer: No indicator guarantees profits. Always use this indicator in conjunction with other analysis methods and proper risk management.
Trend Angle Indicator [Iridio Capital]Overview
The Trend Angle Indicator provides a clear and intuitive way to visualize market trends by calculating the inclination (in degrees) of a linear regression line over a set number of bars. Instead of relying on traditional trend indicators that can be difficult to interpret, this tool offers a straightforward angular representation of price movement, making it easy to gauge the strength and direction of a trend at a glance.
How It Works
Linear regression is a statistical method used to model the relationship between variables—in this case, price movement over time. It finds the best-fit line that minimizes deviations from actual price values, allowing us to determine the trend's slope. By converting this slope into degrees, the indicator provides a natural and intuitive way to assess market conditions :
0° → Sideways market (no clear trend)
+25° to +360° → Uptrend (higher inclination means stronger trend)
-25° to -360° → Downtrend (steeper negative angles indicate a stronger decline)
Key Features & Strengths
✅ Intuitive Trend Visualization – Instead of arbitrary values, the indicator expresses the trend in degrees, making it easy to understand how steep the market is moving.
✅ Identifies Consolidation & Strong Trends – The indicator highlights periods of market consolidation (when the angle stays between the green and red horizontal lines) and strong bullish or bearish trends when breaking above or below these thresholds.
✅ Color Highlighting for Trend Strength – Areas above +25° (strong uptrend) and below -25° (strong downtrend) are shaded, allowing for instant recognition of strong moves.
✅ Works on Any Timeframe & Asset – Whether trading stocks, forex, crypto, or futures, this tool helps detect meaningful trends across different markets.
How to Use It
Look at the trend angle line:
If it stays between +25° and -25° , the market is consolidating.
If it breaks above +25° , an uptrend is strengthening.
If it drops below -25° , a strong downtrend is forming.
Use the highlighted regions to confirm strong market momentum .
Combine it with other indicators (e.g., volume, moving averages) for additional confirmation.
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.