OPEN-SOURCE SCRIPT

DCA Performance Analysis

Dollar-Cost Averaging (DCA) Performance Calculator

This indicator helps you analyze the performance of a DCA investment strategy by simulating regular periodic investments into an asset. Perfect for long-term investors who want to evaluate or backtest their DCA strategy.

Key Features:
- Flexible Investment Scheduling: Choose between daily, weekly, or monthly investments
- Custom Date Range: Set specific start and end dates for your analysis
- Adjustable Investment Amount: Input any dollar amount for your regular investments
- Clear Visual Markers: Green triangles show entry points, red triangle marks the end date
- Comprehensive Performance Metrics: View total investment, days invested, unrealized yield, and portfolio value

The indicator displays a clean, easy-to-read table showing:
1. Total Invested: The cumulative amount of money invested
2. Investment Days: Total number of investment entries executed
3. Unrealized Yield: Both dollar amount and percentage return (calculated at end date)
4. Portfolio Worth: Total value of holdings at the specified end date

Usage Tips:
- Best used on BTCUSD or other cryptocurrency pairs
- Works on all timeframes, but matching the timeframe to your DCA frequency provides the clearest visualization
- Calculations use opening prices for entries and closing price at end date for final valuation
- All calculations are based on UTC+0 time

This tool is ideal for:
- Backtesting DCA strategies
- Understanding historical DCA performance
- Comparing different DCA frequencies
- Planning future DCA investments
- Educational purposes about DCA investing

Note: This indicator is for informational purposes only and should not be considered financial advice. Past performance does not guarantee future results.
Candlestick analysisChart patterns

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian