OPEN-SOURCE SCRIPT
Asset Statistics Analysis 📊

📊 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.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.