OPEN-SOURCE SCRIPT

Death Cross Max Drop % (Near DC)

26
The "Death Cross Max Drop % (Near DC)" indicator is designed to help traders and analysts quantify the potential downside following a "Death Cross" event. A Death Cross typically occurs when a shorter-term Simple Moving Average (SMA) crosses below a longer-term SMA, often signaling a potential bearish trend. This indicator not only identifies these events but also measures the maximum percentage drop from the point of the Death Cross until the subsequent "Golden Cross" (shorter-term SMA crosses back above the longer-term SMA).

How it Works:

SMA Configuration: The indicator uses two Simple Moving Averages (SMAs). By default, these are the 100-period SMA and the 200-period SMA, but their lengths are configurable in the settings.
Death Cross Detection: It identifies when the shorter SMA (e.g., SMA 100) crosses below the longer SMA (e.g., SMA 200). This event is marked on the chart with a red downward triangle.
Measurement Period: Once a Death Cross is detected, the indicator records the closing price of that bar. It then tracks the lowest low price reached from that point until a Golden Cross (shorter SMA crosses above longer SMA) occurs, signaling the end of that specific bearish cycle for measurement purposes.
Percentage Drop Calculation: Upon the confirming Golden Cross, the indicator calculates the maximum percentage drop from the recorded Death Cross price to the lowest low observed during the cycle.
Label Display: The key feature is how this information is displayed. The calculated maximum percentage drop is shown in a label that is strategically placed on the chart at the bar index where the original Death Cross occurred. This provides a direct visual link between the bearish signal and its measured outcome.
Tooltip Information: The label also includes a detailed tooltip that appears when you hover over it, showing:
The cycle type (Death Cross to Golden Cross).
The price at the time of the Death Cross.
The lowest low price reached during the cycle.
The calculated maximum percentage drop.
Key Features:

Configurable SMA lengths for customized analysis.
Clear visual signals (red triangles) for Death Cross events.
Precise calculation of the maximum percentage drop within a defined bearish cycle.
Unique Label Placement: The result (max drop %) is plotted near the initiating Death Cross bar, making it easy to visually correlate the signal with its historical impact.
Informative tooltips for quick access to detailed cycle data.
Plots the SMAs for context.
How to Use / Interpretation:

This indicator can be a valuable tool for traders looking to understand the historical impact of Death Cross signals on a specific asset.
It can aid in backtesting strategies or assessing the typical extent of drawdowns after such a bearish signal.
By seeing the max drop percentage directly linked to the Death Cross event, users can quickly gauge the potential risk or severity associated with past occurrences.
Always use this indicator in conjunction with other forms of analysis and risk management practices. Past performance, as measured by this indicator, is not indicative of future results.
Settings:

SMA 100 Length: Default 100 (can be adjusted).
SMA 200 Length: Default 200 (can be adjusted).
Source: Price source for SMA calculations (default is 'close').
This indicator is written in Pine Script v5.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.