DCA Performance Backtester [Multi-Mode]
DCA Performance Backtester
WHAT IT DOES
This indicator backtests Dollar-Cost Averaging (DCA) accumulation strategies on any symbol and shows the full result on the chart: an on-chart summary table, entry markers, average-cost line, real dividend (ex-date) tracking, a dividend-yield value zone, and a fair comparison against Lump Sum investing. It is accumulate-only (HODL) — no selling logic.
BUY MODES (can be combined)
1. Time-Based DCA — buy a fixed amount every Day / Week / Month. You can pick the weekday (weekly), the day of month (monthly, e.g. payday), or the hour (daily on intraday charts). If the market is closed on the target day, it buys the next trading day.
2. Buy the Dip — buy when price drops X% (default 12%) from the highest close of the last N bars (default 20). A cooldown (default 14 bars) spaces out repeat buys while the condition persists. Optional RSI settings:
• Filter mode — only buy when RSI is below the threshold (default 30).
• Hybrid mode — buy a normal unit on every qualifying dip (blue "D" label) AND an extra special unit when RSI is also below the threshold (red "fire" label), each stream with its own cooldown. The special unit size is adjustable via a multiplier.
3. Martingale-style averaging — first unit at a fixed size, then buy a larger unit (configurable multiplier) each time price falls another X% from the last entry, with a max-steps cap and optional reset when price recovers above average cost.
DIVIDENDS (REAL EX-DATE DATA)
Uses the symbol's actual dividend history. On each ex-date the script credits dividend × units held. Choose Gross or Net; where an exchange only provides gross figures (e.g. SET), Net is estimated as Gross × (1 − withholding tax %). Each ex-date is marked on the price chart with its per-round yield ("XD 2.35%" = dividend per share ÷ close of that day).
DIVIDEND-YIELD VALUE ZONE
Highlights price areas where the annual dividend yield at that price exceeds your threshold (default 8%/year) — useful for income-focused accumulation. Two calculation modes: trailing 12 months (TTM) or last completed calendar year. An outlier filter (default 2.5× median) excludes one-off special dividends so they do not inflate the yield. A reference line shows the exact price where yield equals the threshold.
SUMMARY TABLE
Buy count (normal vs RSI-passed dips), invested capital, units held, average cost, current portfolio value, P/L, ex-date count, total dividends received, dividends as % of invested capital, current TTM yield, DCA total return (incl. dividends), and a Lump Sum comparison computed from the same invested amount at the start date — including dividends on the Lump Sum side for a fair comparison.
ALERTS
Every buy signal fires alert() with a JSON payload (symbol, mode, price, amount, drawdown from high, RSI, and whether the RSI condition passed) — ready for webhooks. Create an alert with "Any alert() function call". Alerts fire on bar close for signals that occur after the alert is created; historical backtest markers do not fire.
HOW TO USE
Recommended on daily charts. Enable one or more buy modes, set your budget and date range, and read the "DCA beats/loses Lump Sum" row to judge whether systematic dip-buying suits the symbol. Typical tuning: calmer stocks work with smaller dip thresholds (5–7%), volatile ones with larger (12–15%).
METHOD & LIMITATIONS
Simulation buys at bar close (no intrabar fills). Accounting is computed by the script itself (indicator, not a strategy — no Strategy Tester tab). Commission % per purchase is included in cost basis. Dividend data depends on PulseWire's database and may be incomplete for some markets or older periods. Past performance does not guarantee future results. Educational tool — not investment advice.
═══════════════════════════════════════════════
DCA Performance Backtester
เครื่องมือทดสอบย้อนหลัง (backtest) กลยุทธ์สะสมหุ้นแบบ DCA กับสินทรัพย์ใดก็ได้ แสดงผลครบบนชาร์ต: ตารางสรุป, จุดซื้อ, เส้นต้นทุนเฉลี่ย, เงินปันผลจากวัน XD จริง, โซนราคาที่ปันผลคุ้ม และการเทียบกับ Lump Sum อย่างยุติธรรม — เป็นแบบซื้อสะสมอย่างเดียว (HODL) ไม่มีการขาย
โหมดการซื้อ (เปิดพร้อมกันได้)
1) DCA ตามรอบเวลา — รายวัน/รายสัปดาห์/รายเดือน เลือกวันและเวลาซื้อได้ ตลาดปิดวันเป้าหมายจะเลื่อนให้อัตโนมัติ
2) Buy the Dip — ซื้อเมื่อราคาย่อจาก High ตาม % ที่ตั้ง (ค่าเริ่มต้น 12% จากกรอบ 20 แท่ง เว้นซื้อซ้ำ 14 แท่ง) พร้อมตัวเลือก RSI สองแบบ: กรองอย่างเดียว หรือโหมดผสม — ไม้ปกติทุกครั้งที่ย่อ (ป้าย D สีฟ้า) + ไม้พิเศษเมื่อ RSI ต่ำกว่าเกณฑ์ด้วย (ป้ายไฟสีแดง) แยก cooldown สองสาย ปรับตัวคูณไม้พิเศษได้
3) ถัวเฉลี่ยขาลงแบบ Martingale — ไม้ใหญ่ขึ้นตามตัวคูณเมื่อราคาลงต่อ มีเพดานจำนวนไม้และรีเซ็ตเมื่อราคาฟื้น
เงินปันผล — ใช้ประวัติ XD จริงของสินทรัพย์ คิดจากจำนวนหน่วยที่ถือ ณ วัน XD เลือก Gross/Net ได้ (ตลาดที่มีแต่ Gross เช่น SET จะคำนวณ Net จากภาษีหัก ณ ที่จ่ายให้) จุด XD บนชาร์ตแสดง % ปันผลของงวดนั้นเทียบราคาวันนั้น
โซนปันผลคุ้ม — ไฮไลท์พื้นหลังช่วงราคาที่ yield ต่อปีสูงกว่าเกณฑ์ (ค่าเริ่มต้น 8%) เลือกวิธีคิดได้ทั้ง TTM 12 เดือน หรือปีปฏิทินล่าสุด พร้อมตัวกรองตัดปันผลพิเศษที่ทำให้ yield โป่งเกินจริง และเส้นบอกราคาที่ yield เท่าเกณฑ์พอดี
ตารางสรุป — จำนวนไม้ (แยกไม้ปกติ/ผ่าน RSI), เงินต้น, หน่วยที่ถือ, ต้นทุนเฉลี่ย, มูลค่าพอร์ต, กำไร/ขาดทุน, จำนวนครั้ง XD, ปันผลรวมและคิดเป็น % ของเงินต้น, yield ปัจจุบัน, ผลตอบแทนรวมปันผล และบรรทัดตัดสิน DCA ชนะ/แพ้ Lump Sum
Alert — ทุกสัญญาณซื้อยิง alert() เป็น JSON (สัญลักษณ์ โหมด ราคา จำนวนเงิน % ย่อ RSI และสถานะผ่าน RSI) พร้อมต่อ webhook ตั้งด้วย "Any alert() function call" — ยิงเฉพาะสัญญาณที่เกิดหลังตั้ง alert ที่ราคาปิดแท่ง
ข้อจำกัด — จำลองซื้อที่ราคาปิดแท่ง เป็น indicator จึงไม่มีแท็บ Strategy Tester ข้อมูลปันผลอิงฐานข้อมูล PulseWire ผลในอดีตไม่ยืนยันอนาคต จัดทำเพื่อการศึกษา ไม่ใช่คำแนะนำการลงทุน Indicator

