COIN/BTC Volume-Weighted DivergenceThe COIN/BTC Volume-Weighted Divergence indicator identifies buy and sell signals by analyzing deviations between Coinbase and Bitcoin prices relative to their respective VWAPs (Volume-Weighted Average Price). This method isolates points of potential trend reversals, overextensions, or relative mispricing based on volume-adjusted price benchmarks.
The indicator leverages Coinbase’s high beta relative to Bitcoin in bull markets. A buy signal occurs when Coinbase is below VWAP (indicating undervaluation) while Bitcoin is above VWAP (signaling strong broader momentum). A sell signal is generated when Coinbase trades above VWAP (indicating overvaluation) while Bitcoin moves below VWAP (indicating weakening momentum).
This divergence logic enables traders to identify misalignment between Bitcoin-driven market trends and Coinbase’s price behavior. The indicator effectively identifies undervalued entry points and signals exits before speculative extensions are correct. It provides a systematic approach to trading during trending conditions, aligning decisions with volume-weighted price dynamics and inter-asset relationships.
How It Works
1. VWAP:
“fair value” benchmark combining price and volume.
• Above VWAP: Bullish momentum.
• Below VWAP: Bearish momentum.
2. Divergence:
• Coinbase Divergence: close - coin_vwap (distance from COIN’s VWAP).
• Bitcoin Divergence: btc_price - btc_vwap (distance from BTC’s VWAP).
3. Signals:
• Buy: Coinbase is below VWAP (potentially oversold), and Bitcoin is above VWAP (broader bullish trend).
• Sell: Coinbase is above VWAP (potentially overbought), and Bitcoin is below VWAP (broader bearish trend).
4. Visualization:
• Green triangle: Buy signal.
• Red triangle: Sell signal.
Strengths
• Combines price and volume for reliable insights.
• Highlights potential trend reversals or overextensions.
• Exploits correlations between Coinbase and Bitcoin.
Limitations
• Struggles in sideways markets.
• Sensitive to volume spikes, which may distort VWAP.
• Ineffective in strong trends where divergence persists.
Improvements
1. Z-Scores: Use statistical thresholds (e.g., ±2 std dev) for stronger signals.
2. Volume Filter: Generate signals only during high-volume periods.
3. Momentum Confirmation: Combine with RSI or MACD for better reliability.
4. Multi-Timeframe VWAP: Use intraday, daily, and weekly VWAPs for deeper analysis.
Complementary Tools
• Momentum Indicators: RSI, MACD for trend validation.
• Volume-Based Metrics: OBV, cumulative delta volume.
• Support/Resistance Levels: Enhance reversal accuracy.
Indicators and strategies
Salience Theory Crypto Returns (AiBitcoinTrend)The Salience Theory Crypto Returns Indicator is a sophisticated tool rooted in behavioral finance, designed to identify trading opportunities in the cryptocurrency market. Based on research by Bordalo et al. (2012) and extended by Cai and Zhao (2022), it leverages salience theory—the tendency of investors, particularly retail traders, to overemphasize standout returns.
In the crypto market, dominated by sentiment-driven retail investors, salience effects are amplified. Attention disproportionately focused on certain cryptocurrencies often leads to temporary price surges, followed by reversals as the market stabilizes. This indicator quantifies these effects using a relative return salience measure, enabling traders to capitalize on price reversals and trends, offering a clear edge in navigating the volatile crypto landscape.
👽 How the Indicator Works
Salience Measure Calculation :
👾 The indicator calculates how much each cryptocurrency's return deviates from the average return of all cryptos over the selected ranking period (e.g., 21 days).
👾 This deviation is the salience measure.
👾 The more a return stands out (salient outcome), the higher the salience measure.
Ranking:
👾 Cryptos are ranked in ascending order based on their salience measures.
👾 Rank 1 (lowest salience) means the crypto is closer to the average return and is more predictable.
👾 Higher ranks indicate greater deviation and unpredictability.
Color Interpretation:
👾 Green: Low salience (closer to average) – Trending or Predictable.
👾 Red/Orange: High salience (far from average) – Overpriced/Unpredictable.
👾 Text Gradient (Teal to Light Blue): Helps visualize potential opportunities for mean reversion trades (i.e., cryptos that may return to equilibrium).
👽 Core Features
Salience Measure Calculation
The indicator calculates the salience measure for each cryptocurrency by evaluating how much its return deviates from the average market return over a user-defined ranking period. This measure helps identify which assets are trending predictably and which are likely to experience a reversal.
Dynamic Ranking System
Cryptocurrencies are dynamically ranked based on their salience measures. The ranking helps differentiate between:
Low Salience Cryptos (Green): These are trending or predictable assets.
High Salience Cryptos (Red): These are overpriced or deviating significantly from the average, signaling potential reversals.
👽 Deep Dive into the Core Mathematics
Salience Theory in Action
Salience theory explains how investors, particularly in the crypto market, tend to prefer assets with standout returns (salient outcomes). This behavior often leads to overpricing of assets with high positive returns and underpricing of those with standout negative returns. The indicator captures these deviations to anticipate mean reversions or trend continuations.
Salience Measure Calculation
// Calculate the average return
avgReturn = array.avg(returns)
// Calculate salience measure for each symbol
salienceMeasures = array.new_float()
for i = 0 to array.size(returns) - 1
ret = array.get(returns, i)
salienceMeasure = math.abs(ret - avgReturn) / (math.abs(ret) + math.abs(avgReturn) + 0.1)
array.push(salienceMeasures, salienceMeasure)
Dynamic Ranking
Cryptos are ranked in ascending order based on their salience measures:
Low Ranks: Cryptos with low salience (predictable, trending).
High Ranks: Cryptos with high salience (unpredictable, likely to revert).
👽 Applications
👾 Trend Identification
Identify cryptocurrencies that are currently trending with low salience measures (green). These assets are likely to continue their current direction, making them good candidates for trend-following strategies.
👾 Mean Reversion Trading
Cryptos with high salience measures (red to light blue) may be poised for a mean reversion. These assets are likely to correct back towards the market average.
👾 Reversal Signals
Anticipate potential reversals by focusing on high-ranked cryptos (red). These assets exhibit significant deviation and are prone to price corrections.
👽 Why It Works in Crypto
The cryptocurrency market is dominated by retail investors prone to sentiment-driven behavior. This leads to exaggerated price movements, making the salience effect a powerful predictor of reversals.
👽 Indicator Settings
👾 Ranking Period : Number of bars used to calculate the average return and salience measure.
Higher Values: Smooth out short-term volatility.
Lower Values: Make the ranking more sensitive to recent price movements.
👾 Number of Quantiles : Divide ranked assets into quantile groups (e.g., quintiles).
Higher Values: More detailed segmentation (deciles, percentiles).
Lower Values: Broader grouping (quintiles, quartiles).
👾 Portfolio Percentage : Percentage of the portfolio allocated to each selected asset.
Enter a percentage (e.g., 20 for 20%), automatically converted to a decimal (e.g., 0.20).
Disclaimer: This information is for entertainment purposes only and does not constitute financial advice. Please consult with a qualified financial advisor before making any investment decisions.
Loacally Weighted MA (LWMA) Direction HistogramThe Locally Weighted Moving Average (LWMA) Direction Histogram indicator is designed to provide traders with a visual representation of the price momentum and trend direction. This Pine Script, written in version 6, calculates an LWMA by assigning higher weights to recent data points, emphasizing the most current market movements. The script incorporates user-defined input parameters, such as the LWMA length and a direction lookback period, making it flexible to adapt to various trading strategies and preferences.
The histogram visually represents the difference between the current LWMA and a previous LWMA value (based on the lookback period). Positive values are colored blue, indicating upward momentum, while negative values are yellow, signaling downward movement. Additionally, the script colors candlesticks according to the histogram's value, enhancing clarity for users analyzing market trends. The LWMA line itself is plotted on the chart but hidden by default, enabling traders to toggle its visibility as needed. This blend of histogram and candlestick visualization offers a comprehensive tool for identifying shifts in momentum and potential trading opportunities.
ATR for Aggregated Bars (2 Bars)Range Bar ATR Indicator: Detailed Description and Usage Guide
This script is a custom indicator designed specifically for Range Bar charts , tailored to help traders understand and navigate market conditions by utilizing the Average True Range (ATR) concept. The indicator adapts the traditional ATR to work effectively with Range Bar charts, where bars have a fixed range rather than being time-based.
How It Works
1. ATR Calculation on Range Bars :
- Unlike time-based charts, Range Bar charts focus on price movement within a fixed range.
- The indicator calculates ATR by pairing consecutive bars, treating every two bars as a single unit . This pairing ensures that the ATR reflects price movement effectively on Range Bar charts.
2. Short and Long Period ATR Values :
- The script displays two ATR values :
- A short-period ATR , calculated over a smaller number of paired bars.
- A long-period ATR , calculated over a larger number of paired bars.
- These values provide a dynamic view of both recent and longer-term market volatility.
Why Use This Indicator?
The primary goal is to provide a meaningful adaptation of the ATR indicator for Range Bar charts, allowing traders to make informed decisions similar to using ATR on traditional time-based charts.
Key Applications
Determine a Better Custom Range :
- Analyze the ATR values to choose an optimal range size for Range Bar charts, ensuring better alignment with market conditions.
Assess Market Volatility :
- Rising volatility : When the short-period ATR value is higher than the long-period value, it signals increasing volatility.
- Decreasing volatility : When the short-period ATR value is lower, it indicates declining volatility.
Risk and Stop Loss Management :
- Use the higher ATR value (e.g., the long-period ATR) to calculate minimum stop loss levels. Multiply the ATR by 1.5 or 2 to set a safe buffer against market fluctuations.
How to Use It
1. Add the script to a Range Bar chart.
2. Configure the short and long ATR periods to suit your trading style and preferences.
3. Observe the displayed ATR values:
- Use these values to analyze market conditions and adapt your strategy accordingly.
4. Apply insights from the ATR values for:
- Determining custom Range Bar settings.
- Evaluating volatility trends.
- Setting effective risk parameters like stop loss levels.
Benefits
- Provides a tailored ATR tool for Range Bar charts, addressing the unique challenges of fixed-range trading.
- Offers both short-term and long-term perspectives on volatility.
- Enhances decision-making for range settings, volatility analysis, and risk management.
This indicator bridges the gap between traditional ATR indicators and the specific needs of Range Bar chart users, making it a versatile tool for traders.
ka66: Candle Range MarkThis is a simple trailing stop loss tool using bar ranges, to be used with some discretion and understanding of basic price action.
Given a configurable percentage value, e.g. 25%:
A bullish bar (close > open) will be marked at the lower 25%
A bearish bar (close < open) will be marked at the upper 25%
The idea is to move your stop loss after each completed bar in the direction of the trade, at the configured percentage value.
If you have an inside bar, or something very close to it, or a doji-type bar, don't trail that, because there is no clarity of what the bar means, we can only wait.
The chart shows an example use, with trailing at 10% of the bar, from the initial stop loss after entry, trailing till we get stopped out. Some things to note:
Because this example focuses on a short trade, we ignore the bullish candles, and keep our trailing stop at the last bearish candle.
We ignore doji-esque candles and inside bars, where the body is in the range of the prior candle. Some definitions of inside bars include the wicks as well. I don't have a strong opinion, and this example is just for illustration. Furthermore, the inside bar will likely be the opposite of the swing bars (e.g. bullish bar in a range of bearish bars), so our stop remains unchanged.
One could use this semi-systematic approach in scalping on any timeframe, for example to maximise gains, adjusting the bar percentage as needed.
Zero-Lag MA CandlesThe Zero-Lag MA Candles indicator combines the efficiency of a Zero-Lag Moving Average (ZLMA) with dynamic candlestick coloring to provide a clear visual representation of market trends. By leveraging a dual EMA-based calculation, the ZLMA achieves reduced lag, enhancing its responsiveness to price changes. The indicator plots candles on the chart with colors determined by the trend direction of the ZLMA over a user-defined lookback period. Blue candles signify an uptrend, while yellow candles indicate a downtrend, offering traders an intuitive way to identify market sentiment.
This indicator is particularly useful for trend-following strategies, as the crossover and crossunder between the ZLMA and the standard EMA highlight potential reversal points or trend continuation zones. With customizable inputs for ZLMA length, trend lookback period, and color schemes, it caters to diverse trading preferences. Its ability to plot directly on the chart ensures seamless integration with other analysis tools, making it a valuable addition to a trader's toolkit.
Happy trading...
Strength of Divergence Across Multiple Indicators (+CMF&VWMACD)Modified Version of Strength of Divergence Across Multiple Indicators by reees
Purpose:
This Pine Script indicator is designed to identify and evaluate the strength of bullish and bearish divergences across multiple technical indicators. Divergences occur when the price of an asset is moving in one direction while a technical indicator is moving in the opposite direction, potentially signaling a trend reversal.
Key Features:
1. Multiple Indicator Support: The script now analyzes divergences for the following indicators:
* RSI (Relative Strength Index)
* OBV (On-Balance Volume)
* MACD (Moving Average Convergence/Divergence)
* STOCH (Stochastic Oscillator)
* CCI (Commodity Channel Index)
* MFI (Money Flow Index)
* AO (Awesome Oscillator)
* CMF (Chaikin Money Flow) - Newly added
* VWMACD (Volume-Weighted MACD) - Newly added
2. Customizable Divergence Parameters:
* Bullish/Bearish: Enable or disable the detection of bullish and bearish divergences independently.
* Regular/Hidden: Detect both regular and hidden divergences (hidden divergences can indicate trend continuation).
* Broken Trendline Exclusion: Optionally ignore divergences where the trendline connecting price pivots is broken by an intermediate pivot.
* Pivot Lookback Periods: Adjust the number of bars used to identify valid pivot highs and lows for divergence calculations.
* Weighting: Assign different weights to regular vs. hidden divergences and to the relative change in price vs. the indicator.
3. Indicator-Specific Settings:
* Weight: Each indicator can be assigned a weight, influencing its contribution to the overall divergence strength calculation.
* Extreme Value: Define a threshold above which an indicator's divergence is considered "extreme," giving it a higher strength rating.
4. Divergence Strength Calculation:
* For each indicator, the script calculates a divergence "degree" based on the magnitude of the divergence and the user-defined weightings.
* The total divergence strength is the sum of the individual indicator divergence degrees.
* Strength is categorized as "Extreme," "Very strong," "Strong," "Moderate," "Weak," or "Very weak."
5. Visualization:
* Divergence Lines: The script draws lines on the chart connecting the price and indicator pivots that form a divergence (optional, with customizable transparency).
* Labels: Labels display the total divergence strength and a breakdown of each indicator's contribution. The size and visibility of labels are based on the strength.
6. Alerts:
* The script can generate alerts when the total divergence strength exceeds a user-defined threshold.
New Indicators (CMF and VWMACD):
* Chaikin Money Flow (CMF):
* Purpose: Measures the buying and selling pressure by analyzing the relationship between price, volume, and the accumulation/distribution line.
* Divergence: A bullish CMF divergence occurs when the price makes a lower low, but the CMF makes a higher low (suggesting increasing buying pressure). A bearish divergence is the opposite.
* Volume-Weighted MACD (VWMACD):
* Purpose: Similar to the standard MACD but uses volume-weighted moving averages instead of simple moving averages, giving more weight to periods with higher volume.
* Divergence: Divergences are interpreted similarly to the standard MACD, but the VWMACD can be more sensitive to volume changes.
How It Works (Simplified):
1. Pivot Detection: The script identifies pivot highs and lows in both price and the selected indicators using the specified lookback periods.
2. Divergence Check: For each indicator:
* It checks if a series of pivots in price and the indicator are diverging (e.g., price makes a lower low, but the indicator makes a higher low for a bullish divergence).
* It calculates the divergence degree based on the difference in price and indicator values, weightings, and whether it's a regular or hidden divergence.
3. Strength Aggregation: The script sums up the divergence degrees of all enabled indicators to get the total divergence strength.
4. Visualization and Alerts: It draws lines and labels on the chart to visualize the divergences and generates alerts if the total strength exceeds the set threshold.
Benefits:
* Comprehensive Divergence Analysis: By considering multiple indicators, the script provides a more robust assessment of potential trend reversals.
* Customization: The many adjustable parameters allow traders to fine-tune the script to their specific trading style and preferences.
* Objective Strength Evaluation: The divergence strength calculation and categorization offer a more objective way to evaluate the significance of divergences.
* Early Warning System: Divergences can often precede significant price movements, making this script a valuable tool for anticipating potential trend changes.
* Volume Confirmation: The inclusion of CMF and VWMACD add volume-based confirmation to the divergence signals, potentially increasing their reliability.
Limitations:
* Lagging Indicators: Most of the indicators used are lagging, meaning they are based on past price data. Divergences may sometimes occur after a significant price move has already begun.
* False Signals: No indicator is perfect, and divergences can sometimes produce false signals, especially in choppy or ranging markets.
* Subjectivity: While the script aims for objectivity, some settings (like weightings and extreme values) still involve a degree of subjective judgment.
Intraday -RSKWhat You See:
Session Boxes:
As you observe, the larger purple box represents the Asian Session, spanning from around 22:00 to 06:00 UTC. You notice how it captures the overnight market activity.
The smaller, greyish box marks the London Session, from about 08:00 to 12:00 UTC. You can see how the price action changes during this session.
The New York Session is also indicated, with vertical lines possibly marking the open and close, helping you track movements as the U.S. markets come into play.
High and Low Levels:
Horizontal lines are drawn at the high and low of each session. You can use these as potential support or resistance levels, aiding in your decision-making process.
Vertical Lines:
These lines likely correspond to specific key times, such as session opens or closes. You can quickly identify the transition between sessions, which is crucial for your timing.
Color Coding:
Each session is color-coded, making it easier for you to distinguish between them at a glance. The purple, grey, and additional lines offer a clear visual distinction.
How You Use It:
This indicator is your go-to for understanding how different market sessions affect price action. You’ll use it to:
Recognize important price levels within each session.
Identify potential entry and exit points based on session highs and lows.
Observe how the market transitions from one session to another, giving you insight into the best times to trade.
Customization:
You have the flexibility to adjust the settings. You can change session times to suit your trading hours, modify colors to match your chart theme, and even choose which sessions to display or hide based on your focus.
This tool is designed to enhance your analysis, providing you with a structured view of market sessions. With this indicator, you’re well-equipped to navigate the global markets with greater precision and confidence.
Open-source script
SMA Ribbon [A]SMA Ribbon with Adjustable MA200
20, 50, 100, and 200 -period Simple Moving Averages (SMAs) for trend analysis.
The SMA200 dynamically changes color based on its direction—green when rising and red when falling. Additionally, you can lock the SMA200 to the daily timeframe , allowing it to display the 200-day moving average on lower timeframes, such as 4-hour or 1-hour charts.
Features:
Dynamic SMA200 Color: Automatically adjusts to show upward (green) or downward (red) trends.
Daily SMA200 Option: Enables the SMA200 to represent the 200-day moving average on intraday charts for long-term trend insights.
Smart Adaptation: The daily SMA200 setting is automatically disabled on daily or higher timeframes, ensuring accurate period calculations.
How to Use:
Use this script to identify key support/resistance levels and overall market trends.
Adjust the "Daily MA for MA200" option in the settings to toggle between timeframe-specific and daily-locked SMA200.
This script is ideal for traders seeking a clean and customizable tool for long-term and short-term trend analysis.
Algorithmic Signal AnalyzerMeet Algorithmic Signal Analyzer (ASA) v1: A revolutionary tool that ushers in a new era of clarity and precision for both short-term and long-term market analysis, elevating your strategies to the next level.
ASA is an advanced TradingView indicator designed to filter out noise and enhance signal detection using mathematical models. By processing price movements within defined standard deviation ranges, ASA produces a smoothed analysis based on a Weighted Moving Average (WMA). The Volatility Filter ensures that only relevant price data is retained, removing outliers and improving analytical accuracy.
While ASA provides significant analytical advantages, it’s essential to understand its capabilities in both short-term and long-term use cases. For short-term trading, ASA excels at capturing swift opportunities by highlighting immediate trend changes. Conversely, in long-term trading, it reveals the overall direction of market trends, enabling traders to align their strategies with prevailing conditions.
Despite these benefits, traders must remember that ASA is not designed for precise trade execution systems where accuracy in timing and price levels is critical. Its focus is on analysis rather than order management. The distinction is crucial: ASA helps interpret price action effectively but may not account for real-time market factors such as slippage or execution delays.
Features and Functionality
ASA integrates multiple tools to enhance its analytical capabilities:
Customizable Moving Averages: SMA, EMA, and WMA options allow users to tailor the indicator to their trading style.
Signal Detection: Identifies bullish and bearish trends using the Relative Exponential Moving Average (REMA) and marks potential buy/sell opportunities.
Visual Aids: Color-coded trend lines (green for upward, red for downward) simplify interpretation.
Alert System: Notifications for trend swings and reversals enable timely decision-making.
Notes on Usage
ASA’s effectiveness depends on the context in which it is applied. Traders should carefully consider the trade-offs between analysis and execution.
Results may vary depending on market conditions and chart types. Backtesting with ASA on standard charts provides more reliable insights compared to non-standard chart types.
Short-term use focuses on rapid trend recognition, while long-term application emphasizes understanding broader market movements.
Takeaways
ASA is not a tool for precise trade execution but a powerful aid for interpreting price trends.
For short-term trading, ASA identifies quick opportunities, while for long-term strategies, it highlights trend directions.
Understanding ASA’s limitations and strengths is key to maximizing its utility.
ASA is a robust solution for traders seeking to filter noise, enhance analytical clarity, and align their strategies with market movements, whether for short bursts of activity or sustained trading goals.
PheonixLegend3MAPineScript indicator called "PhoenixLegend3MA" with the following features:
Display Options:
Each MA line can be individually enabled/disabled
Customizable colors for each MA line (default: blue for M15, red for M30, green for H1)
Adjustable line width (default is 2)
MA Options:
Choice between EMA and SMA
Default length is 1440
Displays for 3 timeframes: M15, M30, and H1
Code Organization:
Uses groups to categorize input settings
Dedicated function for MA calculation
Uses request.security to fetch data from different timeframes
This indicator helps traders visualize moving averages across multiple timeframes in a single chart, making it easier to identify trends and potential trading opportunities. Perfect for technical analysis and trend following strategies.
InspireHER Dynamic EMA RR Positioning IndicatorDynamic EMA and RR Positioning Indicator
This indicator is designed to provide traders with highly customizable buy and sell signals based on EMA (Exponential Moving Average) crossovers and Risk-to-Reward (RR) ratios. It works on any timeframe and allows users to toggle price data and additional position boxes for visualizing trade setups. Additionally, traders can choose between displaying dots or labeled signals for buy/sell indicators, making this tool versatile and user-friendly for different preferences and strategies.
What Makes This Indicator Unique
Customizable Parameters: The script offers extensive options for tailoring the indicator to your preferred trading style and strategy:
EMA: Configurable through settings (default is a 21-period EMA).
Risk-to-Reward Ratio (RR): Adjustable to meet your desired RR levels (default is 1:2.5).
Lookback Period: Visualizes buy/sell signals over the last six months.
Position Boxes for Trade Visualization: The indicator can "draw" position boxes on the chart, showing potential entry points, stop-loss (SL), and take-profit (TP) levels based on the selected RR. These visual aids simplify decision-making and help evaluate trade opportunities directly on the chart.
Price Data Toggle: Traders can choose to view or hide price data related to trade signals, including TP, SL, and RR values. By default, this is turned off to maintain a clean chart but can be activated when needed.
Flexible Signal Display Options:
Dots Mode: Displays buy signals as green dots and sell signals as red dots on the chart.
Label Mode: Displays buy signals as labels with the word "Buy" in green and sell signals as labels with the word "Sell" in red.
This toggle allows traders to customize how signals are displayed for a more personalized trading experience.
Simple Signal View: A toggle option provides a cleaner chart by enabling or disabling additional visual elements like circles or labels.
How It Works
Buy Signal: Triggered when the price crosses the EMA and closes above it.
Entry: Top of the candle.
Stop-Loss: Bottom of the candle.
Take-Profit: Calculated based on the selected RR.
Sell Signal: Triggered when the price crosses the EMA and closes below it.
Entry: Bottom of the candle.
Stop-Loss: Top of the candle.
Take-Profit: Calculated based on the selected RR.
Default Settings
EMA: 21-period.
Risk-to-Reward Ratio: 1:2.5.
Price Data: Off (can be toggled on in settings).
Position Boxes: Off (can be toggled on in settings).
Signal Display: Labels mode with "Buy" (green) and "Sell" (red) enabled by default; can be toggled to Dots mode.
Timeframe: Any timeframe supported.
How to Use
Add the Indicator to Your Chart: Once applied, the EMA line and buy/sell signals will appear by default.
Customize Settings: Navigate to the indicator's settings to adjust EMA, RR, or enable/disable Price Data, Position Boxes, or switch between Dots and Label modes.
Trade with Confidence: Use the visual aids and signals to assess trade opportunities based on your strategy and timeframe.
This indicator combines the reliability of EMA-based signals with the flexibility of configurable RR, visual trade setups, and multiple signal display options, making it a powerful tool for all types of traders. Happy Trading!!
Options Cumulative Chart AnalysysThis Pine Script is a comprehensive tool designed for traders analyzing options data on TradingView. It aggregates multiple symbols to calculate and visualize cumulative performance, providing essential insights for decision-making.
Key Features:
Symbol and Strike Price Configuration:
Supports up to four configurable symbols (e.g., NIFTY options).
Allows defining buy/sell actions, quantities, and entry premiums for each symbol.
Customizable Chart Display:
Plot candlesticks and line charts for cumulative data.
Configurable Exponential Moving Averages (EMAs) for technical analysis.
Entry and price lines with customizable colors.
Timeframe Management:
Supports higher timeframe (HTF) candles.
Ensures compatibility with the current chart timeframe to maintain accuracy.
Dynamic Coloring and Visualization:
Red, green, and gray color schemes for body and wicks of candlesticks based on price movements.
Customizable positive and negative color schemes.
Table for Data Representation:
Displays an info table showing symbols, quantities, entry prices, and latest traded prices (LTP).
Adjustable table position, overlay, and styling.
Premium and Profit/Loss Calculations:
Calculates cumulative open, high, low, and close prices considering premiums and quantities.
Tracks the profit and loss dynamically based on cumulative premiums and market prices.
Alerts and Notifications:
Alerts triggered on specific conditions, such as when the profit/loss turns negative.
Modular Functions:
Functions for calculating high/low/open/close values, combining premiums, and drawing candlesticks.
Utilities for symbol management and security requests.
Custom Settings:
Includes a wide range of input options for customization:
Timeframes, EMA lengths, colors, table configurations, and more.
Error Handling:
Validates timeframe inputs to ensure compatibility and prevent runtime errors.
This script is designed for advanced traders looking for a customizable tool to analyze cumulative options data efficiently. By leveraging its modular design and visual elements, users can make informed trading decisions with a holistic view of market movements.
High/Mid/Low of the Previous Month, Week and Day + MAIntroducing the Ultimate Price Action Indicator
Take your trading to the next level with this feature-packed indicators. Designed to provide key price insights, this tool offers:
- Monthly, Weekly, and Daily Levels : Displays the High, Midpoint, and Low of the previous month, week, and day.
- Logarithmic Price Lines : Option to plot price levels logarithmically for enhanced accuracy.
- Customizable Labels : Display labels on price lines for better clarity. (This feature is optional.)
- Dual Moving Averages : Add two customizable Moving Averages (Simple, Exponential, or Weighted) directly on the price chart. (This feature is optional.)
This code combines features from the Moving Average Exponential and Daily Weekly Monthly Highs & Lows (sbtnc) indicators, with custom modifications to implement unique personal ideas.
Perfect for traders who want to combine precision with simplicity. Whether you're analyzing historical levels or integrating moving averages into your strategy, this indicator provides everything you need for informed decision-making.
To prevent change chart scale, right click on Price Scale and enable "Scale price chart only"
Candlestick Patterns with SignalsIdentified Patterns:
Bullish Engulfing: Indicates potential upward price movement, marked with green labels and lines.
Bearish Engulfing: Suggests potential downward price movement, marked with red labels and lines.
Hammer: A bullish reversal pattern, marked with blue labels.
Shooting Star: A bearish reversal pattern, marked with orange labels.
Signal Generation:
Long Signal: Triggered when a Bullish Engulfing or Hammer pattern is detected. A dotted green line marks the entry level.
Short Signal: Triggered when a Bearish Engulfing or Shooting Star pattern is detected. A dotted red line marks the entry level.
Visual Elements:
Labels indicating the candlestick pattern names appear at the relevant candles.
Lines connect the previous and current candles for engulfing patterns to highlight their range.
Dotted lines indicate potential entry levels for long or short trades.
MA Direction Histogram
The MA Direction Histogram is a simple yet powerful tool for visualizing the momentum of a moving average (MA). It highlights whether the MA is trending up or down, making it ideal for identifying market direction quickly.
Key Features:
1. Custom MA Options: Choose from SMA, EMA, WMA, VWMA, or HMA for flexible analysis.
2. Momentum Visualization: Bars show the difference between the MA and its value from a lookback period.
- Blue Bars: Upward momentum.
- Yellow Bars: Downward momentum.
3. Easy Customization: Adjust the MA length, lookback period, and data source.
How to Use:
- Confirm Trends: Positive bars indicate uptrends; negative bars suggest downtrends.
- *Spot Reversals: Look for bar color changes as potential reversal signals.
Compact, intuitive, and versatile, the "MA Direction Histogram" helps traders stay aligned with market momentum. Perfect for trend-based strategies!
[blackcat] L1 Extreme Shadows█ OVERVIEW
The Pine Script provided is an indicator designed to detect market volatility and extreme shadow conditions. It calculates various conditions based on simple moving averages (SMAs) and plots the results to help traders identify potential market extremes. The primary function of the script is to provide visual cues for extreme market conditions without generating explicit trading signals.
█ LOGICAL FRAMEWORK
Structure:
1 — Input Parameters:
• No user-defined input parameters are present in this script.
2 — Calculations:
• Calculate Extreme Shadow: Checks if the differences between certain SMAs and prices exceed predefined thresholds.
• Calculate Buy Extreme Shadow: Extends the logic by incorporating additional SMAs to identify stronger buy signals.
• Calculate Massive Bullish Sell: Detects massive bullish sell conditions using longer-term SMAs.
3 — Plotting:
• The script plots the calculated conditions using distinct colors to differentiate between various types of extreme shadows.
Data Flow:
• The close price is passed through each custom function.
• Each function computes its respective conditions based on specified SMAs and thresholds.
• The computed values are then summed and returned.
• Finally, the aggregated values are plotted on the chart using the plot function.
█ CUSTOM FUNCTIONS
1 — calculate_extreme_shadow(close)
• Purpose: Identify extreme shadow conditions based on 8-period and 14-period SMAs.
• Functionality: Computes the difference between the 8-period SMA and the close price, and the difference between the 14-period SMA and the 4-period SMA, relative to the 6-period SMA. Returns 2 if both conditions exceed 0.04; otherwise, returns 0.
• Parameters: close (price series)
• Return Value: Integer (0 or 2)
2 — calculate_buy_extreme_shadow(close)
• Purpose: Identify more robust buy signals by evaluating multiple SMAs.
• Functionality: Considers the 8-period SMA along with additional SMAs (21, 42, 63, 84, 105) and combines multiple conditions to provide a comprehensive buy signal.
• Parameters: close (price series)
• Return Value: Integer (sum of conditions, ranging from 0 to 14)
3 — calculate_massive_bullish_sell(close)
• Purpose: Detect massive bullish sell conditions using longer-term SMAs.
• Functionality: Evaluates conditions based on the 8-period SMA and longer-term SMAs (88, 44, 22, 11, 5), returning a sum of conditions meeting specified thresholds.
• Parameters: close (price series)
• Return Value: Integer (sum of conditions, ranging from 0 to 10)
█ KEY POINTS AND TECHNIQUES
• Advanced Pine Script Features:
• Multiple Nested Conditions: Uses nested conditions to assess complex market scenarios.
• Combination of Conditions: Combines multiple conditions to provide a more reliable signal.
• Optimization Techniques:
• Thresholds: Employs specific thresholds (0.04 and 0.03) to filter out noise and highlight significant market movements.
• SMA Comparisons: Compares multiple SMAs to identify trends and extreme conditions.
• Unique Approaches:
• Combining Multiple Time Frames: Incorporates multiple time frames to offer a holistic view of the market.
• Visual Distinction: Utilizes different colors and line widths to clearly differentiate between various extreme shadow conditions.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Potential Modifications:
• User-Defined Thresholds: Allow users to customize thresholds to align with personal trading strategies.
• Additional Indicators: Integrate other technical indicators like RSI or MACD to improve the detection of extreme market conditions.
• Entry and Exit Signals: Enhance the script to generate clear buy and sell signals based on identified extreme shadow conditions.
• Application Scenarios:
• Volatility Analysis: Analyze market volatility and pinpoint times of extreme price action.
• Trend Following: Pair with trend-following strategies to capitalize on significant market moves.
• Risk Management: Adjust position sizes or stop-loss levels based on detected extreme conditions.
• Related Pine Script Concepts:
• Custom Functions: Demonstrates how to create reusable functions for simplified and organized code.
• Plotting Techniques: Shows effective ways to visualize data using color and styling options.
• Multiple Time Frame Analysis: Highlights the benefits of analyzing multiple time frames for a broader market understanding.
Adaptive Price Zone Oscillator [QuantAlgo]Adaptive Price Zone Oscillator 🎯📊
The Adaptive Price Zone (APZ) Oscillator by QuantAlgo is an advanced technical indicator designed to identify market trends and reversals through adaptive price zones based on volatility-adjusted bands. This sophisticated system combines typical price analysis with dynamic volatility measurements to help traders and investors identify trend direction, potential reversals, and market volatility conditions. By evaluating both price action and volatility together, this tool enables users to make informed trading decisions while adapting to changing market conditions.
💫 Dynamic Zone Architecture
The APZ Oscillator provides a unique framework for assessing market trends through a blend of smoothed typical prices and volatility-based calculations. Unlike traditional oscillators that use fixed parameters, this system incorporates dynamic volatility measurements to adjust sensitivity automatically, helping users determine whether price movements are significant relative to current market conditions. By combining smoothed price trends with adaptive volatility zones, it evaluates both directional movement and market volatility, while the smoothing parameters ensure stable yet responsive signals. This adaptive approach allows users to identify trending conditions while remaining aware of volatility expansions and contractions, enhancing both trend-following and mean-reversion strategies.
📊 Indicator Components & Mechanics
The APZ Oscillator is composed of several technical components that create a dynamic trending system:
Typical Price: Utilizes HLC3 (High, Low, Close average) as a balanced price representation
Volatility Measurement: Computes exponential moving average of price changes to determine dynamic zones
Smoothed Calculations: Applies additional smoothing to reduce noise while maintaining responsiveness
Trend Detection: Evaluates price position relative to adaptive zones to determine market direction
📈 Key Indicators and Features
The APZ Oscillator utilizes typical price with customizable length and threshold parameters to adapt to different trading styles. Volatility calculations are applied to determine zone boundaries, providing context-aware levels for trend identification. The trend detection component evaluates price action relative to the adaptive zones, helping validate trends and identify potential reversals.
The indicator also incorporates multi-layered visualization with:
Color-coded trend representation (bullish/bearish)
Clear trend state indicators (+1/-1)
Mean reversion signals with distinct markers
Gradient fills for better visual clarity
Programmable alerts for trend changes
⚡️ Practical Applications and Examples
✅ Add the Indicator : Add the indicator to your TradingView chart by clicking on the star icon to add it to your favorites ⭐️
👀 Monitor Trend State : Watch the oscillator's position relative to the zero line to identify trend direction and potential reversals. The step-line visualization with diamonds makes trend changes clearly visible.
🎯 Track Signals : Pay attention to the mean reversion markers that appear above and below the price chart:
→ Upward triangles (⤻) signal potential bullish reversals
→ X crosses (↷) indicate potential bearish reversals
🔔 Set Alerts : Configure alerts for trend changes in both bullish and bearish directions, ensuring you can act on significant technical developments promptly.
🌟 Summary and Tips
The Adaptive Price Zone Oscillator by QuantAlgo is a versatile technical tool, designed to support both trend following and mean reversion strategies across different market environments. By combining smoothed typical price analysis with dynamic volatility-based zones, it helps traders and investors identify significant trend changes while measuring market volatility, providing reliable technical signals. The tool's adaptability through customizable length, threshold, and smoothing parameters makes it suitable for various trading timeframes and styles, allowing users to capture opportunities while maintaining awareness of changing market conditions.
Key parameters to optimize for your trading style:
APZ Length: Adjust for more or less sensitivity to price changes
Threshold: Fine-tune the volatility multiplier for wider or narrower zones
Smoothing: Balance noise reduction with signal responsiveness
Granville Entry GuideThis indicator is designed to identify trade entry points using patterns 2 and 3 of the Granville's Law. It is compatible with version 6.
Determining Entry Points
・ Long Entry : When the medium-term moving average is rising, if the stock price falls close to or below the moving average and then begins to rise, with that bar being a bullish candle, it is determined as an entry point. At this time, a red circle will be displayed above the bar.
・ Short Entry : When the medium-term moving average is falling, if the stock price rises close to or above the moving average and then begins to fall, with that bar being a bearish candle, it is determined as an entry point. At this time, a blue circle will be displayed below the bar.
Trend Filter
Entry points will only be displayed if the following trend conditions are met:
・In an uptrend, the order of moving averages should be: short-term moving average, medium-term moving average, and long-term moving average from top to bottom. In a downtrend, the order should be: long-term moving average, medium-term moving average, and short-term moving average from top to bottom. The order of the short-term moving average is flexible.
・The medium-term and long-term moving averages should be inclined in the direction of the trend. The inclination of the short-term moving average is flexible.
Adjusting Parameters
・ Stock Selection : You can choose whether to use the stock price from candlesticks or the short-term moving average for determining entry points. Selecting candlesticks allows for quicker determination but increases noise, while selecting the short-term moving average slows down determination but reduces noise. The default value is the short-term moving average.
・ Determining Pullbacks or Retracements : This is determined by the number of bars on either side of the lowest point of the pullback. Increasing the number of bars reduces noise but may result in missed opportunities. The default values are 3 bars on the left and 1 bar on the right.
・ Use of Trend Filter : You can choose whether to use the trend filter. The default setting is to use it.
・ Conditions for Moving Average Inclination : You can choose whether to include the trend direction inclination in the trend filter conditions. The default setting is to include it.
・ Bar Background Color : The trend filter is displayed with the bar's background color, but it can also be set to not display.
このインジケーターは、グランビルの法則のパターン2とパターン3を利用して、トレードのエントリーポイントを見つけるためのものです。version6に対応しています。
エントリーポイントの判定方法
ロングエントリー :中期移動平均線が上昇しているとき、株価が移動平均線の近くまで落ちるか、割り込んだ後に上昇を始め、そのバーが陽線である場合にエントリーポイントと判定します。このとき、赤い丸がバーの上に表示されます。
ショートエントリー :中期移動平均線が下落しているとき、株価が移動平均線の近くまで上昇するか、上抜けた後に下落を始め、そのバーが陰線である場合にエントリーポイントと判定します。このとき、青い丸がバーの下に表示されます。
トレンドフィルター
エントリーポイントは、次のトレンド条件を満たす場合のみ表示されます。
・上昇トレンドの場合、移動平均線が上から中期移動平均線、長期移動平均線の順になっている。下降トレンドの場合、移動平均線が上から長期移動平均線、中期移動平均線の順になっている。なお短期移動平均線の順番は任意です。
・中期移動平均線と長期移動平均線がトレンド方向に傾いている。なお短期移動平均線の傾きは任意です。
パラメーターの調整方法
・ 株価の選択 : エントリーポイントの判定に使用する株価を、ローソク足か短期移動平均線から選べます。ローソク足を選ぶと判定が早くなりますがノイズが増え、短期移動平均線を選ぶと判定が遅くなりますがノイズが減ります。初期値は短期移動平均線です。
・ 押しや戻りの判定 : 押しの最下点の左右のバーの数で判定します。バーの数を増やすとノイズが減りますが、機会を逃すこともあります。初期値は左が3、右が1です。
・ トレンドフィルターの使用 : トレンドフィルターを使うかどうかを選べます。初期値は使用する設定です。
・ 移動平均線の傾きの条件 : トレンドフィルターのうち、トレンド方向の傾きを条件に入れるかどうかを選べます。初期値は条件に入れる設定です。
バーの背景色: トレンドフィルターはバーの背景色で表示されますが、非表示に設定することもできます。
SMA Proximity Signal with Trend TableSummary of the Script:
This Pine Script is designed to provide a variety of technical analysis signals based on Simple Moving Averages (SMAs) and market trends across different timeframes. The script combines multiple indicators, such as the SMA crossover, proximity conditions, and trend analysis, along with visual markers and support/resistance lines. Below is a detailed breakdown of the key features:
The script detects crossovers between SMA1 and SMA2 and SMA1 and SMA3, marking them with green circles exactly at the crossover price level (not on the candles).
The crossover events are identified using ta.crossover and ta.crossunder functions.
Additional circles are drawn when other SMAs are in proximity (narrow stage)
Elephant Candle Pattern:
The script identifies "Elephant Candles" based on a large candle body relative to the overall size of the candle, using the condition where the candle body is at least 80% of the total candle size and at least 1.5 times the average candle size.
These candles are marked with an elephant emoji 🐘 at the top of the candle.
Trend Analysis Across Multiple Timeframes:
The script calculates the trend for different timeframes using the SMA20 of each timeframe:
5m, 15m, 1h, 4h, and 1D
It compares the current SMA20 to its previous value to determine whether the trend is Up, Down, or Flat.
Key LevelsKey Levels Indicator
In the world of trading, manually identifying and plotting key levels for every close can be a tedious and error-prone task. This indicator stands out by automatically detecting and plotting only those levels where a significant shift in market sentiment has occurred. Unlike traditional indicators that plot lines for every open or close, this tool focuses on levels where liquidity has changed hands, indicating a potential shift in momentum.
How It Works:
- The indicator identifies Higher Timeframe (HTF) reversals, plotting levels only when a bearish candle is followed by a bullish one, or vice versa.
- Weekly levels are represented by dashed lines, while monthly levels are solid, providing clear visual differentiation.
- Levels are drawn at the open price of the reversal candle, starting precisely at the beginning of the new HTF bar.
Why It's Different:
- Focuses on genuine shifts in market sentiment rather than arbitrary price points.
- Automatically manages the number of visible levels to prevent chart clutter.
- Ideal for range traders and mean reversion strategies, offering insights into potential support and resistance zones where market participants have shown a change in behavior.
Usage Note:
While this indicator provides valuable insights, it should not be used in isolation. Always consider the broader market context and combine it with other analysis techniques for optimal results.
Settings:
- Toggle weekly/monthly levels
- Adjust the number of visible levels (1-20)
- Customize level colors
Supertrend with Correct Y-axis Scaling OLEG_SLSThe functionality of the script:
1. Supertrend Calculation:
-The trend (Supertrend line) is updated dynamically:
-If the price is above the previous trend, the line follows the upper limit.
-If the price is lower, the line follows the lower boundary.
2. Calculation of the Supertrend for the higher timeframe:
-The function is used to calculate the Supertrend for the hourly, regardless of the current timeframe on the chart.
3. Buy and Sell Signals:
-Buy signal: When the price crosses the Supertrend line up and is above the Supertrend line.
-A sales signal: When the price crosses the Supertrend line down and is below the Supertrend line.
4. Display on the chart
-The Supertrend line is displayed:
-Green if the price is above the Supertrend line.
-Red if the price is below the Supertrend line.
-The Supertrend line for the hourly timeframe is displayed in blue.
5. Alerts
Two types of alerts are created:
-Buy Alert: When there is a buy signal.
-Sell Alert: When there is a sell signal.
Features and recommendations:
-Supertrend works best in trending markets. In a sideways movement, it can give false signals.
-Check the signals on multiple timeframes for confirmation.
-Add additional indicators (for example, RSI or MACD) to filter the signals.
-Test the strategy on historical data before using it in real trading.
_________________________________________________________________________________
Функционал скрипта:
1. Расчет Supertrend:
-Тренд (линия Supertrend) обновляется динамически:
-Если цена выше предыдущего тренда, линия следует за верхней границей.
-Если цена ниже, линия следует за нижней границей.
2. Расчет Supertrend для старшего таймфрейма:
-Используется функция чтобы рассчитать Supertrend для часового,независимо от текущего таймфрейма на графике.
3. Сигналы покупки и продажи:
-Сигнал покупки: Когда цена пересекает линию Supertrend вверх и находится выше линии Supertrend.
-Сигнал продажи: Когда цена пересекает линию Supertrend вниз и находится ниже линии Supertrend.
4. Отображение на графике
-Линия Supertrend отображается:
-Зеленым, если цена выше линии Supertrend.
-Красным, если цена ниже линии Supertrend.
-Линия Supertrend для часового таймфрейма отображается синим цветом.
5. Оповещения
Создаются два типа оповещений:
-Buy Alert: Когда возникает сигнал на покупку.
-Sell Alert: Когда возникает сигнал на продажу.
Особенности и рекомендации:
-Supertrend лучше всего работает в трендовых рынках. В боковом движении может давать ложные сигналы.
-Проверяйте сигналы на нескольких таймфреймах для подтверждения.
-Добавьте дополнительные индикаторы (например, RSI или MACD) для фильтрации сигналов.
-Тестируйте стратегию на исторических данных перед использованием в реальной торговле.
Coinbase Premium Index (Any Symbol)The Coinbase Premium Index provides a valuable insight into market dynamics by calculating the price premium between Coinbase (USD pairs) and Binance (USDT pairs). A positive premium typically indicates heavy buying pressure on Coinbase, often coinciding with upward price trends on lower timeframes. Conversely, a negative premium suggests selling pressure or weaker demand on Coinbase compared to Binance.
** Key Features: **
**Dynamic Symbol Detection**: Automatically detects the current chart symbol and adapts the premium calculation accordingly.
**Customizable Moving Averages**:
Select between SMA (Simple Moving Average) or EMA (Exponential Moving Average).
Adjust the moving average period to suit your trading strategy (default: SMA with 50 periods).
**Error Handling for Missing Data**:
Displays "Symbol not on Coinbase" when the cryptocurrency is unavailable on Coinbase.
Plots zero-value columns in light grey for unsupported symbols.
**Visual Representation**:
Premium values are displayed as columns: green for positive premiums, red for negative premiums.
A moving average line in light grey helps highlight trends.
Zero Line: A horizontal dashed line is included as a reference point.
** Why Use This Script?**
The Coinbase Premium Index helps traders identify moments of increased buying pressure among U.S. investors, often indicative of bullish momentum on lower timeframes. Use this tool to monitor premium dynamics and gain a clearer understanding of market sentiment across major exchanges.
** How to Use: **
Add this script to your TradingView chart.
Adjust the moving average type and period through the input menu.
Use the premium columns and moving averages to identify potential price trends and validate exchange-specific trading opportunities.