Skip to content

The Refined Multi-TF Crypto Analyzer (TradingView indicator) is designed for crypto traders looking to identify high-probability buy and sell signals on shorter timeframes (e.g., 15 minutes) while confirming trends using a higher timeframe (e.g., 30 minutes).

Notifications You must be signed in to change notification settings

messified/tradingview-crypto-indicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Refined Multi-TF Crypto Analyzer

Note: This code is based on a hypothetical future version of Pine Script (//@version=6). As of now, TradingView's latest official version is Pine Script v5, and the code here is purely illustrative. It may not run on TradingView until an official release of the referenced version occurs.

Overview

The Refined Multi-TF Crypto Analyzer is designed for crypto traders looking to identify high-probability buy and sell signals on shorter timeframes (e.g., 15 minutes) while confirming trends using a higher timeframe (e.g., 30 minutes). The script helps filter out market noise and aims to provide more reliable entry and exit points by combining multiple technical indicators, volume filters, and divergence detection.

Key Features

  1. Multi-Timeframe Trend Confirmation:
    The script computes technical indicators (EMA, RSI, ADX) on both the current and a higher timeframe. This dual confirmation helps ensure that signals are not just short-lived intrabar fluctuations but align with the broader market trend.

  2. EMA-Based Trend Detection:
    Two EMAs (Fast and Slow) determine the primary trend. A bullish trend is identified when the Fast EMA is above the Slow EMA, and a bearish trend when the Fast EMA is below the Slow EMA. ADX is used to confirm the strength of that trend.

  3. RSI-Based Overbought/Oversold Conditions:
    RSI is used to pinpoint when the market might be overbought (potential selling opportunity) or oversold (potential buying opportunity). The script dynamically identifies critical buy (oversold in a bullish trend) and critical sell (overbought in a bearish trend) conditions.

  4. Volume Spikes and Divergences:
    Volume spikes can indicate genuine market interest in a move, adding weight to critical signals. RSI divergences (where price and RSI move in opposite directions) can mark potential reversals or trend exhaustion.

    • Bullish Divergence: Price makes a lower low while RSI makes a higher low, suggesting a potential upward reversal.
    • Bearish Divergence: Price makes a higher high while RSI makes a lower high, suggesting a potential downward reversal.
  5. Risk/Reward Guidance:
    The script calculates a suggested price target and stop-loss level based on the Average True Range (ATR). By offering a clear target and stop, it encourages disciplined trading with a predefined risk/reward profile.

  6. Critical vs. Regular Signals:

    • Critical Buy/Sell: Occur when multiple factors align strongly (e.g., trend, RSI extreme condition, divergence, and volume spike). These signals are intended for higher conviction trades.
    • Regular Buy/Sell: Appear when conditions are met but not as strongly aligned as the critical conditions, serving as secondary opportunities.
  7. Hold Condition:
    When the script identifies that no new critical or regular signals are triggered, but a trend is still in place, it suggests maintaining the current position rather than taking fresh entries or exits.

  8. Sell Percentage Targets:
    On critical sell signals, the script provides quick reference price points for potential partial profit-taking (e.g., at +2%, +10%, and +20% from the current price).

  9. Alerts (Hypothetical):
    In this future version of Pine Script (v6), the script demonstrates how direct alert() calls might work. Alerts can notify traders in real-time about emerging critical buy, sell, or hold signals without separately defining conditions via alertcondition().

How to Use

  1. Apply to a Crypto Chart:
    Set your chart to a desired low timeframe (e.g., 15m). The script will internally fetch and confirm signals using a higher timeframe (e.g., 30m) for additional robustness.

  2. Adjust Parameters:
    Experiment with input parameters such as EMA lengths, RSI thresholds, ATR length, and ADX threshold to fine-tune the script to the specific crypto asset or volatility profile you are trading.

  3. Interpret Signals:

    • Look for Critical Buy signals in strong bullish setups, especially at oversold RSI levels and with a confirming bullish divergence.
    • Watch for Critical Sell signals when the market is overbought and shows bearish divergence.
    • Regular Buy/Sell can be used for intermediate trades.
    • If a Hold condition appears, consider staying in your current trade if you are already positioned.
  4. Risk Management:
    Use the suggested target and stop-loss levels. Adjust these levels as per your personal risk tolerance or integrate with your existing trading strategy.

  5. Alerts (Once Supported):
    Set up alerts (in a future TradingView update) to receive immediate notifications when critical signals appear.

Parameters Overview

  1. Fast EMA Length (fastLength)

    • Description: This sets the lookback period for the Fast Exponential Moving Average (EMA). The Fast EMA responds more quickly to recent price changes than the Slow EMA.
    • Typical Default: 9
    • Adjustment Example:
      • Increasing fastLength from 9 to 15 makes the Fast EMA slower to respond to price changes. This can reduce the frequency of signals, potentially filtering out noise but also potentially delaying entries and exits.
      • Decreasing fastLength to 5 makes the Fast EMA extremely sensitive. It may produce earlier signals, but at the risk of more false positives.
  2. Slow EMA Length (slowLength)

    • Description: Sets the lookback period for the Slow EMA. This indicator provides a smoother, more stable trend line compared to the Fast EMA.
    • Typical Default: 26
    • Adjustment Example:
      • Increasing slowLength from 26 to 50 yields an even smoother trend line, reducing whipsaws but reacting more slowly to trend changes.
      • Decreasing slowLength to 20 makes the Slow EMA more responsive, but this could result in quicker but less reliable trend shifts.
  3. RSI Length (rsiLength)

    • Description: The lookback period for the Relative Strength Index (RSI), which measures momentum and identifies overbought/oversold conditions.
    • Typical Default: 14
    • Adjustment Example:
      • Increasing rsiLength to 21 smooths the RSI line, reducing volatility in RSI readings, which might produce fewer overbought/oversold signals but of potentially higher quality.
      • Decreasing rsiLength to 7 makes RSI more sensitive, catching short-term momentum swings more frequently but possibly generating more noise in the signals.
  4. RSI Overbought Level (rsiOverbought)

    • Description: The threshold above which the RSI is considered overbought, indicating a potential sell or short signal.
    • Typical Default: 75
    • Adjustment Example:
      • Increasing rsiOverbought to 80 makes the script more conservative about calling a market “overbought.” This may reduce premature sell signals but could miss some valid exit points.
      • Decreasing rsiOverbought to 70 will produce more frequent sell signals once the RSI surpasses 70, potentially catching reversals earlier but also leading to more false alarms.
  5. RSI Oversold Level (rsiOversold)

    • Description: The threshold below which the RSI is considered oversold, often signaling a potential buying opportunity.
    • Typical Default: 25
    • Adjustment Example:
      • Increasing rsiOversold to 30 will trigger oversold conditions more frequently, resulting in more buy signals, but it could lead to buying too early.
      • Decreasing rsiOversold to 20 ensures you only consider very strong oversold conditions for entries, which may reduce false buy signals but also cause you to miss some good, slightly less oversold entry points.
  6. ATR Length (atrLength)

    • Description: The lookback period for the Average True Range (ATR), which measures market volatility.
    • Typical Default: 14
    • Adjustment Example:
      • Increasing atrLength to 20 smooths out volatility measurements, potentially making recommended stop-loss and take-profit levels more stable, but slower to adapt to sudden volatility changes.
      • Decreasing atrLength to 10 makes ATR respond more quickly to volatility spikes, adjusting targets and stops faster, but can produce more frequent and possibly choppy adjustments.
  7. Volume Spike Multiplier (volumeMultiplier)

    • Description: A factor applied to the average volume to determine what constitutes a “volume spike.”
    • Typical Default: 2.0
    • Adjustment Example:
      • Increasing volumeMultiplier to 3.0 means only very significant volume surges trigger critical signals. This reduces false positives but might miss moderate but still meaningful volume increases.
      • Decreasing volumeMultiplier to 1.5 will trigger volume spike conditions more often, making volume-sensitive buy/sell signals more frequent, but potentially less reliable.
  8. Support/Resistance Lookback (supportResistanceLen)

    • Description: The number of bars used to detect recent Support and Resistance levels.
    • Typical Default: 50
    • Adjustment Example:
      • Increasing supportResistanceLen to 100 considers a longer price history, potentially identifying stronger, more durable support/resistance zones, but may be less sensitive to recent market changes.
      • Decreasing supportResistanceLen to 20 focuses on very recent price action, adapting quickly to current conditions but may identify weaker support/resistance zones that don’t hold well.
  9. Risk/Reward Multiplier (riskRewardMultiplier)

    • Description: Determines the target price level based on ATR. If set to 2.5, the target price is 2.5 times the ATR above the entry price.
    • Typical Default: 2.5
    • Adjustment Example:
      • Increasing riskRewardMultiplier to 3.0 sets more ambitious profit targets. This can yield bigger gains when successful, but reduces the probability of hitting the target as it’s further away.
      • Decreasing riskRewardMultiplier to 2.0 provides more conservative targets that are easier to hit, increasing the win rate but potentially lowering the average profit per trade.
  10. Higher Timeframe (htf)

    • Description: The secondary, higher timeframe used to confirm trends identified on the lower chart timeframe. Common choices include 30m or 1h if your chart is on the 15m timeframe.
    • Typical Default: "30" (30-minute)
    • Adjustment Example:
      • Switching htf from "30" to "1h" uses a higher timeframe confirmation, potentially making signals rarer but more reliable, as trends that appear on the 1-hour chart are generally stronger.
      • Using a shorter htf like "15" when you’re on a very low timeframe (e.g., 5m chart) can increase the number of confirmed signals, but might reduce their quality since both timeframes are relatively short-term.

Summary of Effects

  • Longer Periods (EMA, RSI, ATR) & Higher Thresholds (e.g., RSI Overbought at 80): Generally reduce the frequency of signals, aiming for higher quality but slower responses.
  • Shorter Periods & Lower Thresholds (e.g., RSI Overbought at 70): Increase the frequency of signals and sensitivity to price action, which can lead to catching more opportunities but also more false signals.
  • Adjusting Risk/Reward: Changing the multiplier reflects your personal trading style—higher multipliers for bigger wins but fewer hits, lower multipliers for more frequent but smaller gains.
  • Volume Multipliers & Support/Resistance Length: Control how strict the script is with what it considers “significant” volume or reliable support/resistance. Higher multipliers and longer lookbacks mean stricter conditions and fewer signals.

By fine-tuning these parameters, you can adapt the script to different crypto assets, market conditions, and your personal trading strategy. Experimentation is key—start with small tweaks and observe how the resulting signals and overall performance change before making more significant adjustments.

Below is a complete glossary with a Table of Contents. The glossary is formatted in Markdown, making it suitable for inclusion in a README.md file. Each term is explained in detail, providing you with a comprehensive reference.

Glossary

Table of Contents

  1. Exponential Moving Average (EMA)
    1.1 Fast EMA
    1.2 Slow EMA

  2. Relative Strength Index (RSI)
    2.1 RSI Overbought
    2.2 RSI Oversold

  3. Average True Range (ATR)
    3.1 ATR Length

  4. Volume and Volume Spikes

  5. Support and Resistance

  6. Risk/Reward Multiplier

  7. ADX (Average Directional Index)

  8. Divergences (Bullish and Bearish)

  9. Multi-Timeframe Analysis


Exponential Moving Average (EMA)

Definition: An Exponential Moving Average is a type of moving average that gives more weight to recent price data, making it more responsive to current market conditions than a Simple Moving Average (SMA).

What It Does:
EMAs smooth out price fluctuations and help identify trends. When the market price is above an EMA line, it often suggests an uptrend; when below, a downtrend.


Fast EMA

Definition: The Fast EMA uses a shorter lookback period (e.g., 9 bars) than the Slow EMA.

What It Does:
Because it reacts quickly to price changes, the Fast EMA is useful for identifying short-term trend shifts. For instance, if the Fast EMA crosses above the Slow EMA, it may indicate the start of a bullish (upward) trend.

Impact of Adjustments:

  • Shorter Period (e.g., 5): More sensitive, more signals, but potentially more false alarms.
  • Longer Period (e.g., 15): Less sensitive, fewer signals, but potentially more reliable ones.

Slow EMA

Definition: The Slow EMA uses a longer lookback period (e.g., 26 bars).

What It Does:
It provides a smoother, more stable indication of the overall trend. The Slow EMA moves gradually, filtering out minor short-term fluctuations.

Impact of Adjustments:

  • Shorter Period (e.g., 20): More responsive, but potentially more noise.
  • Longer Period (e.g., 50): Smoother, more stable trend indication, but slower to react to changes.

Relative Strength Index (RSI)

Definition: RSI is a momentum oscillator that measures the speed and change of price movements. Its values range from 0 to 100.

What It Does:
RSI helps identify potential overbought or oversold conditions. A rising RSI indicates growing buying momentum, while a falling RSI indicates growing selling momentum.

Impact of Adjustments to Length (e.g., 14 to 21):

  • Longer RSI Length: Smoother readings, fewer signals, but possibly higher accuracy.
  • Shorter RSI Length: More frequent signals and higher sensitivity, but potentially more false positives.

RSI Overbought

Definition: A specified RSI level (often above 70 or 75) at which the market may have risen too far, too fast.

What It Does:
An RSI reading in the overbought zone suggests a potential pullback or reversal. While it doesn’t guarantee a price drop, it signals that bullish momentum may be losing steam.

Impact of Adjustments:

  • Higher Threshold (e.g., 80): Fewer sell signals, more conservative, might miss early exits.
  • Lower Threshold (e.g., 70): More frequent sell signals, potentially catching reversals earlier, but could cause premature exits.

RSI Oversold

Definition: A specified RSI level (often below 30 or 25) where the market may have fallen too far, too fast.

What It Does:
An oversold RSI reading suggests selling momentum may be exhausted, increasing the likelihood of a price rebound.

Impact of Adjustments:

  • Higher Threshold (e.g., 30): More buy signals, potentially earlier entries but higher risk of false starts.
  • Lower Threshold (e.g., 20): Fewer buy signals, more confirmation required, potentially missing some good opportunities.

Average True Range (ATR)

Definition: ATR measures the market’s volatility by averaging the range (difference between high and low) of price over a set number of bars.

What It Does:
A high ATR indicates a volatile market with larger price swings, while a low ATR suggests a more stable, quieter market.


ATR Length

Definition: The number of bars used to calculate the ATR (e.g., 14 bars).

What It Does:
This determines how quickly the ATR responds to recent volatility changes.

Impact of Adjustments:

  • Longer ATR Length (e.g., 20): Smoother volatility measure, slower to react, fewer erratic changes.
  • Shorter ATR Length (e.g., 10): More sensitive to recent changes, can adjust stop-loss/target levels faster, but may be choppier.

Volume and Volume Spikes

Volume:
The number of units (coins, shares, etc.) traded in a given time period. High volume often indicates strong interest and participation in a price move.

Volume Spike:
A sudden increase in volume compared to a recent average. Volume spikes can validate price moves, suggesting that a breakout or reversal has genuine market backing.

Impact of Adjustments (Volume Multiplier):

  • Higher Multiplier (e.g., 3.0): Identifies only large, significant spikes. Fewer signals, but stronger confirmation.
  • Lower Multiplier (e.g., 1.5): More frequent volume spikes, more signals, potentially less reliable.

Support and Resistance

Support:
A price level where falling prices have previously stopped and bounced back up. Acts like a "floor."

Resistance:
A price level where rising prices have previously halted and turned down. Acts like a "ceiling."

Lookback Period (supportResistanceLen):
Defines how far back the script looks to find historical price levels for support and resistance.

Impact of Adjustments:

  • Longer Lookback (e.g., 100 bars): More significant historical levels, but less sensitive to recent changes.
  • Shorter Lookback (e.g., 20 bars): More focus on recent levels, quicker adaptation, but potentially weaker zones.

Risk/Reward Multiplier

Definition: A factor applied to the ATR (or another volatility measure) to determine take-profit targets relative to risk.

What It Does:
If your multiplier is 2.5 and your ATR is 1, your target is 2.5 units above the entry price. This helps balance potential reward against the risk you’re taking.

Impact of Adjustments:

  • Higher Multiplier (e.g., 3.0): More ambitious targets, potentially higher profits, but lower hit rate.
  • Lower Multiplier (e.g., 2.0): More conservative targets, easier to hit, potentially more consistent gains but smaller per trade.

ADX (Average Directional Index)

Definition: ADX measures the strength of a trend, ranging from 0 to 100. It does not indicate direction, only strength.

What It Does:

  • High ADX (above 20 or 25): Suggests a strong trend (up or down).
  • Low ADX (below 20): Suggests a range-bound or sideways market.

Impact of Adjustments:

  • Raising the ADX threshold means you only trade in stronger trends, resulting in fewer but potentially higher-quality signals.
  • Lowering the ADX threshold increases the number of possible signals but may include choppy, less reliable conditions.

Divergences (Bullish and Bearish)

Divergence:
Occurs when price action and an indicator (like RSI) move in opposite directions, indicating a potential shift in momentum.

Bullish Divergence:
Price makes a lower low, but RSI makes a higher low, suggesting downward momentum is weakening and an upward reversal could be possible.

Bearish Divergence:
Price makes a higher high, but RSI makes a lower high, suggesting upward momentum is fading and a downward reversal might be on the horizon.

What It Does:
Divergences help detect early trend reversals or weakening trends before price fully turns around.


Multi-Timeframe Analysis

Definition:
Evaluating trends, indicators, and signals on more than one timeframe. For instance, checking a 15-minute chart for entries and a 30-minute chart for overall trend confirmation.

What It Does:
Multi-timeframe analysis helps filter out noise. If the short-term and the higher timeframe agree on the trend direction, the signal is likely stronger and more reliable.


By understanding these terms and concepts, you’ll be better equipped to interpret the script’s signals, make informed adjustments to its parameters, and develop a trading style that suits your preferences and risk tolerance.

About

The Refined Multi-TF Crypto Analyzer (TradingView indicator) is designed for crypto traders looking to identify high-probability buy and sell signals on shorter timeframes (e.g., 15 minutes) while confirming trends using a higher timeframe (e.g., 30 minutes).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published