DCA + DRIP Simulator [WynTrader]DCA + DRIP Simulator
Hello my friend
This tool simulates real effect of an investment plan when a disciplined DCA+DRIP strategy compounds growth, compared to simply investing and pocketing the dividends. It applies to all kind of security with or without dividend paid, so you can compare what tickers you want..
This isn't a simplified estimate. It reads real price, dividend, and split data directly from PulseWire — bar by bar, month by month — and reconstructs what a real investor would have experienced. Apply it to any security — dividend-paying or not, stock, ETF, closed-end fund — and see the picture side by side: with DRIP and no DRIP.
█ CONCEPTS
This indicator illustrates clearly that DCA+DRIP can build more wealth over time than a standard monthly investment approach where dividends are simply cashed out with no plan in mind.
— Dollar Cost Averaging (DCA) means investing a consistent amount every single month, no matter what the market does. When prices drop, your money buys more shares automatically. Over time, this discipline lowers your average cost and keeps emotion out of the equation.
— Dividend Re-Investment Plan (DRIP) means every dividend payment goes straight back into buying more shares, instead of sitting idle. Those extra shares generate their own dividends, which buy more shares — a compounding effect that grows the longer you stay invested.
Together, DCA + DRIP compound together over time.
█ HOW IT WORKS
Set your chart to MONTHLY intervals, else the table is set to zero.
Once configured, the indicator reads price, dividend, and split data directly from PulseWire and simulates what a real investor would have experienced: buying every month (DCA), collecting dividends, reinvesting them automatically (DRIP) and adjust data with Splits.
█ FEATURES
Configurable DCA Parameters
Set your initial deposit, monthly contribution, and an optional annual DCA increase (e.g. +5%/yr to reflect salary growth and inflation over time). A withholding tax rate can also be applied for US-listed securities (e.g. 15% for ZQQ).
Flexible Date Range
The simulation runs from your chosen: a) Number of years to date; b) Start date to date; c) Visible chart from Start/End dates of your chart screen.
Side-by-Side Comparison
Every result is shown in two columns simultaneously — With DRIP and No DRIP. Capital, monthly dividend income, total dividends received, net gain, and share count — all at a glance.
Fully Customizable Table Display
Position, text size, and all colors are adjustable directly from the settings panel, so the table fits cleanly on any chart layout.
█ CONCLUSION
Load this indicator on any security — stock, ETF, closed-end fund, with or without dividends. DCA+DRIP Simulator applies to all of them, though DRIP's effect is most visible on dividend-paying securities, where reinvested dividends compound over time.
The difference between With DRIP and No DRIP can be significant over time.
█ WynTrader
I am not a Pine Script programmer — I am an investor who builds tools to support my own analysis, and maybe helps others. A few anomalies may have slipped through and there is likely room for improvement.
Hope you find this little tool useful. Enjoy!
WynTrader Indicator

F54 DividendsF54 Dividends
Overview
F54 Dividends is an informational indicator that visualises cash dividend events for the active symbol and shows event-level plus cumulative dividend context directly on the chart.
The script is designed for analysis and transparency of dividend history. It does not place orders and does not provide trade execution logic.
Why This Indicator Is Useful
Dividend income is a core component of total return for income-oriented investors, yet PulseWire's default chart view gives no direct visibility into it. This indicator bridges that gap.
Yield on cost at a glance. Each label shows the dividend ratio relative to the price at the time of the ex-dividend event, so you can immediately see how yield evolved over time as the share price changed.
Cumulative income picture. The YTD, Fixed 12M, and Rolling 12M accumulation modes let you see how much income a position has generated over a meaningful period without switching to a separate data source or spreadsheet.
Pattern recognition. Seeing dividend events overlaid on price action makes it easy to spot payout consistency, growth trends, or cuts alongside the price history that accompanied them.
Monthly vs quarterly discrimination. The script automatically detects likely monthly payers and suppresses per-event noise, showing only quarter-end summaries to keep the chart readable without losing the cumulative picture.
Period boundary awareness. New accumulation periods (calendar year or 12-month anchor) are highlighted with a distinct label colour, so resets are immediately visible rather than hidden in the data.
Together these features let you assess a symbol's income quality and consistency directly on the price chart, supporting dividend-focused screening, position review, and historical context gathering.
What The Indicator Shows
- Detects ex-dividend events from PulseWire dividend data.
- Displays per-event dividend amount in EUR.
- Displays per-event dividend ratio relative to a reference close.
- Displays cumulative dividend amount and cumulative dividend ratio according to the selected accumulation mode.
- Limits visible labels to the most recent N events to keep the chart readable.
Accumulation Modes
- YTD: Resets cumulative values at the start of each calendar year.
- Fixed 12M: Uses a fixed 12-month period anchored by the current month.
- Rolling 12M: Uses a continuously rolling 365-day window.
Inputs
- Show last N labels: Controls how many recent dividend labels remain visible.
- Accumulation mode: Selects how cumulative values are calculated (YTD, Fixed 12M, Rolling 12M).
How To Read Labels
Each label includes:
- Dividend amount for the current ex-day.
- Event ratio (R) for the current ex-day.
- Cumulative amount for the selected period.
- Cumulative ratio (R) for the selected period.
- In YTD and Fixed 12M modes, the start of a new accumulation period is highlighted with a teal label.
Notes And Limitations
- Output depends on PulseWire dividend data availability and symbol coverage.
- Currency display is EUR in this script configuration.
- Label visibility may vary with chart scaling and timeframe.
- In Rolling 12M mode, accumulated values are window-based and may fall when older ex-dividend events leave the 12-month window, which can be confusing if a steadily increasing total is expected.
- Past data can be revised by data providers; values are informational.
Compliance And Disclaimer
This script is for educational and informational purposes only.
It is not investment advice, not a solicitation, and not a guarantee of future results.
Always perform your own research and risk assessment before making investment decisions. Indicator

