OPEN-SOURCE SCRIPT

Asset Statistics Analysis 📊

253
📊 Asset Drawdown Statistics — Full Analysis & Recommendation Tool
This indicator provides an in-depth statistical analysis of an asset’s drawdown behavior over a custom period and offers dynamic trade recommendations based on price action and moving average alignment.

🔍 Main Features:
✅ Drawdown Classification: Real-time classification of the current drawdown into 4 levels:

🟢 Low

🟡 Moderate

🟠 High

🔴 Critical
(Levels are calculated dynamically based on the asset's max drawdown in the selected period.)

⏱️ Average & Max Durations: Tracks how long the asset stays in each drawdown level on average and records the longest streaks (in bars).

📈 Dynamic Price Thresholds: Visual lines on the chart show key drawdown levels derived from peak equity.

📋 Statistical Dashboard: A floating table shows:

Current drawdown and classification

Time spent in each drawdown level (percentage)

Average and max duration per level

Live recommendation based on drawdown context and MA trend

📌 Trade Recommendations:
Based on the current drawdown + position relative to 3 moving averages (SMA):

🟢 Strong Buy / Buy

🟡 Accumulate / Hold

🟠 Reduce

🔴 Sell / Strong Sell

⚙️ Inputs:
Drawdown Period: Defines the number of bars used for peak drawdown calculation

3 customizable moving averages: Short / Medium / Long

✅ How to Use:
Use the drawdown classification to assess long-term risk phases.

Check the "Recommendation" box for guidance on timing entries/exits.

Combine with your own strategy or trend-following approach.

⚠️ Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice.
Always do your own research and consult with a qualified financial advisor before making any trading decisions.
The author assumes no responsibility for any losses or damages resulting from the use of this indicator.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。