Asset Allocation CalculatorOverview
This script is a tool that automatically calculates asset allocation for your investment portfolio. Users can set the weight of multiple assets and monitor the portfolio value in real time based on price fluctuations.
Key Features
Supports input of asset allocation percentages
Dynamic allocation calculation based on real-time price data
Automatically calculates allocated amounts for each asset based on the total investment amount
User-friendly interface with intuitive visual feedback
Settings
Total Capital : Enter the total capital, including the value of assets.
Quantity rounding : Using the rounding function may cause the target allocation to exceed 100%.
Tickers, Weight, Holdings :
To retrieve accurate asset prices, specify both the exchange and the ticker.
If you want to include cash in your portfolio, use $.
Ensure that the total allocation sums to 100%.
Refer to the pre-filled example for the correct format.
Table Settings : You can adjust the table's position, height, font size, and background color.
How to Use
By buying or selling the quantity shown in the Buy column, you can continuously maintain your target allocation.
Hold - Current holdings
Buy - Quantity to buy or sell to reach the target allocation
Target - Quantity aimed for after buying or selling
Caution
It can only calculate for a single currency, so do not mix multiple currency markets.
자산 배분 계산기
소개
이 스크립트는 투자 포트폴리오의 자산 배분을 자동으로 계산해주는 도구입니다. 사용자는 여러 자산의 비중을 설정할 수 있으며, 가격 변동에 따라 포트폴리오 가치를 실시간으로 모니터링할 수 있습니다.
주요 기능
자산 배분 비율 입력 지원
실시간 가격 데이터를 기반으로 한 동적 배분 계산
총 투자 금액을 기준으로 각 자산에 할당된 금액 자동 계산
직관적인 시각적 피드백을 제공하는 사용자 친화적인 인터페이스
설정
Total Capital : 자산 가치를 포함한 총 자본금을 입력하세요.
Quantity rounding : 반올림 기능을 사용하면 목표 비중이 100%를 초과할 수 있습니다.
Tickers, Weight, Holdings :
정확한 자산 가격을 불러오기 위해 거래소와 티커를 함께 입력하세요.
포트폴리오에 현금을 포함하려면 '$'를 사용하세요.
비중 합계가 반드시 100%가 되도록 설정하세요.
예제 형식을 참고하여 올바르게 입력하세요.
한국(원화) 시장을 위한 입력 예시입니다.
KRX:360750, 17.5, 100
KRX:310960, 17.5, 120
KRX:148070, 25, 20
KRX:305080, 25, 10
KRX:139320, 10, 150
UPBIT:BTCKRW, 5, 0.002
$,0,5000000
Table Settings : 테이블의 위치, 높이, 글자 크기 및 배경색을 조정할 수 있습니다.
사용 방법
Buy 열에 표시된 수량만큼 매수 또는 매도하면 목표 비중을 지속적으로 유지할 수 있습니다.
Hold - 현재 보유 수량
Buy - 목표 비중을 맞추기 위해 매수 또는 매도해야 하는 수량
Target - 매수, 매도 후 목표로 하는 수량
주의
한 가지 통화로만 계산할 수 있으니 여러 통화 시장을 혼용하지 마세요.
Asset
Multi-Asset & TF RSI
Multi-Asset & TF RSI
This indicator allows you to compare the Relative Strength Index (RSI) values of two different assets across multiple timeframes in a single pane. It’s ideal for traders who wish to monitor momentum across different markets or instruments simultaneously.
Key Features:
Primary Asset RSI:
The indicator automatically calculates the RSI for the chart’s asset. You can adjust the timeframe for this asset using a dropdown that offers standard TradingView timeframes, a "Chart" option (which syncs with your current chart timeframe), or a "Custom" option where you can enter any timeframe.
Optional Second Asset RSI:
Enable the “Display Second Asset” option to compare another asset’s RSI. Simply select the symbol (default is “DXY”) and choose its timeframe from an identical dropdown. When enabled, the second asset’s RSI is computed and plotted for easy comparison.
RSI Settings:
Customize the RSI length and choose the data source (e.g., close price) to suit your trading strategy.
Visual Aids:
Overbought (70) and oversold (30) levels are clearly marked, along with a midline at 50. These visual cues help you quickly assess market conditions.
Asset Information Table:
A dynamic table at the top of the pane displays the symbols being analysed – the chart’s asset as the “1st” asset and, if enabled, the second asset as the “2nd.”
How to Use:
Apply the Indicator:
Add the indicator to your chart. By default, it will calculate the RSI for the chart’s current asset using your chart’s timeframe.
Adjust Primary Asset Settings:
Use the “Main Asset Timeframe” dropdown to choose the timeframe for the RSI calculation on the chart asset. Select “Chart” to automatically match your current chart’s timeframe or choose a preset/custom timeframe.
Enable and Configure the Second Asset:
Toggle the “Display Second Asset” option to enable the second asset’s RSI. Select the asset symbol and its desired timeframe using the provided dropdown. The RSI for the second asset will be plotted if enabled.
Monitor the RSI Values:
Observe the plotted RSI lines along with the overbought/oversold levels. Use the table at the top-centre of the pane to verify which asset symbols are being displayed.
This versatile tool is designed to support multi-asset analysis and can be a valuable addition to your technical analysis toolkit. Enjoy enhanced RSI comparison across markets and timeframes!
Happy Trading!
Multi Asset & TF Stochastic
Multi Asset & TF Stochastic
This indicator allows you to compare the stochastic oscillator values of two different assets across multiple timeframes in a single pane. It’s designed for traders who want to analyse the momentum of one asset (by default, the chart’s asset) alongside a second asset of your choice (e.g., comparing EURUSD to the USD Index).
How It Works:
Main Asset:
The indicator automatically uses the chart’s asset for the primary stochastic calculation. You have the option to adjust the timeframe for this asset using a dropdown that includes TradingView’s standard timeframes, a "Chart" option (which automatically uses your chart’s timeframe), or a "Custom" option where you can type in any timeframe.
Second Asset:
You can enable the display of a second asset by toggling the “Display Second Asset” option. Choose the asset symbol (default is “DXY”) and select its timeframe from an identical dropdown. When enabled, the script calculates the stochastic oscillator for the second asset, allowing you to compare its momentum (%K and %D lines) with that of the main asset.
Stochastic Oscillator Settings:
Customize the %K length, the smoothing period for %K, and the smoothing period for %D. Both assets’ stochastic values are calculated using these parameters.
Visual Display:
The indicator plots the %K and %D lines for the main asset in prominent colours. If the second asset is enabled, its %K and %D lines are also plotted in different colours. Additionally, overbought (80) and oversold (20) levels are marked, with a midline at 50, making it easier to gauge market conditions at a glance.
%D line can be toggled off for a cleaner view if required:
Asset Information Table:
A table at the top-centre of the pane displays the active asset symbols—ensuring you always know which assets are being analysed.
How to Use:
Apply the Indicator:
Add the script to your chart. By default, it will use the chart’s current asset and timeframe for the primary stochastic oscillator.
Adjust the Main Asset Settings:
Use the “Main Asset Timeframe” dropdown to select a specific timeframe for the main asset or stick with the “Chart” option for automatic syncing with your current chart.
Enable and Configure the Second Asset (Optional):
Toggle on “Display Second Asset” if you wish to compare another asset. Select the desired symbol and adjust its timeframe using the provided dropdown. Choose “Custom” if you need a timeframe not listed by default.
Review the Plots and Table:
Observe the stochastic %K and %D lines for each asset. The overbought/oversold levels help indicate potential market turning points. Check the table at the top-centre to confirm the asset symbols being displayed.
This versatile tool is ideal for traders who rely on momentum analysis and need to quickly compare the stochastic signals of different markets or instruments. Enjoy seamless multi-asset analysis with complete control over your timeframe settings!
Portfolio Tracker [Anan]█ OVERVIEW
A simple Portfolio Tracker to track your Profit/Loss for any ticker in any market (stock, futures, index, forex, crypto, fund, dr.).
You just need to input (Asset / Quantity / Avg. Buy/Sell Price) and the script will calculate everything.
Also, you can use it for paper trading, or even what-if cases..
█ FEATURES
- Up to 10 positions
- Track your position real-time price and 24H change %
- Calculate your position current value
- Calculate your position cost value
- Calculate Profit/Loss
- Calculate Profit/Loss %
- Change every color in the table as you like.
Random Synthetic Asset GenerationThis script generates pseudo-random asset data . Due to the nature of the random generator, it is impossible to use this indicator as input for other indicators because the instance of the script that the indicator is applied to will automatically be different from the instance that is plotted on the chart. Therefore, the idea is to use this script in other scripts (to make it possible to backtest on random data, for example).
The script has four main input parameters.
Random Number Generator Method: It supports two methods for generating the pseudo-random numbers (one by Ricardo Santos and one by Wichmann-Hill).
Seed: You can specify the seed to use. Each unique seed will generate a unique set of pseudo-random data.
Intrabar Volatility: This basically sets how volatile the generated wicks will be (0 = no wicks).
Price Multiplier: This is just a multiplier for the generated price data, so that you can scale up or down the generated price data.
You can also change the colors of the bars.
In addition to this, the indicator also generates random volume. In order to make it possible to show both volume and price, you need to have two identical instances of the indicator. One on the chart, and one in its own panel. Then, go into the Style tab in the indicator settings on the instance in the panel. Untick Up-Candles and Down-Candles boxes, and tick the Volume box.
In a similar manner, you can also plot the true range data and the candle change data as well, by ticking one of those boxes instead.