Session Lines & Kill ZonesOptimized for Inner Circle Trader (ICT) and Smart Money Concepts (SMC) traders, this indicator automatically highlights critical intraday market sessions and algorithmic "Kill Zones" directly on your chart.
Unlike standard session clocks that clutter your screens, this script features custom-engineered vertical transition lines and pixel-perfect background shading designed **never** to warp or break your chart's price scale.
---
🔑 Key Features
🌐 True GMT-Based Calculations: Zero reliance on your local broker time. Input your desired GMT offset to seamlessly align your sessions regardless of your data feed.
🕒 Comprehensive Kill Zone Coverage: Includes pre-configured, industry-standard tracking for:
Asian Session / Kill Zone
London Open Kill Zone
New York Open Kill Zone
London / New York Overlap (Silver Bullet/Macro windows)
⚙️ Fully Customizable Extra Session: An independent, fully editable custom session block tailored for tracking specific local market opens, equity hours, or personal macro periods.
📅 Daily Start Line Indicator: Clean, unobtrusive vertical separators marking the exact start of each new trading day.
📐 Clean Scaling Technology: Custom written using localized bar anchors. Your price scale remains 100% accurate, allowing you to compress, expand, and read price action smoothly without squeezed candles.
---
🎨 Visual & Control Settings
* **Timeframe Filtering:** Keep your higher timeframes clean! Set an automatic upper boundary rule (e.g., only show on 1-hour timeframes or lower) to auto-hide the sessions when zooming out to daily or weekly macro views.
* **Toggleable Labels & Borders:** Fully customize your aesthetic. Individually toggle background shading, outer boundary line styles (Solid, Dashed, Dotted), and session floating labels to match your chart's theme.
---
🚀 How to Use It
1. Judicious Multi-accounting: Use the background clouds to identify when liquidity is building up (Asian Range) and when algorithmic manipulation typically occurs (London/NY Sweeps).
2. Time-of-Day Execution: Ensure your setups align with high-volatility session boundaries marked clearly by the vertical transition lines.
Built entirely on the latest Pine Script v6 architecture for peak execution speed and cross-device display stability. Indicator

Indicator

Indicator

KT_Global Bond Yields by CountryGlobal Bond Yields Indicator Summary
The Global Bond Yields by Country indicator, developed for Trading View (Pine Script v5), provides a comprehensive tool for visualizing and analyzing government bond yields across multiple countries and maturities. Below are its key features:
Features
Country Selection: Choose from 20 countries, including the United States, China, Japan, Germany, United Kingdom, and more, to display their respective bond yields.
Multiple Maturities: Supports 18 bond maturities ranging from 1 month to 40 years, allowing users to analyze short-term to long-term yield trends.
Customizable Display:
Toggle visibility for each maturity (1M, 3M, 6M, 1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 7Y, 8Y, 9Y, 10Y, 15Y, 20Y, 25Y, 30Y, 40Y) individually.
Option to show or hide all maturities with a single toggle for streamlined analysis.
10Y-2Y Yield Spread: Plots the difference between 10-year and 2-year bond yields, a key indicator of yield curve dynamics, with an option to enable/disable.
Zero Line Reference: Displays a dashed grey horizontal line at zero for clear visual reference.
Color-Coded Plots: Each maturity is plotted with a distinct color, ranging from lighter shades (short-term) to darker shades (long-term), for easy differentiation.
Country Label: Displays the selected country's name as a large, prominent label on the chart for quick identification.
Error Handling: Alerts users if an invalid country is selected, ensuring robust operation.
Data Integration: Fetches bond yield data from Trading View's database (e.g., TVC:US10Y) with support for ignoring invalid symbols to prevent errors.
This indicator is ideal for traders and analysts monitoring global fixed-income markets, yield curve shapes, and cross-country comparisons. Indicator

Indicator

Indicator

Indicator

Stock Value RainbowStock Valuation based on Book Value, Dividends, Cashflow, Earnings and Estimates and Money Multiplier
There are many ways to measure stock valuations: some methods are using book value, some are using dividends, some are using cashflow, some are using earnings and some using estimates data. Most of these valuation methods are based on multiplier effect which measure how many times the stock price could expand from their valuation base. This indicator attempts to unify all these measurements using just simple addition of all measurements such as: book value per share, dividend per share, cashflow per share, earning per share, and estimates of earning per share and then using multiplier effect to create beautiful rainbow to see how far the stock has growing up above or below their valuation base. The higher the stock price on rainbow spectrum means it is more expensive and the lower in the rainbow spectrum means it is cheaper. Here is the basic formula explanation:
SV = (BVPS + DPS + CFPS + EPS + EST) * MM
BVPS = Book Value Per Share (Asset - Liability)
DPS = Dividends Per Share
CFPS = Free Cash Flow Per Share
EPS = Earnings Per Share
EST = Estimates of EPS
MM = Money Multiplier (1x, 2x, ... ,10x)
- The gray line represents the stock value SV
- The rainbow above the gray line represents the multiplication factors from 1x, 2x, ..., 10x
- The rainbow below the gray line represents the division factors from 0.8x, 0.6x, ..., 0.2x
Check other script to value stock and index:
- Stock Value Rainbow: script to value stock based on book value, dividend, cash flow, earning and estimates.
- Index Value Rainbow: script to value index based on fed balance sheet and base money supply
- Gold Value Rainbow: script to value gold based on global money supply
- Stock Value US: script to check US stock value
- Stock Value EU: script to check EU stock value
- Stock Value JP: script to check JP stock value
- Stock Value CN: script to check CN stock value Indicator

