OPEN-SOURCE SCRIPT

SASDv2r

Sensitive Altcoin Season Detector V2


This Pine Script™ code, titled "SASDv2r" (Sensitive Altcoin Season Detector version 2 revised), is designed for cryptocurrency trading analysis on the TradingView platform and tailored for those interested in tracking when altcoins might be outperforming Bitcoin, potentially indicating a market shift towards altcoins.

Feel free to use and modify. If you made it better, please let me know. Intention was to help the community with a tool for retail traders have no access to advanced, MV indicators. Solution uses classic TA only.

Use it witl TOTAL3/BTC indicator.

Please check: it gave signal just before last alt season % rose more than 250%.

Market Cap Data Fetching: The script fetches market capitalization data for Bitcoin, Ethereum, and all other altcoins (excluding Bitcoin and Ethereum) using request.security function.

Altcoin to Bitcoin Ratio: It calculates the ratio of total market cap of altcoins to Bitcoin's market cap (altToBtcRatio), which is central to identifying an "altcoin season."

Moving Averages: Several moving averages are computed for different time frames (50-day SMA, 200-day SMA, 20-day SMA, and 10-day EMA) to analyze trends in the altcoin to Bitcoin ratio.
Momentum Indicators: The script uses RSI (Relative Strength Index) and MACD (Moving Average Convergence Divergence) to gauge momentum and potential reversal points in the market.

Custom Indicators: It includes Volume Weighted Moving Average (VWMA) and a custom momentum indicator (altMomentum and altMomentumAvg) to provide additional insights into market movements.

Volatility Measurement: Bollinger Bands are calculated to assess volatility in the altcoin to Bitcoin ratio, which helps identify periods of high or low market activity.

Visual Analysis: Various plots are added to the chart for visual interpretation, including the altcoin to Bitcoin ratio, different moving averages, and Bollinger Bands.

Alt Season Detection: The script defines conditions for detecting when an "altcoin season" might be starting, based on crossovers of moving averages, RSI levels, MACD signals, and other custom criteria.

Performance Tracking: After signaling an alt season, the script evaluates the performance over the next 30 days by checking if there's been an increase in the altcoin to Bitcoin ratio, adding labels for positive or negative trends.(this one is in progress). Logic still gives false signals and aim is to identify failed signals.

Visual Signals: Labels are placed on the chart to visually indicate the beginning of a potential alt season or the performance outcome after a signal, aiding traders in making informed decisions.


免責聲明