Color Code Overlay StrategyColor Code Overlay Strategy
This strategy utilizes a custom color-coded overlay to provide accurate buy and sell signals based on dynamic color changes of the candles. The indicator works by calculating a color shift between bullish (green) and bearish (red) candles, with the color change logic driven by both price movement and volatility.
How the Color Change is Calculated:
The color change is determined by comparing the closing price relative to the opening price of each candle, as is typical with a traditional bullish or bearish candle. However, to make this strategy more adaptive to market conditions, the color change is further refined by incorporating the Average True Range (ATR).
Volatility Adjusted Color Shift: The strategy calculates a dynamic threshold based on the ATR value, which represents market volatility. If the price movement between the open and close of the candle exceeds a specific percentage of the ATR, the color of the candle shifts from red (bearish) to green (bullish) or vice versa.
Threshold Calculation: A fixed percentage (e.g., 1%) of the ATR range is used to define the minimum price movement required for a color change. This ensures that only significant price movements, adjusted for volatility, trigger the color shift. The larger the ATR (higher volatility), the greater the price movement required to cause a change in color.
Bullish to Bearish (Green to Red): When the candle closes lower than the open, and the price movement exceeds the dynamic threshold based on ATR, the candle color changes from green to red, signaling a potential bearish reversal.
Bearish to Bullish (Red to Green): When the candle closes higher than the open, and the price movement exceeds the ATR-based threshold, the candle color shifts from red to green, signaling a potential bullish reversal.
Key Features:
Dynamic Color Change: The strategy identifies key color changes from bullish to bearish (green to red) and from bearish to bullish (red to green) based on specific thresholds in candle size.
Customizable Timeframe: You can specify a custom trading window to restrict the strategy’s actions to specific hours of the day.
Stop Loss and Take Profit: The strategy incorporates risk management features, allowing you to set a stop loss and take profit based on the price in pips.
Flexible Trade Types: Choose between "Both" (long and short), "Long Only," or "Short Only" trading options to suit your preferred trading style.
Visual Alerts: Receive visual alerts with arrows when color changes occur, signaling potential trade opportunities. Green arrows indicate a bullish shift, while red arrows show a bearish shift.
This strategy is ideal for traders who prefer a color-coded overlay to easily visualize price action and make informed decisions based on bullish or bearish trends. Whether you’re looking for quick, short-term opportunities or analyzing market reversals, this strategy offers an intuitive approach to identifying trade signals.
Wskaźniki i strategie
Vertical Lines at Specific Times### **Script Description**
This **Pine Script v6** indicator for **TradingView** plots **vertical dotted lines** at user-specified times, marking key time ranges during the day. It is designed to help traders visually track market movements within specific timeframes.
#### **Features:**
✔ **Custom Timeframes:**
- Two separate time ranges can be defined:
- **Morning Session:** (Default: 9 AM - 10 AM, New York Time)
- **Evening Session:** (Default: 9 PM - 10 PM, New York Time)
✔ **Adjustable Line Properties:**
- **Line Width:** Users can change the thickness of the vertical lines.
- **Line Colors:** Users can select different colors for morning and evening session lines.
✔ **New York Local Time Support:**
- Ensures that the vertical lines appear correctly based on **Eastern Time (ET)**.
✔ **Full-Height Vertical Lines:**
- Lines extend across the **entire chart**, from the highest high to the lowest low, for clear visibility.
- Uses **dotted line style** to avoid cluttering the chart.
#### **How It Works:**
1. The script retrieves the **current date** (year, month, day) in **New York time**.
2. Converts the **user-defined input times** into **timestamps** for accurate placement.
3. When the current time matches a specified session time, a **dotted vertical line** is drawn.
4. The script **repeats this process daily**, ensuring automatic updates.
#### **Customization Options (Inputs):**
- **Morning Start & End Time** (Default: 9 AM - 10 AM)
- **Evening Start & End Time** (Default: 9 PM - 10 PM)
- **Line Width** (Default: 2)
- **Morning Line Color** (Default: Blue)
- **Evening Line Color** (Default: Green)
#### **Use Case Scenarios:**
📈 Marking market **open & close** hours.
📊 Highlighting **key trading sessions** for day traders.
🔎 Identifying time-based **price action patterns**.
Stacked Bullish vs Bearish VolumeThis indicator visually represents buying (bullish) and selling (bearish) pressure within each candle by stacking both portions inside a single volume bar. Unlike traditional volume indicators that use only one color per bar, this script splits each volume bar into two segments:
Green portion (Bullish Volume) → Represents the buying pressure when the price moves up.
Red portion (Bearish Volume) → Represents the selling pressure when the price moves down.
By stacking buy and sell volume inside the same column, traders can easily assess the balance of buying vs selling activity within each trading session.
Stacking the Bars:
The bullish portion (green) is plotted first.
The bearish portion (red) is plotted slightly offset to create a stacked effect.
Percentage Based ZigZag█ OVERVIEW
The Percentage-Based ZigZag indicator is a custom technical analysis tool designed to highlight significant price reversals while filtering out market noise. Unlike many standard zigzag tools that rely solely on fixed price moves or generic trend-following methods, this indicator uses a configurable percentage threshold to dynamically determine meaningful pivot points. This approach not only adapts to different market conditions but also helps traders distinguish between minor fluctuations and truly significant trend shifts—whether scalping on shorter timeframes or analyzing longer-term trends.
█ KEY FEATURES & ORIGINALITY
Dynamic Pivot Detection
The indicator identifies pivot points by measuring the percentage change from the previous extreme (high or low). Only when this change exceeds a user-defined threshold is a new pivot recognized. This method ensures that only substantial moves are considered, making the indicator robust in volatile or noisy markets.
Enhanced ZigZag Visualization
By connecting significant highs and lows with a continuous line, the indicator creates a clear visual map of price swings. Each pivot point is labelled with the corresponding price and the percentage change from the previous pivot, providing immediate quantitative insight into the magnitude of the move.
Trend Reversal Projections
In addition to marking completed reversals, the script computes and displays potential future reversal points based on the current trend’s momentum. This forecasting element gives traders an advanced look at possible turning points, which can be particularly useful for short-term scalping strategies.
Customizable Visual Settings
Users can tailor the appearance by:
• Setting the percentage threshold to control sensitivity.
• Customizing colors for bullish (e.g., green) and bearish (e.g., red) reversals.
• Enabling optional background color changes that visually indicate the prevailing trend.
█ UNDERLYING METHODOLOGY & CALCULATIONS
Percentage-Based Filtering
The script continuously monitors price action and calculates the relative percentage change from the last identified pivot. A new pivot is confirmed only when the price moves a preset percentage away from this pivot, ensuring that minor fluctuations do not trigger false signals.
Pivot Point Logic
The indicator tracks the highest high and the lowest low since the last pivot. When the price reverses by the required percentage from these extremes, the algorithm:
1 — Labels the point as a significant high or low.
2 — Draws a connecting line from the previous pivot to the current one.
3 — Resets the extreme-tracking for detecting the next move.
Real-Time Reversal Estimation
Building on traditional zigzag methods, the script incorporates a projection calculation. By analyzing the current trend’s strength and recent percentage moves, it estimates where a future reversal might occur, offering traders actionable foresight.
█ HOW TO USE THE INDICATOR
1 — Apply the Indicator
• Add the Percentage-Based ZigZag indicator to your trading chart.
2 — Adjust Settings for Your Market
• Percentage Move – Set a threshold that matches your trading style:
- Lower values for sensitive, high-frequency analysis (ideal for scalping).
- Higher values for filtering out noise on longer timeframes.
• Visual Customization – Choose your preferred colors for bullish and bearish signals and enable background color changes for visual trend cues.
• Reversal Projection – Enable or disable the projection feature to display potential upcoming reversal points.
3 — Interpret the Signals
• ZigZag Lines – White lines trace significant high-to-low or low-to-high movements, visually connecting key swing points.
• Pivot Labels – Each pivot is annotated with the exact price level and percentage change, providing quantitative insight into market momentum.
• Trend Projections – When enabled, projected reversal levels offer insight into where the current trend might change.
4 — Integrate with Your Trading Strategy
• Use the indicator to identify support and resistance zones derived from significant pivots.
• Combine the quantitative data (percentage changes) with your risk management strategy to set optimal stop-loss and take-profit levels.
• Experiment with different threshold settings to adapt the indicator for various instruments or market conditions.
█ CONCLUSION
The Percentage-Based ZigZag indicator goes beyond traditional trend-following tools by filtering out market noise and providing clear, quantifiable insights into price action. With its percentage threshold for pivot detection and real-time reversal projections, this original methodology and customizable feature set offer traders a versatile edge for making informed trading decisions.
Anchor Buy Sell LevelsDaily Validity:
The indicator generates a single horizontal line (either a Buy Level or a Sell Level) that remains valid throughout the entire trading day.
Source of the Signal:
The level (buy or sell) is determined using candles that were generated before the day in question.
Selection Logic:
When determining the level, the indicator checks past candles in descending order (from the most recent backward).
The very first candle encountered that meets the respective logic (either the buy or sell condition) sets the level.
Buy and Sell Logic:
Buy Signal: Generated when a candle’s close is lower than both the previous candle’s close and the next candle’s close (i.e., a local minimum). The Buy Level is drawn at the low of that qualifying candle.
Sell Signal: Generated when a candle’s close is higher than both the previous candle’s close and the next candle’s close (i.e., a local maximum). The Sell Level is drawn at the high of that qualifying candle.
One Signal per Day:
For any given day, the indicator will display either a Buy Level or a Sell Level—not both. The decision is based on which qualifying candle (and its corresponding condition) is found first when scanning the historical data in descending order.
Global Liquidity Indicator in USDThis indicator aggregates the total central bank balance sheets and M2 money supply for the USA, Canada, China, European Union, Japan, and the UK, converting all values to USD and normalizing them to trillions for easy visualization. It plots three lines: Total Balance Sheet, Total M2, and Combined Total, providing a comprehensive view of global liquidity trends.
Key Features:
Dynamic Coloring: Customize line colors based on direction—green for upward trends, red for downward (or any colors you choose), with independent on/off toggles for each line.
Real-Time Currency Conversion: Uses live forex rates (e.g., USD/CNY, USD/EUR) for accurate USD conversions.
alert_formatLibrary "alert_format"
library to call alert with parameters specified
alert_format(message, param_names, param_values, params_format, freq)
alert with named parameters message
Parameters:
message (string) : message header that prefixes named parameters
param_names (array) : names for parameters specified in param_values
param_values (array) : values for parameters specified in param_names
params_format (string) : format for all param values, 2 decimals by default
freq (string) : Determines the allowed frequency of the alert trigger (see alert). alert.freq_once_per_bar_close by default
Marubozu and Strong Candle DetectorMarubozu and Strong Candle Detector - Indicator Description
This TradingView Pine Script indicator identifies powerful price action signals by detecting two key candle types that can signal strong market momentum:
What It Detects
1. Marubozu Candles: These are candles with little to no wicks, where the body makes up almost the entire candle. Marubozu means "bald head" or "shaved head" in Japanese, referring to the absence of shadows (wicks).
o Bullish Marubozu: A green/up candle with minimal wicks, showing buyers controlled the entire session
o Bearish Marubozu: A red/down candle with minimal wicks, showing sellers dominated the session
2. Strong Candles: These are candles that are significantly larger than the recent average, suggesting exceptional momentum.
o Strong Bullish: Large green/up candles showing powerful buying pressure
o Strong Bearish: Large red/down candles showing powerful selling pressure
Trading Significance
• Bullish Marubozu/Strong Bullish Candles: Often signal the beginning of bullish trends or strong continuation of existing uptrends. These can be excellent entry points for long positions.
• Bearish Marubozu/Strong Bearish Candles: Often indicate the start of bearish trends or powerful continuation of existing downtrends. These can be good entry points for short positions or exit points for long positions.
Key Features
• Customizable Parameters: Adjust sensitivity for body ratio threshold and size comparison
• Visual Indicators: Easy-to-spot markers appear on your charts
• Information Display: Shows key metrics about the current candle
• Alert System: Set notifications for when significant candles form
How To Use This Indicator
1. For Entry Signals:
o Look for bullish Marubozu/strong bullish candles at support levels or after pullbacks
o Look for bearish Marubozu/strong bearish candles at resistance levels or after rallies
2. For Exit Signals:
o Consider taking profits on long positions when bearish Marubozu/strong bearish candles appear
o Consider taking profits on short positions when bullish Marubozu/strong bullish candles appear
3. For Trend Confirmation:
o Multiple signals in the same direction strengthen the case for a trend
This indicator works best on larger timeframes (1H, 4H, Daily) where candle formations have more significance, but can be applied to any timeframe based on your trading style.
Price Alert Indicator with TableIndicator Description: Price Alert Indicator with Table
The Custom Price Alert Indicator with Table is a TradingView script designed to help traders monitor and react to significant price levels during the Asian and London trading sessions. This indicator provides visual alerts and displays relevant session data in a user-friendly table format.
Key Features:
User-Defined Session Times:
Users can specify the start and end hours for both the Asian (default: 8 AM to 2 PM) and London (default: 2 PM to 8 PM) trading sessions in their local time zone.
This flexibility allows traders from different regions to customize the indicator according to their trading hours.
Real-Time Highs and Lows:
The indicator calculates and tracks the high and low prices for the Asian and London sessions in real-time.
It continuously updates these values as new price data comes in.
Touch Notification Logic:
Alerts are triggered when the price touches the session high or low points.
Notifications are designed to avoid repetition; if the London session touches the Asian high or low, subsequent touches are not alerted until the next trading day.
Interactive Table Display:
A table is presented in the bottom right corner of the chart, showing:
The Asian low and high prices
The London low and high prices
Whether each price level has been touched.
Touched levels are visually highlighted in green, making it easy for traders to identify relevant price actions.
Daily Reset of Notifications:
The notification statuses are reset at the end of the London session each day, preparing for the next day’s trading activity.
Use Cases:
Traders can utilize this indicator to stay informed about pivotal price levels during important trading sessions, aiding in decision-making and strategy development.
The clear visual representation of price levels and touch statuses helps traders quickly assess market conditions.
This indicator is particularly beneficial for day traders and those who focus on price movements around key high and low points during the trading day.
Bitcoin Total VolumeThis Pine Script indicator, titled "Bitcoin Top 16 Volume," is designed to provide traders with an aggregate view of Bitcoin (BTC) spot trading volume across leading cryptocurrency exchanges. Unlike traditional volume indicators that focus on a single exchange, this tool compiles data from a selection of the top exchanges as ranked by CoinMarketCap, offering a broader perspective on overall market activity.
The indicator works by fetching real-time volume data for specific BTC trading pairs on various exchanges. It currently incorporates data from prominent platforms such as Binance (BTCUSDT), Coinbase (BTCUSD), OKX (BTCUSDT), Bybit (BTCUSDT), Kraken (BTCUSD), Bitfinex (BTCUSD), Bitstamp (BTCUSD), Gemini (BTCUSD), Upbit (BTCKRW), Bithumb (BTCKRW), KuCoin (BTCUSDT), Gate.io (BTCUSDT), MEXC (BTCUSDT), Crypto.com (BTCUSD), Poloniex (BTCUSDT), and BitMart (BTCUSDT). It's important to note that while the indicator aims to represent the "Top 16" exchanges, the actual number included may vary due to data availability within TradingView and the dynamic nature of exchange rankings.
The script then calculates the total volume by summing up the volume data retrieved from each of these exchanges. This aggregated volume is visually represented as a histogram directly on your TradingView chart, displayed in white by default. By observing the height of the histogram bars, traders can quickly assess the total trading volume for Bitcoin spot markets over different time periods, corresponding to the chart's timeframe.
This indicator is valuable for traders seeking to understand the overall market depth and liquidity of Bitcoin. Increased total volume can often signal heightened market interest and potential trend strength or reversals. Conversely, low volume might suggest consolidation or reduced market participation. Traders can use this indicator to confirm trends, identify potential breakouts, and gauge the general level of activity in the Bitcoin spot market across major exchanges. Keep in mind that the list of exchanges included may need periodic updates to accurately reflect the top exchanges as rankings on CoinMarketCap evolve.
Custom Buy and Sell Signal with Body Ratio and RSI
Indicator Overview:
Name: Custom Buy and Sell Signal with Body Ratio and RSI
Description: This indicator is designed to detect buy and sell opportunities by analyzing the body size and wicks of candles in combination with the RSI indicator and volume. It helps identify trend reversals under high-volume market conditions, which enhances the reliability of the signals.
Indicator Features:
RSI (Relative Strength Index): The RSI indicator is used to assess oversold (RSI < 40) or overbought (RSI > 60) conditions. These zones signal potential reversals when combined with other technical signals.
Candle Body Analysis:
The indicator compares the size of the current and previous candles to validate signals.
For a buy signal, the current candle must be bullish and have a body size proportional to that of the previous bearish candle.
Similarly, for a sell signal, the current candle must be bearish with a body size comparable to the previous bullish candle.
Wick Validation:
The indicator analyzes the wick length to reinforce or exclude signals.
For a buy signal, the lower wick of the bullish candle must be shorter than that of the previous bearish candle.
For a sell signal, the upper wick of the bearish candle must be shorter than that of the previous bullish candle and smaller than 30% of the candle's body.
High Volume:
Signals are only generated when the volume exceeds a certain threshold, ensuring that signals are issued in active market conditions.
The minimum volume should be adjusted based on the asset. For example, for gold, a minimum volume of 9000 is recommended.
Trading Strategy:
Buy Signals:
A bearish (red) candle is followed by a bullish (green) candle with a body size that is comparable to the previous candle (0.9 to 3 times the body size).
The lower wick of the bullish candle is shorter than that of the previous bearish candle, confirming the validity of the signal.
The RSI must be below 40, indicating an oversold condition.
The volume must exceed the defined threshold (e.g., > 9000 for gold) to confirm an active market.
Sell Signals:
A bullish (green) candle is followed by a bearish (red) candle with a comparable body size.
The upper wick of the bearish candle must be shorter than that of the previous bullish candle and must not exceed 30% of the body size.
The RSI must be above 60, indicating an overbought condition.
The volume must also exceed the minimum threshold for a valid signal.
Usage Guidelines:
Volume Adjustment: It is crucial to adjust the volume threshold depending on the asset you're trading. For example, for assets like gold, a minimum volume of 9000 is recommended to filter out weak signals. Each asset has a different volume dynamic, so test different thresholds on historical data to find the optimal setting.
Time Frame:
It is recommended to use this indicator on a 1-hour (1H) chart for the best signal relevance. This time frame provides a good balance between reactivity and filtering false signals.
Confluence:
Combine the signals from this indicator with other tools like support and resistance levels, moving averages, or chart patterns to increase your chances of success. Confluence of indicators improves the reliability of signals.
Risk Management:
Implement strict risk management. Use stop-losses based on volatility, such as ATR (Average True Range), or the wick size to determine exit points.
Backtesting:
Before using it live, conduct backtesting on various assets to fine-tune the parameters, especially the volume threshold, and to verify performance across different market conditions.
This indicator is an excellent tool for traders looking to identify trend reversals based on solid technical criteria such as RSI, candle structure, and volume. It is particularly effective on volatile assets with precise volume adjustment.
Multi-Ticker RS vs SPYThis Pine Script, titled "Multi-Ticker RS vs SPY," is a clean and efficient indicator designed for TradingView, enabling traders to monitor the relative strength (RS) of up to 10 ticker symbols compared to the S&P 500 ETF (SPY) on a single chart. Ideal for options traders, such as those managing a $1,400 account, it provides a simple way to assess which stocks are outperforming or underperforming the broader market. As of February 26, 2025, the script supports any chart timeframe, such as 5-minute or daily intervals, and calculates RS based on a user-defined lookback period, defaulting to 1 bar for real-time insights.
Users can input ticker symbols via customizable settings, with defaults set to popular stocks like AAPL, TSLA, NVDA, GOOGL, AMZN, MSFT, FB, NFLX, INTC, and PYPL. The script fetches closing prices for each ticker and SPY, computes their percentage changes over the lookback period, and determines RS as the ratio of each ticker’s change to SPY’s change, handling division by zero gracefully. It displays each ticker’s current RS score in a vertical column of labels on the chart’s top-left corner, updated on the last bar to avoid clutter. Users can adjust label size (tiny, small, normal, large) and text color for visibility, ensuring a tailored, error-free experience for quick market analysis.
Mile Runner - Swing Trade LONGMile Runner - Swing Trade LONG Indicator - By @jerolourenco
Overview
The Mile Runner - Swing Trade LONG indicator is designed for swing traders who focus on LONG positions in stocks, BDRs (Brazilian Depositary Receipts), and ETFs. It provides clear entry signals, stop loss, and take profit levels, helping traders identify optimal buying opportunities with a robust set of technical filters. The indicator is optimized for daily candlestick charts and combines multiple technical analysis tools to ensure high-probability trades.
Key Features
Entry Signals: Visualized as green triangles below the price bars, indicating a potential LONG entry.
Stop Loss and Take Profit Levels: Automatically plotted on the chart for easy reference.
Stop Loss: Based on the most recent pivot low (support level).
Take Profit: Calculated using a Fibonacci-based projection from the entry price to the stop loss.
Trend and Momentum Filters: Ensures trades align with the prevailing trend and have sufficient momentum.
Volume and Volatility Confirmation: Verifies market interest and price movement potential.
How It Works
The indicator uses a combination of technical tools to filter and confirm trade setups:
Exponential Moving Averages (EMAs):
A short EMA (default: 9 periods) and a long EMA (default: 21 periods) identify the trend.
A bullish crossover (EMA9 crosses above EMA21) signals a potential upward trend.
Money Flow Index (MFI):
Confirms buying pressure when MFI > 50.
Average True Range (ATR):
Ensures sufficient volatility by checking if ATR exceeds its 20-period moving average.
Volume:
Confirms market interest when volume exceeds its 20-period moving average.
Pivot Lows:
Identifies recent support levels (pivot lows) to set the stop loss.
Ensures the pivot low is recent (within the last 10 bars by default).
Additional Trend Filter:
Confirms the long EMA is rising, reinforcing the bullish trend.
Inputs and Customization
The indicator is highly customizable, allowing traders to tailor it to their strategies:
EMA Periods: Adjust the short and long EMA lengths.
ATR and MFI Periods: Modify lookback periods for volatility and momentum.
Pivot Lookback: Control the sensitivity of pivot low detection.
Fibonacci Level: Adjust the Fibonacci retracement level for take profit.
Take Profit Multiplier: Fine-tune the aggressiveness of the take profit target.
Max Pivot Age: Set the maximum bars since the last pivot low for relevance.
Usage Instructions
Apply the Indicator:
Add the "Mile Runner - Swing Trade LONG" indicator to your TradingView chart.
Best used on daily charts for swing trading.
Look for Entry Signals:
A green triangle below the price bar signals a potential LONG entry.
Set Stop Loss and Take Profit:
Stop Loss: Red dashed line indicating the stop loss level.
Take Profit: Purple dashed line showing the take profit level.
Monitor the Trade:
The entry price is marked with a green dashed line for reference.
Adjust trade management based on the plotted levels.
Set Alerts:
Use the built-in alert condition to get notified of new LONG entry signals.
Important Notes
For LONG Positions Only : Designed exclusively for swing trading LONG positions.
Timeframe: Optimized for daily charts but can be tested on other timeframes.
Asset Types: Works best with stocks, BDRs, and ETFs.
Risk Management: Always align stop loss and take profit levels with your risk tolerance.
Why Use Mile Runner?
The Mile Runner indicator simplifies swing trading by integrating trend, momentum, volume, and volatility filters into one user-friendly tool. It helps traders:
Identify high-probability entry points.
Establish clear stop loss and take profit levels.
Avoid low-volatility or low-volume markets.
Focus on assets with strong buying pressure and recent support.
By following its signals and levels, traders can make informed decisions and enhance their swing trading performance. Customize the inputs and test it on your favorite assets—happy trading!
Bitcoin Market Dominance with Moving AveragesBitcoin Market Dominance with Moving Averages
This Pine Script indicator tracks Bitcoin market dominance by calculating the percentage of Bitcoin's market capitalization relative to the total cryptocurrency market cap.
Features:
✅ Real-time BTC Dominance Calculation: Displays the percentage of Bitcoin’s market share.
✅ Moving Averages: Includes two customizable moving averages for trend analysis.
✅ Visual Alerts: Background colors indicate different dominance levels:
Green: BTC dominance is above 50% (strong BTC market control).
Red: BTC dominance is below 40% (altcoins gaining strength).
Orange: BTC dominance is between 40%-50% (neutral zone).
This tool helps traders analyze Bitcoin’s influence on the crypto market and identify key dominance trends.
Cometreon_Public📚 Cometreon Public Library – Advanced Functions for Pine Script
This library contains advanced functions used in my public indicators on TradingView. The goal is to make the code more modular and efficient, allowing users to call pre-built functions for complex calculations without rewriting them from scratch.
🔹 Currently Available Functions:
1️⃣ Moving Average Function – Provides multiple types of moving averages to choose from, including:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
RMA (Smoothed Moving Average)
HMA (Hull Moving Average)
JMA (Jurik Moving Average)
DEMA (Double Exponential Moving Average)
TEMA (Triple Exponential Moving Average)
LSMA (Least Squares Moving Average)
VWMA (Volume-Weighted Moving Average)
SMMA (Smoothed Moving Average)
KAMA (Kaufman’s Adaptive Moving Average)
ALMA (Arnaud Legoux Moving Average)
FRAMA (Fractal Adaptive Moving Average)
VIDYA (Variable Index Dynamic Average)
2️⃣ Custom RSI – Uses the Moving Average function to modify the calculation method, with an additional option for a dynamic version.
3️⃣ Custom MACD – Uses the Moving Average function to modify the calculation method, with an additional option for a dynamic version.
4️⃣ Custom Alligator – Uses the Moving Average function to modify generic calculations, allowing users to change the calculation method.
Crypto Fear & Greed Score [Underblock]Crypto Fear & Greed Score - Methodology & Functioning
Introduction
The Crypto Fear & Greed Score is a comprehensive indicator designed to assess market sentiment by detecting extreme conditions of panic (fear) and euphoria (greed). By combining multiple technical factors, it helps traders identify potential buying and selling opportunities based on the emotional state of the market.
This indicator is highly customizable, allowing users to adjust weight parameters for RSI, volatility, Bitcoin dominance, and trading volume, making it adaptable to different market conditions.
Key Components
The indicator consists of two primary sub-scores:
Fear Score (Panic) - Measures the intensity of fear in the market.
Greed Score (Euphoria) - Measures the level of overconfidence and excessive optimism.
The difference between these two values results in the Net Score, which indicates the dominant market sentiment at any given time.
1. Relative Strength Index (RSI)
The indicator utilizes multiple RSI timeframes to measure momentum and overbought/oversold conditions:
RSI 1D (Daily) - Captures medium-term sentiment shifts.
RSI 4H (4-hour) - Identifies short-term market movements.
RSI 1W (Weekly) - Helps detect long-term overbought/oversold conditions.
2. Volatility Analysis
High volatility is often associated with fear and panic-driven selling.
Low volatility in bullish markets may indicate complacency and overconfidence.
3. Bitcoin Dominance (BTC.D)
Bitcoin dominance provides insights into capital flow between Bitcoin and altcoins:
Rising BTC dominance suggests fear as investors move into BTC for safety.
Declining BTC dominance indicates increased risk appetite and potential market euphoria.
4. Buying and Selling Volume
The indicator analyzes both buying and selling volume, ensuring a clearer confirmation of market sentiment.
High buying volume in uptrends reinforces bullish momentum.
Spikes in selling volume indicate panic and possible market bottoms.
Calculation Methodology
The indicator allows users to adjust weight parameters for each component, making it adaptable to different trading strategies. The formulas are structured as follows:
Fear Score (Panic Calculation)
Fear Score = (1 - RSI_1D) * W_RSI1D + (1 - RSI_4H) * W_RSI4H + (1 - Dominance) * W_Dominance + Volatility * W_Volatility + Sell Volume * W_SellVolume
Greed Score (Euphoria Calculation)
Greed Score = RSI_1D * W_RSI1D + RSI_4H * W_RSI4H + Dominance * W_Dominance + (1 - Volatility) * W_Volatility + Buy Volume * W_BuyVolume
Net Fear & Greed Score
Net Score = (Greed Score - Fear Score) * 100
Interpretation:
Above 70: Extreme greed -> possible overbought conditions.
Below -70: Extreme fear -> potential buying opportunity.
Near 0: Neutral market sentiment.
Trend Reversal Detection
The indicator includes two moving averages for enhanced trend detection:
Short-term SMA (50-periods) - Reacts quicklier to changes in sentiment.
Long-term SMA (200-periods) - Captures broader trend reversals.
How Crossovers Work:
Short SMA crossing above Long SMA -> Potential bullish reversal.
Short SMA crossing below Long SMA -> Possible bearish trend shift.
Alerts for SMA crossovers help traders act on momentum shifts in real-time.
Customization and Visualization
The Net Score dynamically changes color: green for greed, red for fear.
Users can adjust weightings directly from settings, avoiding manual script modifications.
Reference levels at 70 and -70 provide clarity on extreme market conditions.
Conclusion
The Crypto Fear & Greed Score provides a powerful and objective measure of market sentiment, helping traders navigate extreme conditions effectively.
🟢 If the Net Score is below -70, panic may present a buying opportunity.
🔴 If the Net Score is above 70, excessive euphoria may indicate a selling opportunity.
⚖️ Neutral values suggest a balanced market sentiment.
By customizing weight parameters and utilizing trend reversal alerts, traders can gain a deeper insight into market psychology and make more informed trading decisions. 🚀
Breakout and Retest Signals [AlgoAlpha]OVERVIEW
This script detects breakout and retest signals by identifying key pivot points in price action and analyzing their relationship with historical swing highs and lows. It highlights breakout structures using ATR-based tolerance levels and volume analysis to confirm potential trend continuations or reversals. The script marks significant price levels with dynamic boxes and dashed lines to help traders visualize breakout and retest areas effectively.
CONCEPTS
The script relies on pivot point analysis, a technique used to identify significant price levels where the market has previously reversed. It dynamically tracks a set number of recent swing highs and lows, allowing traders to see if the price is revisiting a previously significant level. The concept of breakouts and retests is widely used in technical analysis to determine potential entry points. A breakout occurs when the price moves beyond a resistance or support level, and a retest happens when the price returns to test that level before continuing in the breakout direction. This script enhances that analysis by incorporating ATR-based tolerance levels, ensuring that price zones are not too large.
FEATURES
Breakout and Retest Markings : Highlights breakout and retest areas with shaded boxes, allowing traders to visualize where price action is confirming key levels.
Volume Delta and Ratio : Analyzes volume at breakout levels to gauge the strength of the move, displaying volume delta information for additional context. The script also displays the ratio of selling to buying at the retest along traders to make better judgement on their entries.
Multi-Timeframe Adaptability : Dynamically adjusts volume analysis to align with the appropriate lower timeframe, ensuring reliable volume comparisons.
Alerts for Breakout and Retest Events : Traders can receive real-time notifications when bullish or bearish breakout retests are detected.
USAGE
This script is best suited for traders looking to identify strong breakout and retest setups across different timeframes. Users can customize the pivot detection period and swing point memory to adjust sensitivity based on their trading style. The ATR length and multiplier allow further refinement of breakout tolerance, reducing noise in volatile markets. The breakout zones are displayed as shaded boxes, where traders can assess whether a price retest is occurring under favorable conditions. Alerts can be set to notify traders of potential trade opportunities.
Enhanced BarUpDn StrategyEnhanced BarUpDn Strategy
The Enhanced BarUpDn Strategy is a refined price action-based trading approach that identifies market trends and reversals using bar formations. It focuses on detecting bullish and bearish momentum by analyzing consecutive price bars and key support/resistance levels.
Key Features:
✅ Trend Confirmation – Uses a combination of bar patterns and indicators (e.g., moving averages, RSI) to confirm momentum shifts.
✅ Entry Signals – A buy signal is triggered when an "Up Bar" (higher high, higher low) follows a bullish setup; a sell signal when a "Down Bar" (lower high, lower low) confirms bearish momentum.
✅ Enhanced Filters – Incorporates volume analysis and additional conditions to reduce false signals.
✅ Stop-Loss & Risk Management – Uses recent swing highs/lows for stop placement and dynamic trailing stops for maximizing gains.
Anchored Powered KAMA [LuxAlgo]The Anchored Powered KAMA tool is a new flavor of the famous Kaufman's Adaptive Moving Average (KAMA).
It adds 5 different anchoring periods, a power exponent to the original KAMA calculation to increase the degree of filtering during ranging trends, and standard deviation bands calculated against the KAMA itself.
🔶 USAGE
In the image above we can see the different parts of the tool, it displays the Anchored Powered KAMA surrounded by standard deviation bands at 2x (solid) and 1x (dashed) by default.
This tool provides a simple and easy way to determine if the current market is ranging or trending and where the market extremes are in the current period.
As a rule of thumb, traders may want to trade extremes in ranges and pullbacks in trends.
When the KAMA is flat, a range is in place, so traders may want to wait for the price to reach an extreme before opening a trade in the other direction.
Conversely, if the KAMA is moving up or down, a trend is in place and traders may want to wait for the price to pull back to the KAMA before opening a trade in the direction of the trend.
🔹 Anchor Period
On the above chart, we can see different anchor periods on different chart timeframes.
This option is very useful for those traders who use multi-timeframe analysis, allowing them to see how the market behaves over different timeframes.
The valid values for this parameter are:
Hourly
Daily
Weekly
Monthly
Yearly
The tool has a built-in Auto feature for traders convenience, it automatically selects the optimal Anchor Period in function of the chart timeframe.
timeframes up to 2m: Hourly
timeframes up to 15m: Daily
timeframes up to 1H: Weekly
timeframes up to 4H: Monthly
larger timeframes: Yearly
🔹 Choosing the Right Anchor Period
In the chart above we can see the custom error message that the tool displays when the Auto feature is disabled and the Anchor Period is too large for the current chart timeframe.
Traders can select a smaller Anchor Period or a larger chart timeframe for the tool to display correctly.
🔶 DETAILS
The tool uses Welford's algorithm to calculate the KAMA's standard deviation, then plots the outer bands at the multiplier specified in the settings panel, and the inner bands at the multiplier specified minus 1.
🔹 Power Exponent
The graph above shows how different values of this parameter can affect the output.
To display the original KAMA a value of 1 must be set, by default this parameter is set to 2.
The higher the value, the better the tool's ability to detect ranges.
🔶 SETTINGS
Anchor Period: Select up to 5 different time periods from Hourly, Daily, Weekly, Monthly, and Yearly.
Source: Choose the source for all calculations.
Power Exponent: Fine-tune the KAMA calculation, a value of 1 will output the original KAMA, and is set to 2 by default.
Band Multiplier: Select the multiplier for the standard deviation bands.
Impulse MACD enhancedThis indicator is designed to provide robust trade entry signals by combining multiple technical filters. Here’s a summary of its key components:
Impulse MACD Calculation:
Uses a Zero-Lag EMA (ZLEMA) based approach to generate a momentum indicator (with a signal line and histogram) that identifies shifts in market momentum.
Simulated Higher Timeframe (HTF) Trend Filter:
Computes an SMA over a multiplied period to simulate a higher timeframe trend. It requires the price to be in line with this broader trend before signaling an entry.
RSI Filter:
Ensures that for bullish entries the RSI is above a set threshold (indicating momentum) and for bearish entries it’s below a threshold.
ADX Filter:
Uses a manually calculated ADX to confirm that the market is in a strong trend (ADX > 30) to reduce false signals in weakly trending or sideways markets.
Volume Filter:
Compares the current volume to a 20‑bar SMA of volume, requiring volume to be significantly higher (by a user-defined percentage) to confirm the strength of the move.
VWAP Confirmation:
Uses the Volume-Weighted Average Price as an extra layer of confirmation: bullish signals require the price to be above VWAP, bearish signals below.
Optional Long-Term & Short-Term MA Filters:
These filters can be enabled to ensure the price is trading above (or below) longer-term and shorter-term moving averages, further aligning the trade with the prevailing trend.
ATR Volatility Filter:
Checks that volatility (as measured by the ATR relative to price) is below a maximum threshold, which helps avoid taking trades in overly volatile conditions.
Price Action Filter:
Ensures that for a bullish signal the current close is above the highest high over a specified lookback period (and vice versa for bearish), indicating a clear breakout.
Signal Throttling:
Signals are limited to one every 10 bars to prevent excessive trading.
When all these conditions are met, the indicator outputs an entry signal for either a bullish or bearish trade.
This multi-filter approach aims to increase win rate by reducing false signals and aligning trades with strong, confirmed trends while filtering out noise.
Shavarie's MCV IndicatorShavarie's MCV Indicator (MACD + CCI + Volume Delta) is a custom-built trend-following and volume-based indicator that helps traders confirm market direction with high accuracy. It combines the MACD (Moving Average Convergence Divergence), CCI (Commodity Channel Index), and Volume Delta, ensuring that all three indicators align before making a trading decision. The goal is to filter out false signals and provide high-probability trade setups.
History & Development
Shavarie's MCV Indicator was developed by Shavarie Gordon, an experienced swing trader, to improve trend confirmation on Gold (XAUUSD) and other markets. After testing various indicators, Shavarie discovered that MACD, CCI, and Volume Delta together provide the best combination of trend strength, momentum, and real-time volume flow. This indicator was designed to eliminate lagging signals, improve win rates, and enhance market timing for both swing and scalping strategies.
How It Works & Calculations
MACD (Moving Average Convergence Divergence)
Measures momentum and trend strength using the difference between a 12-period EMA and a 26-period EMA.
The MACD line and Signal line crossover confirms buy/sell signals.
A rising MACD histogram confirms bullish strength, while a falling histogram confirms bearish strength.
CCI (Commodity Channel Index)
Measures how far the price is from its statistical average.
Above +100 → Overbought (strong trend continuation or reversal).
Below -100 → Oversold (strong trend continuation or reversal).
When CCI aligns with MACD, it confirms momentum strength.
Volume Delta
Measures the difference between buying and selling volume in real time.
A positive delta means more aggressive buying (bullish).
A negative delta means more aggressive selling (bearish).
Helps confirm MACD and CCI trends by showing real volume strength.
Key Takeaways & Features
✅ No false signals: All three indicators must align before entering a trade.
✅ Trend confirmation: Ensures momentum and volume agree before trading.
✅ Works on multiple timeframes: Designed for swing trading on the daily and scalping on 45 min + 5 min.
✅ Great for Gold & Metals: Optimized for XAUUSD, XAUJPY, XAU/AUD, and possibly Palladium (XPDUSD).
✅ Custom-built by a professional trader: Developed by Shavarie Gordon after extensive testing.
Summary
Shavarie’s MCV Indicator is a powerful and reliable trading tool that combines momentum, trend, and volume analysis. By ensuring that MACD, CCI, and Volume Delta align, it eliminates false signals and increases trade accuracy. Whether used for swing trading or scalping, this indicator helps traders enter high-probability trades with confidence.
Trend Vanguard StrategyHow to Use:
Trend Vanguard Strategy is a multi-feature Pine Script strategy designed to identify market pivots, draw dynamic support/resistance, and generate trade signals via ZigZag breakouts. Here’s how it works and how to use it:
ZigZag Detection & Pivot Points
The script locates significant swing highs and lows using configurable Depth, Deviation, and Backstep values.
It then connects these pivots with lines (ZigZag) to highlight directional changes and prints labels (“Buy,” “Sell,” etc.) at key turning points.
Support & Resistance Trendlines
Pivot highs and lows are used to draw dashed S/R lines in real-time.
When price crosses these lines, the script triggers a breakout signal (long or short).
EMA Overlays
Up to four EMAs (with customizable lengths and colors) can be overlaid on the chart for added trend confirmation.
Enable/disable each EMA independently via the settings.
Repaint Option
Turning on “Smooth Indicator Lines” (repaint) uses future data to refine past pivots.
This can make historical signals look cleaner but does not reflect true historical conditions.
Turning it off ensures signals remain fixed once they appear.
Strategy Entries & Exits
On each new ZigZag “Buy” or “Sell” signal, the script closes any open position and flips to the opposite side (if desired).
Works with the built-in TradingView Strategy engine for backtesting.
Additional Inputs (Placeholders)
Volume Filter and RSI Filter settings exist but are not fully implemented in the current code. Future versions may incorporate these filters more directly.
How to Use
Add to Chart: Click “Indicators” → “Invite-Only Scripts” (or “My Scripts”) and select “Trend Vanguard Strategy.”
Configure Settings:
Adjust ZigZag Depth, Deviation, and Backstep to fine-tune pivot sensitivity.
Enable or disable each EMA to see how it aligns with market trends.
Toggle “Smooth Indicator Lines” on or off depending on whether you want repainting.
Backtest and Forward Test:
Use TradingView’s “Strategy Tester” tab to review hypothetical performance.
Remember that repainting can alter past signals if enabled.
Monitor Live:
Watch for breakout triangles or ZigZag labels to identify potential reversal or breakout trades in real time.
Disclaimer: This script is purely educational and not financial advice. Always combine it with sound risk management and thorough analysis. Enjoy exploring the script, and feel free to experiment with the different settings to match your trading style!
TCTDailyBiasLibraryLibrary "TCTDailyBiasLibrary"
Provides a simple function to return a daily bias based on the break of the morning range
getDailyBias()
Returns the daily bias based on the break of the morning range
Returns: bias