Dividend Calendar (Zeiierman)█ Overview
The Dividend Calendar is a financial tool designed for investors and analysts in the stock market. Its primary function is to provide a schedule of expected dividend payouts from various companies.
Dividends, which are portions of a company's earnings distributed to shareholders, represent a return on their investment. This calendar is particularly crucial for investors who prioritize dividend income, as it enables them to plan and manage their investment strategies with greater effectiveness. By offering a comprehensive overview of when dividends are due, the Dividend Calendar aids in informed decision-making, allowing investors to time their purchases and sales of stocks to optimize their dividend income. Additionally, it can be a valuable tool for forecasting cash flow and assessing the financial health and dividend-paying consistency of different companies.
█ How to Use
Dividend Yield Analysis:
By tracking dividend growth and payouts, traders can identify stocks with attractive dividend yields. This is particularly useful for income-focused investors who prioritize steady cash flow from their investments.
Income Planning:
For those relying on dividends as a source of income, the calendar helps in forecasting income.
Trend Identification:
Analyzing the growth rates of dividends helps in identifying long-term trends in a company's financial health. Consistently increasing dividends can be a sign of a company's strong financial position, while decreasing dividends might signal potential issues.
Portfolio Diversification:
The tool can assist in diversifying a portfolio by identifying a range of dividend-paying stocks across different sectors. This can help mitigate risk as different sectors may react differently to market conditions.
Timing Investments:
For those who follow a dividend capture strategy, this indicator can be invaluable. It can help in timing the buying and selling of stocks around their ex-dividend dates to maximize dividend income.
█ How it Works
This script is a comprehensive tool for tracking and analyzing stock dividend data. It calculates growth rates, monthly and yearly totals, and allows for custom date handling. Structured to be visually informative, it provides tables and alerts for the easy monitoring of dividend-paying stocks.
Data Retrieval and Estimation: It fetches dividend payout times and amounts for a list of stocks. The script also estimates future values based on historical data.
Growth Analysis: It calculates the average growth rate of dividend payments for each stock, providing insights into dividend consistency and growth over time.
Summation and Aggregation: The script sums up dividends on a monthly and yearly basis, allowing for a clear view of total payouts.
Customization and Alerts: Users can input custom months for dividend tracking. The script also generates alerts for upcoming or current dividend payouts.
Visualization: It produces various tables and visual representations, including full calendar views and income tables, to display the dividend data in an easily understandable format.
█ Settings
Overview:
Currency:
Description: This setting allows the user to specify the currency in which dividend values are displayed. By default, it's set to USD, but users can change it to their local currency.
Impact: Changing this value alters the currency denomination for all dividend values displayed by the script.
Ex-Date or Pay-Date:
Description: Users can select whether to show the Ex-dividend day or the Actual Payout day.
Impact: This changes the reference date for dividend data, affecting the timing of when dividends are shown as due or paid.
Estimate Forward:
Description: Enables traders to predict future dividends based on historical data.
Impact: When enabled, the script estimates future dividend payments, providing a forward-looking view of potential income.
Dividend Table Design:
Description: Choose between viewing the full dividend calendar, just the cumulative monthly dividend, or a summary view.
Impact: This alters the format and extent of the dividend data displayed, catering to different levels of detail a user might require.
Show Dividend Growth:
Description: Users can enable dividend growth tracking over a specified number of years.
Impact: When enabled, the script displays the growth rate of dividends over the selected number of years, providing insight into dividend trends.
Customize Stocks & User Inputs:
This setting allows users to customize the stocks they track, the number of shares they hold, the dividend payout amount, and the payout months.
Impact: Users can tailor the script to their specific portfolio, making the dividend data more relevant and personalized to their investments.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes! Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator
