Death Cross Max Drop % (Near DC)

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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.