Future Trend Channel [ChartPrime]The Future Trend Channel indicator is a dynamic tool for identifying trends and projecting future prices based on channel formations. The indicator uses SMA (Simple Moving Average) and volatility calculations to plot channels that visually represent trends. It also detects moments of lower momentum, indicated by neutral color changes in the channels, and projects future price levels for up to 50 bars ahead.
⯁ KEY FEATURES AND HOW TO USE
⯌ Dynamic Trend Channels :
The indicator draws channels when a trend is identified. It uses a combination of SMA and volatility to determine the direction and strength of the trend. Each channel is visualized with a specific color, where green indicates an uptrend and orange represents a downtrend.
Example of channels during uptrend and downtrend:
⯌ Momentum-Based Color Shifts :
The indicator adapts its channel colors based on momentum changes. When the starting point (Y1) of a channel is higher than its ending point (Y2) during an uptrend, the channel turns neutral, indicating lower momentum and a possible ranging market. The same applies in a downtrend, where the channel turns neutral if Y1 is lower than Y2.
Example of neutral momentum channels:
⯌ Future Price Projection :
At the end of each channel, the indicator generates a projected future price based on the midpoint of the channel. By default, this projection is made 50 bars into the future, but users can adjust the number of bars to their preference.
Example of future price projection:
⯌ Diamond Signals for Valid Trends :
Lime-colored diamonds appear when an uptrend channel is confirmed, while orange diamonds indicate valid downtrend channels. These signals confirm the presence of a strong trend and help identify valid entry and exit points. Neutral channels, which indicate lower momentum, do not show diamond signals.
Example of trend confirmation signals:
⯌ Customizable Settings :
Users can adjust the channel length (how far back the trend is analyzed) and the width (which determines the channel boundaries based on volatility). The future price projection can also be customized to forecast further or fewer bars into the future.
⯁ USER INPUTS
Trend Length : Sets the number of bars used to calculate the trend channels.
Channel Width : Adjusts the width of the channels, based on volatility (ATR multiplier).
Up and Down Colors : Allows customization of the colors used for uptrend and downtrend channels.
Future Bars : Sets the number of bars used for future price projection.
⯁ CONCLUSION
The Future Trend Channel indicator is a versatile tool for identifying and trading trends. With its ability to detect momentum shifts and project future prices, it provides traders with key insights for making more informed decisions. The use of diamond signals for trend validation adds an extra layer of confirmation, helping traders act with greater confidence during volatile or trending markets.
Forecasting
Stefan Order Block Detector 1.0Dieser Indikator ist mein erster eigene Indikator. Dieser soll die EMAs anzeigen, um beispielsweise zu sehen was wir für einen Trend haben. Außerdem ist der EMA 200 eine tatsächlich oft genutzte Unterstützung/Widerstand und kann somit auch im Trading als Bestätigung genutzt werden.
Dazu zeigt der Indikator ebenso Kauf- und Verkaufsorderblöcke an.
Crypto Swing Levels with StrategyAuthor: Ravi Kumar
Description :
AIM: This indicator helps you identify the swing level for crypto.
Background : This strategy is based on the last 5 min candle closed for the day as per Indian time standard. i.e: 23:55
Strategy 1: The code identifies the high and low of the 23:55 5-minute candle and draws 0.83% from the high and 0.83% from below to identify the first-level range.
Repeat the above steps to get further above and below ranges.
Strategy 2:
Using Strategy 1 , one can find the beautiful swing levels but when to buy and when to sell I am merging default indicators settings
1. MACD indicator
2. RSI
Buy Condition:
A long (buy) signal is generated when:
delta (MACD histogram) crosses above the threshold.
The closing price is above the longMA (indicating an uptrend).
rsi Value is below overbought Level, avoiding overbought conditions.
----------------------------------------------------------------------------------------------------
Sell Condition:
A short (sell) signal is triggered when:
delta crosses below the -threshold.
The closing price is below longMA (indicating a downtrend).
rsi Value is above oversold Level, avoiding oversold conditions.
How to use Indicator :
-----------------------------------
Step-1: Chart timeframe should be in 5 min
Step -2:Once Indicator will came you will see a message to select date and time range. Select yesterday date to forecast the levels for upcoming days.
Example : if you want to see levels for 4th nov then in setting select the date as 3rd Nov.
Step-3 : Now your levels are ready.
Note: It will help you to identify crucial levels of cryptos.
CCI Threshold StrategyThe CCI Threshold Strategy is a trading approach that utilizes the Commodity Channel Index (CCI) as a momentum indicator to identify potential buy and sell signals in financial markets. The CCI is particularly effective in detecting overbought and oversold conditions, providing traders with insights into possible price reversals. This strategy is designed for use in various financial instruments, including stocks, commodities, and forex, and aims to capitalize on price movements driven by market sentiment.
Commodity Channel Index (CCI)
The CCI was developed by Donald Lambert in the 1980s and is primarily used to measure the deviation of a security's price from its average price over a specified period.
The formula for CCI is as follows:
CCI=(TypicalPrice−SMA)×0.015MeanDeviation
CCI=MeanDeviation(TypicalPrice−SMA)×0.015
where:
Typical Price = (High + Low + Close) / 3
SMA = Simple Moving Average of the Typical Price
Mean Deviation = Average of the absolute deviations from the SMA
The CCI oscillates around a zero line, with values above +100 indicating overbought conditions and values below -100 indicating oversold conditions (Lambert, 1980).
Strategy Logic
The CCI Threshold Strategy operates on the following principles:
Input Parameters:
Lookback Period: The number of periods used to calculate the CCI. A common choice is 9, as it balances responsiveness and noise.
Buy Threshold: Typically set at -90, indicating a potential oversold condition where a price reversal is likely.
Stop Loss and Take Profit: The strategy allows for risk management through customizable stop loss and take profit points.
Entry Conditions:
A long position is initiated when the CCI falls below the buy threshold of -90, indicating potential oversold levels. This condition suggests that the asset may be undervalued and due for a price increase.
Exit Conditions:
The long position is closed when the closing price exceeds the highest price of the previous day, indicating a bullish reversal. Additionally, if the stop loss or take profit thresholds are hit, the position will be exited accordingly.
Risk Management:
The strategy incorporates optional stop loss and take profit mechanisms, which can be toggled on or off based on trader preference. This allows for flexibility in risk management, aligning with individual risk tolerances and trading styles.
Benefits of the CCI Threshold Strategy
Flexibility: The CCI Threshold Strategy can be applied across different asset classes, making it versatile for various market conditions.
Objective Signals: The use of quantitative thresholds for entry and exit reduces emotional bias in trading decisions (Tversky & Kahneman, 1974).
Enhanced Risk Management: By allowing traders to set stop loss and take profit levels, the strategy aids in preserving capital and managing risk effectively.
Limitations
Market Noise: The CCI can produce false signals, especially in highly volatile markets, leading to potential losses (Bollinger, 2001).
Lagging Indicator: As a lagging indicator, the CCI may not always capture rapid market movements, resulting in missed opportunities (Pring, 2002).
Conclusion
The CCI Threshold Strategy offers a systematic approach to trading based on well-established momentum principles. By focusing on overbought and oversold conditions, traders can make informed decisions while managing risk effectively. As with any trading strategy, it is crucial to backtest the approach and adapt it to individual trading styles and market conditions.
References
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Lambert, D. (1980). Commodity Channel Index. Technical Analysis of Stocks & Commodities, 2, 3-5.
Pring, M. J. (2002). Technical Analysis Explained. New York: McGraw-Hill.
Tversky, A., & Kahneman, D. (1974). Judgment under uncertainty: Heuristics and biases. Science, 185(4157), 1124-1131.
Global OECD CLI Diffusion Index YoY vs MoMThe Global OECD Composite Leading Indicators (CLI) Diffusion Index is used to gauge the health and directional momentum of the global economy and anticipate changes in economic conditions. It usually leads turning points in the economy by 6 - 9 months.
How to read: Above 50% signals economic expansion across the included countries. Below 50% signals economic contraction.
The diffusion index component specifically shows the proportion of countries with positive economic growth signals compared to those with negative or neutral signals.
The OECD CLI aggregates data from several leading economic indicators including order books, building permits, and consumer and business sentiment. It tracks the economic momentum and turning points in the business cycle across 38 OECD member countries and several other Non-OECD member countries.
Multi-Anchored VWAP with Projections📊 5-in-1 Anchored VWAP with Smart Projections
Harness the power of multiple Anchored VWAPs in one clean indicator! Perfect for tracking key market shifts and identifying significant price levels across different timeframes.
🔥 Key Features:
5 independent VWAP lines with custom anchor dates
Forward price projections for each VWAP (Linear or Exponential)
Individual color customization for each line
Show/hide toggles for flexible chart management
Clean, optimized code for smooth performance
💡 Use Cases:
Track multiple significant market events simultaneously
Monitor VWAPs from different timeframes in one view
Identify key support/resistance levels
Analyze price action relative to multiple anchor points
Project future price levels based on VWAP trajectories
⚙️ Full Customization:
Set specific dates and times for each VWAP
Choose between linear and exponential projections
Adjust projection length and lookback period
Customize colors for both VWAP lines and projections
Control line visibility with individual toggles
📌 Perfect For:
Day traders tracking intraday levels
Swing traders monitoring longer-term trends
Position traders analyzing major market shifts
Anyone seeking to reduce chart clutter while maintaining multiple VWAPs
🎯 Pro Tip: Use different colors for different timeframes or market events to create a clear visual hierarchy on your charts.
Enjoy the indicator! Don't forget to like and leave feedback if you find it useful!
Abz US RecessionsThis US recessions indicator combines a few different ones I've used over the years. Unfortunately many on TradingView relied on the ticker FRED for GDP data. That stopped working a few months ago. I don't know if that's temporary or permanent. Anyway once I fixed my indicator so it would start working again I realised it might help someone else and so have published this for the community.
Triple EMA Cross strategy first come backTriple EMA Cross strategy : Detecting EMA 2 and EMA 3 cross and trigger long or short label at the first price come back to EMA 3
stefan_k/v indicatorIndikator mit Kauf bzw. Verkaufssymbol.
Dieser soll Kennzeichnen wann man "theoretisch" den aktuell offenen Markt kaufen oder verkaufen soll. Allerdings sollte berücksichtigt werden, dass es nur als Hilfe für die Analyse zählen soll und es nicht zu 100% funktioniert. Danke für das Verständnis.
Yusuf - En İyi Gösterge//@version=5
indicator("Yusuf & ChatGPT - En İyi Gösterge", overlay=true)
// Parametreler
length = input.int(14, title="RSI Periyodu")
rsiOverbought = input.int(70, title="RSI Aşırı Alım", minval=1, maxval=100)
rsiOversold = input.int(30, title="RSI Aşırı Satım", minval=1, maxval=100)
bbLength = input.int(20, title="Bollinger Bands Periyodu")
bbMultiplier = input.float(2.0, title="Bollinger Bands Çarpanı")
supertrendLength = input.int(10, title="Supertrend Periyodu")
supertrendMultiplier = input.float(3.0, title="Supertrend Çarpanı")
// RSI Hesaplaması
rsiValue = ta.rsi(close, length)
// Bollinger Bands Hesaplaması
basis = ta.sma(close, bbLength)
bbUpper = basis + bbMultiplier * ta.stdev(close, bbLength)
bbLower = basis - bbMultiplier * ta.stdev(close, bbLength)
// Supertrend Hesaplaması
= ta.supertrend(supertrendMultiplier, supertrendLength)
// Al/Sat Koşulları
buySignal = (rsiValue < rsiOversold) and (close < bbLower) and (direction > 0)
sellSignal = (rsiValue > rsiOverbought) and (close > bbUpper) and (direction < 0)
// Sinyalleri Grafikte Göster
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, title="Al Sinyali", text="BUY")
plotshape(series=sellSignal, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sat Sinyali", text="SELL")
// Göstergeleri Grafikte Göster
plot(bbUpper, color=color.blue, title="Bollinger Bands Üst")
plot(bbLower, color=color.blue, title="Bollinger Bands Alt")
plot(supertrend, color=color.purple, title="Supertrend")
hline(rsiOverbought, "RSI Aşırı Alım", color=color.red)
hline(rsiOversold, "RSI Aşırı Satım", color=color.green)
Crypto Swing LevelsAuthor: Ravi Kumar
Description :
AIM: This indicator helps you identify the swing level for crypto.
Background : This strategy is based on the last 5 min candle closed for the day as per Indian time standard. i.e: 23:55
Strategy: The code identifies the high and low of the 23:55 5-minute candle and draws 0.83% from the high and 0.83% from below to identify the first-level range.
Repeat the above steps to get further above and below ranges.
How to use Indicator :
-----------------------------------
Step-1: Chart timeframe should be in 5 min
Step -2:Once Indicator will came you will see a message to select date and time range. Select yesterday date to forecast the levels for upcoming days.
Example : if you want to see levels for 4th nov then in setting select the date as 3rd Nov.
Step-3 : Now your levels are ready.
Note: It will help you to identify crucial levels of cryptos.
My strategy//@version=5
indicator("EMA Crossover Buy/Sell Signals with Sideways Market Filter (No ATR)", overlay=true)
// Input for the EMAs
fastEmaLength = input(9, title="Fast EMA Length")
slowEmaLength = input(21, title="Slow EMA Length")
longEmaLength = input(200, title="Long EMA Length (for Sideways Market Filter)")
sidewaysRange = input(0.005, title="Sideways Market Range (%)") // Price range as a percentage of the 200 EMA
// Calculate the EMAs
fastEma = ta.ema(close, fastEmaLength)
slowEma = ta.ema(close, slowEmaLength)
longEma = ta.ema(close, longEmaLength)
// Define the condition for a sideways market: Price is within a small range around the 200 EMA
sidewaysCondition = math.abs(close - longEma) < longEma * sidewaysRange
// Define the conditions for Buy and Sell signals, including the sideways market filter
buyCondition = ta.crossover(fastEma, slowEma) and not sidewaysCondition // Buy when Fast EMA crosses above Slow EMA and market is not sideways
sellCondition = ta.crossunder(fastEma, slowEma) and not sidewaysCondition // Sell when Fast EMA crosses below Slow EMA and market is not sideways
// Plot Buy and Sell signals (using small triangles)
// Buy signal - below the bar
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
// Sell signal - above the bar
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
2024 - Median High-Low % Change - Monthly, Weekly, DailyDescription:
This indicator provides a statistical overview of Bitcoin's volatility by displaying the median high-to-low percentage changes for monthly, weekly, and daily timeframes. It allows traders to visualize typical price fluctuations within each period, supporting range and volatility-based trading strategies.
How It Works:
Calculation of High-Low % Change: For each selected timeframe (monthly, weekly, and daily), the script calculates the percentage change from the high to the low price within the period.
Median Calculation: The median of these high-to-low changes is determined for each timeframe, offering a robust central measure that minimizes the impact of extreme price swings.
Table Display: At the end of the chart, the script displays a table in the top-right corner with the median values for each selected timeframe. This table is updated dynamically to show the latest data.
Usage Notes:
This script includes input options to toggle the visibility of each timeframe (monthly, weekly, and daily) in the table.
Designed to be used with Bitcoin on daily and higher timeframes for accurate statistical insights.
Ideal for traders looking to understand Bitcoin's typical volatility and adjust their strategies accordingly.
This indicator does not provide specific buy or sell signals but serves as an analytical tool for understanding volatility patterns.
Dual Momentum StrategyThis Pine Script™ strategy implements the "Dual Momentum" approach developed by Gary Antonacci, as presented in his book Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk (McGraw Hill Professional, 2014). Dual momentum investing combines relative momentum and absolute momentum to maximize returns while minimizing risk. Relative momentum involves selecting the asset with the highest recent performance between two options (a risky asset and a safe asset), while absolute momentum considers whether the chosen asset has a positive return over a specified lookback period.
In this strategy:
Risky Asset (SPY): Represents a stock index fund, typically more volatile but with higher potential returns.
Safe Asset (TLT): Represents a bond index fund, which generally has lower volatility and acts as a hedge during market downturns.
Monthly Momentum Calculation: The momentum for each asset is calculated based on its price change over the last 12 months. Only assets with a positive momentum (absolute momentum) are considered for investment.
Decision Rules:
Invest in the risky asset if its momentum is positive and greater than that of the safe asset.
If the risky asset’s momentum is negative or lower than the safe asset's, the strategy shifts the allocation to the safe asset.
Scientific Reference
Antonacci's work on dual momentum investing has shown the strategy's ability to outperform traditional buy-and-hold methods while reducing downside risk. This approach has been reviewed and discussed in both academic and investment publications, highlighting its strong risk-adjusted returns (Antonacci, 2014).
Reference: Antonacci, G. (2014). Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk. McGraw Hill Professional.
Stoch RSI and RSI Buy/Sell Signals with MACD Trend FilterDescription of the Indicator
This Pine Script is designed to provide traders with buy and sell signals based on the combination of Stochastic RSI, RSI, and MACD indicators, enhanced by the confirmation of candle colors. The primary goal is to facilitate informed trading decisions in various market conditions by utilizing different indicators and their interactions. The script allows customization of various parameters, providing flexibility for traders to adapt it to their specific trading styles.
Usefulness
This indicator is not just a mashup of existing indicators; it integrates the functionality of multiple momentum and trend-detection methods into a cohesive trading tool. The combination of Stochastic RSI, RSI, and MACD offers a well-rounded approach to analyzing market conditions, allowing traders to identify entry and exit points effectively. The inclusion of color-coded signals (strong vs. weak) further enhances its utility by providing visual cues about the strength of the signals.
How to Use This Indicator
Input Settings: Adjust the parameters for the Stochastic RSI, RSI, and MACD to fit your trading style. Set the overbought/oversold levels according to your risk tolerance.
Signal Colors:
Strong Buy Signal: Indicated by a green label and confirmed by a green candle (close > open).
Weak Buy Signal: Indicated by a blue label and confirmed by a green candle (close > open).
Strong Sell Signal: Indicated by a red label and confirmed by a red candle (close < open).
Weak Sell Signal: Indicated by an orange label and confirmed by a red candle (close < open).
Example Trading Strategy Using This Indicator
To effectively use this indicator as part of your trading strategy, follow these detailed steps:
Setup:
Timeframe : Select a timeframe that aligns with your trading style (e.g., 15-minute for intraday, 1-hour for swing trading, or daily for longer-term positions).
Indicator Settings : Customize the Stochastic RSI, RSI, and MACD parameters to suit your trading approach. Adjust overbought/oversold levels to match your risk tolerance.
Strategy:
1. Strong Buy Entry Criteria :
Wait for a strong buy signal (green label) when the RSI is at or below the oversold level (e.g., ≤ 35), indicating a deeply oversold market. Confirm that the MACD shows a decreasing trend (bearish momentum weakening) to validate a potential reversal. Ensure the current candle is green (close > open) if candle color confirmation is enabled.
Example Use : On a 1-hour chart, if the RSI drops below 35, MACD shows three consecutive bars of decreasing negative momentum, and a green candle forms, enter a buy position. This setup signals a robust entry with strong momentum backing it.
2. Weak Buy Entry Criteria :
Monitor for weak buy signals (blue label) when RSI is above the oversold level but still below the neutral (e.g., between 36 and 50). This indicates a market recovering from an oversold state but not fully reversing yet. These signals can be used for early entries with additional confirmations, such as support levels or higher timeframe trends.
Example Use : On the same 1-hour chart, if RSI is at 45, the MACD shows momentum stabilizing (not necessarily negative), and a green candle appears, consider a partial or cautious entry. Use this as an early warning for a potential bullish move, especially when higher timeframe indicators align.
3. Strong Sell Entry Criteria :
Look for a strong sell signal (red label) when RSI is at or above the overbought level (e.g., ≥ 65), signaling a strong overbought condition. The MACD should show three consecutive bars of increasing positive momentum to indicate that the bullish trend is weakening. Ensure the current candle is red (close < open) if candle color confirmation is enabled.
Example Use : If RSI reaches 70, MACD shows increasing momentum that starts to level off, and a red candle forms on a 1-hour chart, initiate a short position with a stop loss set above recent resistance. This is a high-confidence signal for potential price reversal or pullback.
4. Weak Sell Entry Criteria :
Use weak sell signals (orange label) when RSI is between the neutral and overbought levels (e.g., between 50 and 64). These can indicate potential short opportunities that might not yet be fully mature but are worth monitoring. Look for other confirmations like resistance levels or trendline touches to strengthen the signal.
Example Use : If RSI reads 60 on a 1-hour chart, and the MACD shows slight positive momentum with signs of slowing down, place a cautious sell position or scale out of existing long positions. This setup allows you to prepare for a possible downtrend.
Trade Management:
Stop Loss : For buy trades, place stop losses below recent swing lows. For sell trades, set stops above recent swing highs to manage risk effectively.
Take Profit : Target nearby resistance or support levels, apply risk-to-reward ratios (e.g., 1:2), or use trailing stops to lock in profits as price moves in your favor.
Confirmation : Align these signals with broader trends on higher timeframes. For example, if you receive a weak buy signal on a 15-minute chart, check the 1-hour or daily chart to ensure the overall trend is not bearish.
Real-World Example: Imagine trading on a 15-minute chart :
For a buy:
A strong buy signal (green) appears when the RSI dips to 32, MACD shows declining bearish momentum, and a green candle forms. Enter a buy position with a stop loss below the most recent support level.
Alternatively, a weak buy signal (blue) appears when RSI is at 47. Use this as a signal to start monitoring the market closely or enter a smaller position if other indicators (like support and volume analysis) align.
For a sell:
A strong sell signal (red) with RSI at 72 and a red candle signals to short with conviction. Place your stop loss just above the last peak.
A weak sell signal (orange) with RSI at 62 might prompt caution but can still be acted on if confirmed by declining volume or touching a resistance level.
These strategies show how to blend both strong and weak signals into your trading for more nuanced decision-making.
Technical Analysis of the Code
1. Stochastic RSI Calculation:
The script calculates the Stochastic RSI (stochRsiK) using the RSI as input and smooths it with a moving average (stochRsiD).
Code Explanation : ta.stoch(rsi, rsi, rsi, stochLength) computes the Stochastic RSI, and ta.sma(stochRsiK, stochSmoothing) applies smoothing.
2. RSI Calculation :
The RSI is computed over a user-defined period and checks for overbought or oversold conditions.
Code Explanation : rsi = ta.rsi(close, rsiLength) calculates RSI values.
3. MACD Trend Filter :
MACD is calculated with fast, slow, and signal lengths, identifying trends via three consecutive bars moving in the same direction.
Code Explanation : = ta.macd(close, macdLengthFast, macdLengthSlow, macdSignalLength) sets MACD values. Conditions like macdLine < macdLine confirm trends.
4. Buy and Sell Conditions :
The script checks Stochastic RSI, RSI, and MACD values to set buy/sell flags. Candle color filters further confirm valid entries.
Code Explanation : buyConditionMet and sellConditionMet logically check all conditions and toggles (enableStochCondition, enableRSICondition, etc.).
5. Signal Flags and Confirmation :
Flags track when conditions are met and ensure signals only appear on appropriate candle colors.
Code Explanation : Conditional blocks (if statements) update buyFlag and sellFlag.
6. Labels and Alerts :
The indicator plots "BUY" or "SELL" labels with the RSI value when signals trigger and sets alerts through alertcondition().
Code Explanation : label.new() displays the signal, color-coded for strength based on RSI.
NOTE : All strategies can be enabled or disabled in the settings, allowing traders to customize the indicator to their preferences and trading styles.
Trade 1 + StatergyThe Relative Strength Index (RSI) is a momentum oscillator used in technical analysis that measures the speed and change of price movements of a security within a range of 0 to 100. It is most commonly set to a 14-period timeframe and helps traders identify overbought or oversold conditions, suggesting potential reversal points in the market. Divergence occurs when the price trend and the RSI trend move in opposite directions. A bullish divergence signals potential upward movement when prices are making new lows while the RSI makes higher lows. Conversely, a bearish divergence suggests a possible downward trend when prices are making new highs but the RSI is making lower highs. These signals are crucial for traders looking to capture shifts in momentum and adjust their trading strategies accordingly.
use full to
5 min
10 min
15 min decition
Trend Counter [BigBeluga]The Trend Counter indicator is designed to help traders identify trend conditions and potential reversals by counting the number of bars within a specified period that are above or below an average price level. By smoothing and averaging these counts, the indicator provides a clear visual representation of market trends and highlights key trend changes.
Key Features:
⦾ Trend Counting:
Counts bars above and below average price levels over a specified period.
Smooths and rounds the count for better visualization.
// Count bars over length period above highest and lowest avg with offset loop
float mid = math.avg(ta.highest(length), ta.lowest(length))
for offset = 0 to length -1
switch
hl2 > mid => counter += 1.0
=> counter := 0.0
// Smooth Count and Round
counter := math.round(ta.ema(counter > 400 ? 400 : counter, smooth))
// Count Avg
count.push(counter)
avg = math.round(count.avg())
⦿ Color Indication:
Uses gradient colors to indicate the strength of the trend.
Colors the background based on trend strength for easier interpretation.
⦿ Trend Signals:
Provides visual cues for trend changes based on the counter crossing predefined levels.
⦿ Potential Tops:
Identifies potential market tops using a specified length and highlights these levels.
⦿ Additional Features:
Displays Trend Counter value with arrows to indicate the direction of the trend movement.
Displays average trend count and level for reference.
⦿ User Inputs Description
Length: Defines the period over which the trend counting is performed.
Trend Counter Smooth: Specifies the smoothing period for the trend counter.
Level: Sets the threshold level for trend signals.
Main Color: Determines the primary color for trend indication.
The Trend Counter indicator is a powerful tool for traders seeking to identify and visualize market trends.
By counting and smoothing price bars above and below average levels, it provides clear and intuitive signals for trend strength and potential reversals.
With customizable parameters and visual cues, the Trend Counter enhances trend analysis and decision-making for traders of all levels.
Liquidity Squeeze Indicator 1The provided Pine Script code implements a "Liquidity Squeeze Indicator" in TradingView, designed to detect potential bullish or bearish market squeezes based on EMA slopes, candle wicks, and body sizes.
Code Breakdown
EMAs Calculation: Calculates the 21-period (ema_21) and 50-period (ema_50) exponential moving averages (EMAs) on closing prices.
EMA Slope Calculation: Computes the slope of the 21-period EMA over a 21-period lookback to estimate trend direction, with a threshold of 0.45 to approximate a 45-degree angle.
Candle Properties: Measures the size of the candle's body and its upper and lower wicks for comparison to detect wick-to-body ratios.
Trend Identification: Defines a bullish trend when ema_21 is above ema_50 and a bearish trend when ema_21 is below ema_50.
Wick Conditions
Bullish Condition : In a bullish trend with the EMA slope up, checks if the upper wick is at least 3x the body size and the closing price is above the 21 EMA.
Bearish Condition: In a bearish trend with the EMA slope down, checks if the lower wick is at least 3x the body size and the closing price is below the 21 EMA.
Signal Plotting: Plots a green dot above the bar for bullish signals and a red dot below the bar for bearish signals.
Alerts: Defines alert conditions for both bullish and bearish signals, providing specific alert messages when conditions are met.
Summary
This indicator helps identify potential bullish or bearish liquidity squeezes by looking at trends, EMA slopes, and wick-to-body ratios in candlesticks. The primary signals are visualized through dots on the chart and can trigger alerts for notable market conditions.
Colored Moving Averages With RSI SignalsMoving Average (MA):
Helps to determine the overall market trend. If the price is above the MA, it may indicate an uptrend, and if below, a downtrend.
In this case, a Simple Moving Average (SMA) is used, but other types can be applied as well.
Relative Strength Index (RSI):
This is an oscillator that measures the speed and changes of price movements.
Values above 70 indicate overbought conditions (possible sell signal), while values below 30 indicate oversold conditions (possible buy signal).
Purpose of This Indicator:
Trading Signals: The indicator generates "Buy" and "Sell" signals based on the intersection of the price line and the moving average, as well as RSI values. This helps traders make more informed decisions.
Signal Filtering: Using RSI in combination with MA allows for filtering false signals since it considers not only the current trend but also the state of overbought or oversold conditions.
How to Use:
For Short-Term Trading: Traders can use buy and sell signals to enter trades based on short-term market fluctuations.
In Combination with Other Indicators: It can be combined with other indicators for a more comprehensive analysis (e.g., adding support and resistance levels).
Overall, this indicator helps traders respond more quickly and accurately to changes in market conditions, enhancing the chances of successful trades.
Basic RSI Strategy with MFI Description: This Pine Script is a custom trading strategy that combines the power of the RSI (Relative Strength Index) and MFI (Money Flow Index) indicators with additional signal filters and a user-friendly dashboard. The strategy is designed to identify potential entry and exit points based on dynamic conditions, providing an advanced approach to technical analysis and decision-making in trading.
Key Features:
RSI-Based Signals:
Generates buy signals when the RSI-based moving average crosses above specific thresholds (29 and 50).
Generates sell signals when the RSI-based moving average crosses below specific thresholds (50 and 69).
MFI Filtering:
Signals are validated only if the MFI value is within the specified range of 20 to 80, ensuring that signals are generated only when market conditions are favorable.
Dynamic Signal Thresholds:
The script includes adjustable thresholds for the percentage difference between consecutive bars, as well as the range between high and low prices, to refine signal accuracy.
Dashboard:
Displays real-time statistics in the top right corner of the chart, including the total number of signals, the count of buy and sell signals, and the time duration over which these signals were generated.
How to Use:
Settings: Customize the RSI and MFI lengths, along with thresholds for price movement and MFI range. This flexibility allows the strategy to be tailored to different market conditions and timeframes.
Dashboard Insight: Track the strategy's performance in real-time, with an intuitive overview of generated signals and their time distribution on the chart.
Ideal For:
This script is suitable for traders seeking a robust, customizable, and real-time signal generation strategy that combines momentum and volume indicators. The strategy’s unique filtering mechanism provides a higher level of precision, making it an excellent tool for those who prioritize signal accuracy and clarity.
MT Enhanced Trend Reversal StrategyThis strategy, called **"Enhanced Trend Reversal Strategy with Take Profit,"** is designed to identify trend reversal points based on several indicators: **Exponential Moving Averages (EMA), MACD**, and **RSI**. The strategy also includes **take-profit levels** to provide traders with suggested profit-taking points.
Key Components of the Strategy
1. **Exponential Moving Averages (EMA)**:
- The strategy uses **20 and 50-period EMAs** to determine trend direction. The shorter period (EMA 20) reacts more quickly to price changes, while the longer period (EMA 50) smooths out fluctuations.
- An **uptrend** (bullish market) is indicated when the EMA 20 is above the EMA 50. In this case, the main trend line is colored green.
- A **downtrend** (bearish market) is indicated when the EMA 20 is below the EMA 50, in which case the trend line is colored red.
- This visual indication simplifies analysis and allows traders to quickly assess the market condition.
2. **MACD (Moving Average Convergence Divergence)**:
- MACD is an oscillator that shows the difference between two EMAs (with periods 6 and 13) and a **signal line** with a period of 5.
- A **buy signal** is generated when the MACD line crosses above the signal line, indicating a potential bullish trend.
- A **sell signal** is generated when the MACD line crosses below the signal line, indicating a possible bearish trend.
- Shorter MACD periods make the strategy more sensitive to price changes, allowing for more frequent trading signals.
3. **RSI (Relative Strength Index)**:
- RSI measures the speed and magnitude of directional price movements to determine if an asset is overbought or oversold.
- The strategy uses a standard RSI period of 14, but with relaxed levels for more signals.
- **For buy entries**, RSI should be above 40, signaling the start of a bullish impulse without indicating overbought conditions.
- **For sell entries**, RSI should be below 60, signaling potential bearish movement without being oversold.
Entry Conditions
- **Buy Signal**:
- The MACD line crosses above the signal line.
- EMA 20 is above EMA 50 (uptrend).
- RSI is above 40, indicating a potential rise without overbought conditions.
- When these conditions are met, the strategy enters a **long position**.
- **Sell Signal**:
- The MACD line crosses below the signal line.
- EMA 20 is below EMA 50 (downtrend).
- RSI is below 60, indicating a possible decline without being oversold.
- When these conditions are met, the strategy enters a **short position**.
Take-Profit Levels
- **Take Profit** is calculated at 1.5% of the entry price:
- **For long positions**, take profit is set at a level 1.5% above the entry price.
- **For short positions**, take profit is set at a level 1.5% below the entry price.
- This take-profit level is displayed as a blue line on the chart, giving traders a clear idea of the target profit point for each trade.
Visualization and Colors
- The main trend line (EMA 20) changes to green in an uptrend and red in a downtrend. This provides a clear visual indicator of the current trend direction.
- Take-profit levels are displayed as blue lines, helping traders follow targets and lock in profits at recommended levels.
Usage Recommendations
- **Timeframe**: The strategy is optimized for a 30-minute timeframe. At this interval, signals are frequent enough without being overly sensitive to noise.
- **Applicability**: The strategy works well for assets with moderate to high volatility, such as stocks, cryptocurrencies, and currency pairs.
- **Risk Management**: In addition to take profit, a stop loss at around 1-2% is recommended to minimize losses in case of sudden trend reversals.
Conclusion
This strategy is designed for more frequent signals by using faster indicators and relaxed RSI conditions. It is suitable for traders seeking quick trade opportunities and clearly defined take-profit levels.
Fibonacci Buy /Sell SignalsHere is a Fibonacci-based Buy/Sell Indicator using retracement levels for potential support and resistance zones. This indicator plots Fibonacci levels and provides buy/sell signals based on price interaction with these levels.
Fibonacci Levels:
Highest high and lowest low over the lookback period.
Key levels: 38.2% (retracement), 50% (midpoint), 61.8% (strong retracement).
Buy Signal: When the price crosses above the 61.8% Fibonacci level (bullish).
Sell Signal: When the price crosses below the 38.2% Fibonacci level (bearish).
Range Detection [No Repaint]DETECTS RANGE EARLY
Using Confirmed Data:
All calculations now use to reference the previous completed candle
Signals are only generated based on completed candles
Range state is stored and confirmed before displaying
Key Changes to Prevent Repainting:
ATR calculations use previous candle data
Bollinger Bands calculate from previous closes
Price range checks use previous highs and lows
Range state is confirmed before displaying
How to Verify No Repainting:
Signals will only appear after a candle closes
Historical signals will remain unchanged
Alerts will only trigger on confirmed changes
This means:
The indicator will be slightly delayed (one candle)
But signals will be more reliable
Historical analysis will be accurate
Backtesting results will match real-time performance
Usage Tips with No-Repaint Version:
Wait for candle close before acting on signals
Use the confirmed range state for decision making
Consider the one-candle delay in your strategy timing
Alerts will only trigger on confirmed condition changes
Would you like me to:
Add a parameter to choose between real-time and no-repaint modes?
Add visual indicators for pending vs confirmed signals?
Modify the sensitivity of the range detection?