Modern Portfolio TheoryModern Portfolio Theory
The indicator is designed to apply the principles of Modern Portfolio Theory, a financial theory developed by Harry Markowitz. MPT aims to maximize portfolio returns for a given level of risk by diversifying investments.
User Inputs:
Users can customize various parameters, including the bar scale, risk-free rate, and the start year for the portfolio. Additionally, users can assign weights to different assets (symbols) in the portfolio.
Asset Selection:
Users can choose up to 10 different symbols (assets) for the portfolio. The script supports a variety of symbols, including cryptocurrencies such as BTCUSD and ETHUSD.
Weights and Allocation:
Users can assign weights to each selected asset, determining its percentage allocation in the portfolio. The script calculates the total portfolio weight to ensure it equals 100%. If total portfolio weight is lower then 100% you will see orange color with additional cash % bellow
If total portfolio weight is bigger then 100% you will see red big % warning.
Warning: (Total Weight must be 100%)
Cash Mode:
Risk and Return Calculation:
The script calculates the daily returns and standard deviation for each selected asset. These metrics are essential for assessing the risk and return of each asset, as well as the overall portfolio.
Scatter Plot Visualization:
The indicator includes a scatter plot that visualizes the risk-return profile of each asset. Each point on the plot represents an asset, and its position is determined by its risk (X-axis) and return (Y-axis).
Portfolio Optimization:
The script calculates the risk and return of the overall portfolio based on the selected assets and their weights. Based on the selected assets and their weights user can create optimal portfolio with preferable risk and return.
It then plots the portfolio point on the scatter plot, indicating its risk-return profile.
Additional Information:
The indicator provides a table displaying information about each selected asset, including its symbol, weight, and total portfolio weight. The table also shows the total portfolio weight and, if applicable, the percentage allocated to cash.
Visualization and Legend:
The script includes visual elements such as a legend, capital allocation line (CAL), and labels for risk-free rate and key information. This enhances the overall understanding of the portfolio's risk and return characteristics.
User Guidance:
The script provides informative labels and comments to guide users through the interpretation of the scatter plot, risk-return axes, and other key elements.
Interactivity:
Users can interact with the indicator on the TradingView platform, exploring different asset combinations and weightings to observe the resulting changes in the portfolio's risk and return.
In summary, this Pine Script serves as a comprehensive tool for traders and investors interested in applying Modern Portfolio Theory principles to optimize their portfolio allocations based on individual asset characteristics, risk preferences, and return
Portfolio management
Annualized ReturnThis is a straightforward tool for investors, offering the capability to select a specific start date and visualize the annualized return of the currently displayed asset.
Annualized return is a crucial metric for investors, as it provides a standardized measure of an investment's performance, making it easier to compare different investments. By annualizing returns, investors can gain insights into the average yearly growth rate of their investments, enabling more informed decision-making and portfolio management .
Selecting various start dates enables users to understand how market timing can influence the success of their investments.
The annualized return is calculated using the following formula :
AnnualizedReturn = (Ending price / Beginning price) ^ (1 / Number of Years) − 1
Leveraged Share Decay Tracker [SS]Releasing this utility tool for leveraged share traders and investors.
It is very difficult to track the amount of decay and efficiency that is associated with leveraged shares and since not all leveraged shares are created equally, I developed this tool to help investors/traders ascertain:
1. The general risk, in $$, per share associated with investing in a particular leveraged ETF
2. The ability of a leveraged share to match what it purports to do (i.e. if it is a 3X Bull share, is it actually returning consistently 3X the underlying or is there a large variance?)
3. The general decay at various timepoints expressed in $$$
How to use:
You need to be opened on the chart of the underlying. In the example above, the chart is on DIA, the leveraged share being tracked is UDOW (3X bull share of the DOW).
Once you are on the chart of the underlying, you then put in the leveraged share of interest. The indicator will perform two major assessments:
1. An analysis of the standard error between the underlying and the leveraged share. This is accomplished through linear regression, but instead of creating a linreg equation, it simply uses the results to ascertain the degree of error associated at various time points (the time points are 10, 20, 30, 40, 50, 100, 252).
2. An analysis of the variance of returns. The indicator requires you to put in the leverage amount. So if the leverage amount is 3% (i.e. SPXL or UPRO is 3 X SPY), be sure that you are putting that factor in the settings. It will then modify the underlying to match the leverage amount, and perform an assessment of variance over 10, 20, 30, 40, 50, 100, 252 days to ensure stability. This will verify whether the leveraged ETF is actually consistently performing how it purports to perform.
Here are some examples, and some tales of caution so you can see, for yourself, how not all leveraged shares are created equal.
SPY and SPXL:
SPY and UPRO:
XBI and LABU (3 x bull share):
XBI and LABD (3 x bear share):
SOX and SOXL:
AAPL and AAPU:
It is VERY pivotal you remember to check and adjust the Leveraged % factor.
For example, AAPU is leveraged 1.5%. You can see above it tracks this well. However, if you accidently leave it at 3%, you will get an erroneous result:
You can also see how some can fail to track the quoted leveraged amount, but still produce relatively lower risk decay.
And, as a final example, let's take a look at the worst leveraged share of life, BOIL:
Trainwreck that one. Stay far away from it!
The chart:
The chart will show you the drift (money value over time) and the variance (% variance between the expected and actual returns) over time. From here, you can ascertain the general length you feel comfortable holding a leveraged share. In general, for most stable shares, <= 50 trading days tends to be the sweet spot, but always check the chart.
There are also options to plot the variances and the drifts so you can see them visually.
And that is the indicator! Kind of boring, but there are absolutely 0 resources out there for doing this job, so hopefully you see the use for it!
Safe trades everyone!
[Suitable Hope] Crypto Marketcap Dominance OverviewThe Crypto Marketcap Dominance Overview indicator is a simple yet very useful indicator that aims at helping traders identify where the crypto liquidity is flowing. The indicator uses Cryptocap's real time crypto marketcap dominance data (in %) between several key categories:
- Bitcoin
- True total 2 (altcoins and Ethereum excluding the top 3 biggest stablecoins)
- True total 3 (altcoins excl. Ethereum and the top 3 biggest stablecoins)
- Ethereum
- Stablecoins
- Defi.
The indicator works across all timeframes but is best used on the default daily timeframe to identify changes in liquidity trends between the different categories. More categories can be expected to be added in the future; depending on Cryptocap's available data.
Traders or users of this indicator have a selections of options:
- Choose a dedicated timeframe
- Turn on/off the individual categories they wish to use
- Turn on/off labels
- Change global colour coding of each category and label
- Activate or deactive the 0 to 100% bands
Although there are a couple of similar indicators trying to do something similar, I tend to find them lacking clarity. I coded this indicator to provide a more simple and clearer view of the crypto marketcap dominance. I hope you find this indicator helpful.
Happy trading and good luck!
Total Value and Profit for Multiple StocksThis Pine Script code example can be useful for traders and investors who want to monitor and analyze multiple stocks simultaneously on the TradingView platform. Here's a description of how the code can be used and what it is useful for:
1. **Monitoring Multiple Stocks:** The code allows users to input data for up to 10 different stocks, including stock symbols, purchase prices per share, and the number of shares they own. This makes it easy to monitor their portfolio of multiple stocks in one place.
2. **Total Value and Profit:** For each of the entered stocks, the code calculates the total value of the holdings (number of shares multiplied by the current price) and displays it as a label on the chart. It also calculates the profit (or loss) by subtracting the purchase price from the current price per share and multiplying it by the number of shares. This provides traders with a quick overview of how much money they have invested and how much they have earned or lost.
3. **Monitoring Daily Movements:** The code also displays information about the day's price movements, including the lowest and highest prices for the current trading session. It also calculates the price difference since the last closing, providing insight into how the stocks are performing compared to the previous trading day.
4. **Color Coding for Profit/Loss:** The labels displayed on the chart are color-coded. They appear in green if there's a profit and in red if there's a loss. This makes it easy to identify how each stock in the portfolio is performing.
5. **Quick Identification:** With this code, users can quickly identify and focus on the stocks that require attention. They can see which stocks are yielding profits and which are incurring losses, as well as get an overview of the entire portfolio at a glance.
In essence, this code provides traders and investors with the ability to monitor and analyze multiple stocks simultaneously, allowing them to make informed decisions about their portfolio's performance and any adjustments that may need to be made. It also offers a visual way to assess profit or loss for each stock, which can be valuable for risk management and strategy development.
Altcoin ManagerThe Altcoin Manager is a comprehensive script for identifying the current altcoin narrative by tracking and analyzing of a wide array of altcoins across various blockchain layers and categories, such as DeFi, GameFi, AI, and Meme coins. Ideal for traders looking to get a broad yet detailed view of the altcoin market, covering various sectors and chains.
The Key Features:
Versatile Asset Tracking:
Tracks 40 different cryptocurrencies (as of publishing) across different categories, allowing for a diversified and detailed analysis of the altcoin market.
Customizable Assets and Category Analysis:
Select 20 of your own coins across 4 different categories such as DeFi, GameFi, AI, and Meme coins as well as specifying their individual chains.
Dynamic Layer and Chain Analysis:
Includes options to plot and analyze specific blockchain layers and chains such as Ethereum Chain, Solana Chain, BNB Smart Chain, Arbitrum Chain, and Polygon Chain. The script associates various assets with specific blockchains, providing a clearer picture of how different segments of the altcoin market are performing.
Cumulative and Per-Candle Change:
Switch between viewing the total cumulative change since a set start date or the per-candle change, offering flexibility in analyzing price movements over different timeframes.
Denomination Adjustment:
Includes a functionality to denominate asset prices in other currencies or crypto such as BTC, allowing for a more tailored financial analysis according to your preference.
Moving Averages for Categories and Chains:
Calculates and plots moving averages for each category and chain, aiding in the identification of trends over the selected moving average length.
How do I use it?
This script is not used with any particular chart. Instead, assign it it's own tab and layout.
For a clearer analysis, use multiple different panels to track Categories and Chains separately, both Cumulative for a longer term analysis and Per-Candle to find ongoing breakouts and changes in trend.
You can either use the pre-selected altcoins to represent the market, or you can select your own.
The Layer 1 and Layer 2 are not customizable but consists of 15 popular Layer 1 incl Bitcoin, Ethereum, Solana etc. Layer 2 consists of 5 popular Layer 2.
Scale In : Scale OutScale In : Scale Out strategy is an adaptation and extension of dollar-cost-averaging.
As the name implies it not only scales in - allocates a given percentage of available capital to buy at each bar - it also scales out - sells a given percentage of holdings at each bar when a target profit level is reached.
The strategy can potentially mitigate risks associated with market timing.
Although dollar-cost-averaging is often recommended as a strategy for building a position, the management of taking and retaining profits is not often addressed. This strategy demonstrates the potential benefits of managing both the building and (full or partial) liquidation of an investment.
We do not provide any mechanism for managing stop losses. We assume a scale in/out strategy will typically be applied to investing in assets with a high conviction thesis based on criteria external to the strategy. If the strategy does not perform, then the thesis may need to be re-evaluated, and the position liquidated. Even in this case, scaling out should still be considered.
S&P500 Investment AverageThis script lets you choose the best time to invest in the S&P 500, thanks to a line showing an average growth of 8.32% over 50 years, starting from the price of $86.84 on January 1, 1974.
Thanks to this line indicating the price of the S&P 500 based on the average growth of the index. You'll be able to tell when the index is overvalued or undervalued.
When the price is below 20% of the line, it's a good time to invest your cash for the crash. And when it's back in the black, it's time to reduce your DCA.
You can also specify a specific date in the settings to watch the percentage whenever you like.
ATH adjusted by Global Money SupplyHi all,
Hereby a script that calculated the ATH that is corrected by the global money supply. It shows that regular ATH (based on high daily candles) as well as the ATH that is adjusted by the global money supply index.
The global money supply index is calculated using the money supply on the first bar and this is then used as the reference point for the money supply in the script. The money supply is based on a lot of central banks money supplies and calculated to a USD value.
Central Bank Liquidity YOY % ChangeThis shows the percent change from a year ago (YOY%) in Central Bank Liquidity
It's important to the study rate of change data in this liquidity metric and compare it to the nominal chart.
When this chart is accelerating, liquidity is being added, meaning it's a good time to be in assets.
When this chart is declining, liquidity is being removed, meaning it's a good time to be in cash.
Bottoms in markets coincide with the rate of change of liquidity going from negative (below the zero line) to positive (above zero)
Central Bank Liquidity = Total value of the assets of all Federal Reserve Banks - Overnight Reverse Repurchase Agreements (RRP) - The Treasury General Account (TGA)
Value of my assetIndicator Name: Value of my asset
This indicator displays the total value of the asset you hold on a chart. It is particularly useful for tracking the value of your position in real time directly on the chart.
How to use it:
Quantity of the asset in possession: Enter the quantity of the asset you currently hold. By default, this value is 0.
Text color: Choose the color of the text that will be displayed on the chart. By default, this color is white.
Background color: Choose the background color of the label that will be displayed on the chart. By default, this color is blue.
Calculation of the value to display: The value to display is calculated by multiplying the closing value (close) by the quantity of the asset you hold (quantity). This value represents the total value of your position.
Display of the label: A label is displayed on the chart with the symbol of the asset, the quantity you hold, and the total value of your position. This label is updated with each new bar.
Yearly Return [%] - VisualizedCalculates the % Return from the first trading candle of any given year, and shows the % Return at that year end.
Portfolio TableA tool to manage your invested assets (stocks, crypto currencies, ...).
- Show profit of every asset as well as the total profit.
- Show/hide a bought price line on the chart if the current selected ticker is on your portfolio.
Trade Information BoxThis script is a TradingView indicator written in Pine Script. It creates an information box on the chart that provides details related to a trade, including entry plan, stop loss, take profit, and position sizing. Let's break down the components:
1. **Input Parameters:**
- `entryPrice`: The entry price for the trade. This is a manually input value, and the default is set to 100.
- `smaLength`: The length parameter for the Simple Moving Average (SMA) calculation. Default is set to 20.
- `smaMultiplier`: The multiplier used to calculate the stop loss and take profit based on the SMA. Default is set to 1.5.
- `riskPerTradePercent`: The percentage of risk per trade as a decimal. Default is set to 2.
- `capital`: The total capital available for trading. Default is set to 10,000.
2. **Calculations:**
- `smaValue`: Calculates the Simple Moving Average based on the closing prices with the specified length (`smaLength`).
- `stopLoss`: Calculates the stop loss level by subtracting the product of the SMA value and the multiplier (`smaMultiplier`) from the entry price.
- `takeProfit`: Calculates the take profit level by adding the product of the SMA value and the multiplier (`smaMultiplier`) to the entry price.
- `riskPerTrade`: Calculates the actual risk amount per trade based on the specified percentage of capital.
- `maxQuantity`: Calculates the maximum quantity of shares or contracts that can be bought based on the specified risk percentage and the difference between entry price and stop loss.
- `buyValue`: Calculates the total value of the position based on the maximum quantity and entry price.
3. **Info Box:**
- `labelBox`: Defines a label box on the chart.
- `label.set_xy(labelBox, bar_index, high)`: Sets the position of the label box to the high of the current bar.
- `label.set_text(...)`: Defines the text content of the label box, providing details on the trading plan, entry, stop loss, take profit, capital, risk per trade, maximum quantity, and buy value.
Overall, this indicator is designed to provide traders with key information related to their trade plan, risk management, and position sizing directly on the chart. The displayed values are formatted with three decimal places for clarity.
CAPM Calculator [TrendX_]CAPM calculator is a powerful tool that helps find the cost of equity, which is the minimum return that shareholders require to invest in a company.
With the CAPM calculator, you can assess how well your trading strategy performs compared to the market. The goal of your strategy is to earn higher returns than what you would get by investing in the market with the same level of risk. This is called the risk-adjusted cost of capital, and it represents the minimum return that you should accept for your investment.
USAGE
A simple way to measure this is to compare the Compound annual growth rate (CAGR) of the trading strategy with the “Compound CAPM”, which is the CAGR of investing in the market with the same beta as the strategy.
If the trading strategy has a higher CAGR than the “Compound CAPM”, it means that it has outperformed the market on a risk-adjusted basis.
This is a sign of an effective trading strategy.
DISCLAIMER
The results achieved in the past are not all reliable sources of what will happen in the future. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.
Therefore, you should always exercise caution and judgment when making decisions based on past performance.
Custom Lot Size Table with Calculator This TradingView script, is designed to empower traders with precise risk management tools. It allows for input of key parameters such as account balance, desired risk percentage, and a range for stop-loss pips, ensuring that the lot sizes calculated are perfectly aligned with risk tolerances.
The script dynamically adjusts the table size based on the user's input, offering a clear and concise visualization of the appropriate lot sizes..
Anchored Chandelier ExitThe Chandelier Exit is a popular tool among traders used to help determine appropriate stop loss levels. Originally developed by Chuck LeBeau, the Chandelier Exit takes into account market volatility and adjusts the stop loss level dynamically. This indicator builds upon the original Chandelier Exit by allowing the trader to select an anchor date or starting point for the indicator to begin calculating from.
The Original Chandelier Exit
Before we get into the details of the Anchored Chandelier Exit, let's review the original. Essentially a dynamic ATR stop loss, the Chandelier Exit provides a trailing stop that moves higher or lower based on volatility.
The Chandelier Exit is calculated based on the following criteria:
🔶ATR - The ATR is used to measure the volatility of a security over a lookback period. The ATR length determines the number of bars to consider when calculating the average true range. The shorter the length, the more responsive the level will be.
🔶ATR Multiplier - The default multiplier is set to 3. This is used to determine the sensitivity of the Chandelier Exit. The higher the ATR multiplier the wider the stop levels will be. A lower multiplier will tighten stop levels.
🔶Highest / Lowest Points - Determine the highest high (bullish trade) or lowest low (bearish trade) during the lookback period. The default length is 22 bars.
Calculating the Chandelier Exit
Bullish trades - Highest High - ATR * Multiplier
Bearish trades - Lowest Low + ATR * Multiplier
The Anchored Chandelier Exit
The Anchored Chandelier Exit is a new twist on the original, allowing traders to adapt their stop loss levels based on specific market events, levels or bars.
Similar to the original, traders can select the ATR length and multiplier, however, the high or low from which the ATR is subtracted or added is first determined at the anchor bar.
As new bars form, the indicator checks for the previous high/low to be breached. If the high or low is exceeded, the highest/lowest point is updated and the Chandelier Exit is recalculated.
When the indicator is first loaded to your chart, it will ask you to select an anchor bar and choose the bias for the trade.
A bullish (long) bias trade will plot the Chandelier Exit below price action, while a bearish (short) bias trade will plot the Chandelier Exit above price action.
Indicator Features
🔶Custom Start Date
🔶Bullish or Bearish Bias
🔶Selectable ATR Length & Multiplier
🔶Custom Colors
🔶Exit With Close or Wicks
🔶Exit Alerts
With careful parameter optimization, the Anchored Chandelier Exit can be a useful tool for helping traders manage risk based on market volatility.
MACD of Relative Strenght StrategyMACD Relative Strenght Strategy :
INTRODUCTION :
This strategy is based on two well-known indicators: MACD and Relative Strenght (RS). By coupling them, we obtain powerful buy signals. In fact, the special feature of this strategy is that it creates an indicator from an indicator. Thus, we construct a MACD whose source is the value of the RS. The strategy only takes buy signals, ignoring SHORT signals as they are mostly losers. There's also a money management method enabling us to reinvest part of the profits or reduce the size of orders in the event of substantial losses.
RELATIVE STRENGHT :
RS is an indicator that measures the anomaly between momentum and the assumption of market efficiency. It is used by professionals and is one of the most robust indicators. The idea is to own assets that do better than average, based on their past performance. We calculate RS using this formula :
RS = close/highest_high(RS_Length)
Where highest_high(RS_Length) = highest value of the high over a user-defined time period (which is the RS_Length).
We can thus situate the current price in relation to its highest price over this user-defined period.
MACD (Moving Average Convergence - Divergence) :
This is one of the best-known indicators, measuring the distance between two exponential moving averages : one fast and one slower. A wide distance indicates fast momentum and vice versa. We'll plot the value of this distance and call this line macdline. The MACD uses a third moving average with a lower period than the first two. This last moving average will give a signal when it crosses the macdline. It is therefore constructed using the values of the macdline as its source.
It's important to note that the first two MAs are constructed using RS values as their source. So we've just built an indicator of an indicator. This kind of method is very powerful because it is rarely used and brings value to the strategy.
PARAMETERS :
RS Length : Relative Strength length i.e. the number of candles back to find the highest high and compare the current price with this high. Default is 300.
MACD Fast Length : Relative Strength fast EMA length used to plot the MACD. Default is 14.
MACD Slow Length : Relative Strength slow EMA length used to plot the MACD. Default is 26.
MACD Signal Smoothing : Macdline SMA length used to plot the MACD. Default is 10.
Max risk per trade (in %) : The maximum loss a trade can incur (in percentage of the trade value). Default is 8%.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. Default is 400, meaning that for each $400 gain or loss, the order size is increased or decreased by a user-selected amount.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot has been used to test the different parameters and determine which ones maximize return while limiting drawdown. This strategy is the most optimal on BITSTAMP:ETHUSD in 8h timeframe with the parameters set by default.
ENTER RULES :
The entry rules are very simple : we open a long position when the MACD value turns positive. You are therefore LONG when the MACD is green.
EXIT RULES :
We exit a position (whether losing or winning) when the MACD becomes negative, i.e. turns red.
RISK MANAGEMENT :
This strategy can incur losses, so it's important to manage our risks well. If the position is losing and has incurred a loss of -8%, our stop loss is activated to limit losses.
MONEY MANAGEMENT :
The fixed ratio method was used to manage our gains and losses. For each gain of an amount equal to the value of the fixed ratio, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy increases both performance and drawdown.
Enjoy the strategy and don't forget to take the trade :)
Ceres Trader Position and Risk Management ToolNOTE: It won't properly scale until you enter an entry point that is located on the chart. It's a feature not a bug. After that, you will see the entry, s/l, and target price lines properly displayed on the chart.
The "Ceres Trader Position and Risk Management Tool" is a comprehensive indicator designed for TradingView, meticulously crafted for traders who prioritize effective risk management and clear position visualization. This tool seamlessly integrates with your trading strategy, providing crucial information about your trades directly on your chart.
Key Features:
Position Type Visualization: Displays long or short positions with distinct color-coded lines and boxes for easy recognition.
Entry, Stop Loss, and Target Levels: Visual markers for entry price, stop loss, and target price, enabling you to track your trade setup at a glance.
Risk Assessment: Calculates and displays the amount at risk based on the stop loss distance and the percentage of risk capital.
Profit Potential: Shows the potential profit in dollar terms if the target is reached, helping you understand the reward prospects of your trade.
Reward to Risk Ratio: Indicates the ratio of potential reward to risk, an essential metric for evaluating the efficiency of your trade setup.
Current P&L Tracking: Continuously updates the open profit and loss based on the current market price, giving you real-time insight into your trade's performance.
Customizable Risk and Reward Boxes: Allows personalization of the risk and reward zones with color options, enhancing chart clarity and visual appeal.
How to Use:
Setting Up Your Trade:
Input your trade details including position type (long or short), entry price, risk capital, risk percentage, reward-risk ratio, and stop loss distance.
Visualize Your Trade:
The tool will automatically plot the entry, stop loss, and target prices on the chart.
Risk and reward areas will be highlighted with customizable color boxes.
Monitor Your Risk and Reward:
View the amount risked and potential profit in dollar terms directly on the chart.
Keep track of the reward to risk ratio to assess trade efficiency.
Stay Informed of Real-time Performance:
The current P&L of your open position will be updated in real-time, helping you make informed decisions.
This tool is ideal for traders who follow disciplined risk management practices and want to keep essential trade information easily accessible. With the "Ceres Trader Position and Risk Management Tool," you are equipped to make strategic trading decisions backed by clear visual cues and critical data.
Capital Accumulation Plan (CAP) Simulator 2.0Description:
This indicator serves as a simulation tool for the Capital Accumulation Plan (CAP). The CAP is an investment strategy involving regular contributions of a fixed amount at consistent intervals, regardless of market fluctuations. This simulator allows you to visualize how your invested capital might grow over time, considering a fixed monthly investment in a given financial instrument.
How to Use:
Customize the monthly investment amount, the day of the month for the investment, and the simulation period. Also, input the percentage of taxation on potential dividends and the Total Expense Ratio (TER) of the financial instrument. The indicator calculates the portfolio value over time, the invested capital, and the average cost. If applicable, it also calculates the dividend amounts over time and the corresponding taxes to be paid.
The indicator displays how these metrics would change over time following the PAC strategy.
Important Notes:
Apply exclusively to the daily chart; a fix for the chosen day absence will be implemented shortly.
EntryPrice Gain&Loss IndicatorThis indicator takes (1) an entry price or average position price and (2) position size (denominator) to calculate current gain or loss and returns those as well as the position change in percent. It will also draw into the Chart and show relevant data in a table.
It is mainly supposed to help tracking an (average) spot position easily.
It is recommended to switch it to invisible when switching to other charts.
You can also use several instances of the indicator to track your positions in different assets.
Features:
- table position and text size can be adjusted
- colors can be changed
(recommending 25% opacity for plot backgrounds)
- several instances possible
(recommended to tuen indicator invisible when switching to other charts or analyzing
Version 1.0
Trailing stopHi all!
This script helps to alert you when a trailing stop is hit. More specifically it alerts you when the low of the candle crosses below your trailing stop. A trailing stop follows a price positive movements. It raises your stop when price goes up, but keeps it at the same level if price goes down, so it "locks" in your profit. You define your long entry bar and choose one of the following methods for the stop:
ATR
The Average True Range (ATR) is popular to trail stops. The trailing stop is raised by the low minus the ATR (times a factor that can be set under the settings for ATR).
EMA
The Exponential Moving Average (EMA) can be used to trail your stop. When the low goes below the EMA an alert is sent about the stop. Its length can be set in the settings.
SMA
The Simple Moving Average (SMA) can be used to trail your stop. When the low goes below the SMA an alert is sent about the stop. Its length can be set in the settings.
Source
An external source can be useful as a stop signal. You can use this option that will stop you out when the signal returns anything else than "na". E.g. if you want a stop when KivancOzbilgic script "SuperTrend" () turns red, you set the source to "Supertrend: Down Trend". This option will not draw pretty things on the chart, but it will alert you!
Please note that this is for long entries only.
Best of trading luck!
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!