INVITE-ONLY SCRIPT
업데이트됨 Cyatophilum Smart rebalance strategy

An indicator to backtest and create automated Smart Rebalance strategies.
The strategy tries to beat holders while keeping your portfolio repartition stable.
Configure the indicator to receive alerts for several pairs at a choosen rebalance time frame.
═════════════════════════════════════════════════════════════════════════
█ HOW IT WORKS
Here is an example:

The user chooses a certain number of pairs, up to 4 pairs for now. An initial capital, a fees % and a rebalance time frame.
The capital is split equally between each pair. (ex. for 2 pairs: 50% on each).
On each rebalance time frame (on the bar it happens), pairs balance who grew bigger than 50% will be redistributed to other pairs, making sure that after the transaction, the total capital is once again split equally through all pairs. This means selling pairs whose price went higher than the others, and buying those who dropped. In other words, selling high and buying low.
On each interval, the strategy will send orders for each pair saying whether to buy or to sell, and the quantity.
█ HOW TO USE
Creating a strategy
When adding the indicator to the chart, you must confirm the pairs you want to use, the rebalance time frame, the initial capital and commission fees.
The inital capital corresponds to the quote currency of all pairs, so each pair must have the same quote currency. (ex: USDT or BTC markets)
It will also be asked to select a "Strategy Start Date", which is the starting point of your strategy. Select the current bar if you want to start a strategy and get accurate order quantities. Otherwise, select a bar in the past for backtesting.
When setting the "Strategy Start Date" to the current day, it will look like this:

The strategy equity is equal to the intial capital, and no order has happened yet, the backtest panel shows 0%.
The first rebalance will happen at the next interval: here the 15th november.

Since this is the first rebalance, the strategy buys each pair with the same quantity in quote currency value.
After 1 rebalance, the strategy equity drops a little, since we only bought and paid fees.
Backtesting
Since the strategy is trading several pairs, the Strategy Tester cannot really be used. This is why the indicator has a backtest panel and a equity line plot that shows the progress of the strategy.

This view can be replicated by disabling the labels in the style tab.
You can also use the Data Window to track the strategy pairs balances on each bar.
Creating Alerts
The indicator is using the alert() calls: it only uses 1 alert slot to send order messages for each pair.
To set your alert messages, open the indicator settings.
You can use the placeholders {pair}, {order_direction} and {quantity} to get their values replaced by respectively the pair ticker (symbol name without the exchange prefix), the order direction "BUY" or "SELL", and the quantity amount in quote currency.
Create your alert after you set the messages in the indicator settings, and make sure "Any alert() function call" is set in the alert option.
█ LIMITATIONS
• Small quantities
An order with a too small quantity might not get executed by the exchange. To increase the quantity of the strategy orders, either increase your strategy capital, increase the rebalance time frame, or reduce the number of pairs.
• Not enough data
The strategy will give an error if one of the pair data does not go back to the strategy start date. Typically if a crypto pair is new and was added to TradingView recently, you will not be able to backtest prior to that.
• Chart and rebalance Time Frame
The strategy will give an error if one of the two conditions are not met:
- The Rebalance time frame must be greater than current chart's time frame.
- The Rebalance time frame must be a multiple of current chart's time frame.
Please read the author instructions below for access and automation.
The strategy tries to beat holders while keeping your portfolio repartition stable.
Configure the indicator to receive alerts for several pairs at a choosen rebalance time frame.
═════════════════════════════════════════════════════════════════════════
█ HOW IT WORKS
Here is an example:

The user chooses a certain number of pairs, up to 4 pairs for now. An initial capital, a fees % and a rebalance time frame.
The capital is split equally between each pair. (ex. for 2 pairs: 50% on each).
On each rebalance time frame (on the bar it happens), pairs balance who grew bigger than 50% will be redistributed to other pairs, making sure that after the transaction, the total capital is once again split equally through all pairs. This means selling pairs whose price went higher than the others, and buying those who dropped. In other words, selling high and buying low.
On each interval, the strategy will send orders for each pair saying whether to buy or to sell, and the quantity.
█ HOW TO USE
Creating a strategy
When adding the indicator to the chart, you must confirm the pairs you want to use, the rebalance time frame, the initial capital and commission fees.
The inital capital corresponds to the quote currency of all pairs, so each pair must have the same quote currency. (ex: USDT or BTC markets)
It will also be asked to select a "Strategy Start Date", which is the starting point of your strategy. Select the current bar if you want to start a strategy and get accurate order quantities. Otherwise, select a bar in the past for backtesting.
When setting the "Strategy Start Date" to the current day, it will look like this:
The strategy equity is equal to the intial capital, and no order has happened yet, the backtest panel shows 0%.
The first rebalance will happen at the next interval: here the 15th november.
Since this is the first rebalance, the strategy buys each pair with the same quantity in quote currency value.
After 1 rebalance, the strategy equity drops a little, since we only bought and paid fees.
Backtesting
Since the strategy is trading several pairs, the Strategy Tester cannot really be used. This is why the indicator has a backtest panel and a equity line plot that shows the progress of the strategy.
This view can be replicated by disabling the labels in the style tab.
You can also use the Data Window to track the strategy pairs balances on each bar.
Creating Alerts
The indicator is using the alert() calls: it only uses 1 alert slot to send order messages for each pair.
To set your alert messages, open the indicator settings.
You can use the placeholders {pair}, {order_direction} and {quantity} to get their values replaced by respectively the pair ticker (symbol name without the exchange prefix), the order direction "BUY" or "SELL", and the quantity amount in quote currency.
Create your alert after you set the messages in the indicator settings, and make sure "Any alert() function call" is set in the alert option.
█ LIMITATIONS
• Small quantities
An order with a too small quantity might not get executed by the exchange. To increase the quantity of the strategy orders, either increase your strategy capital, increase the rebalance time frame, or reduce the number of pairs.
• Not enough data
The strategy will give an error if one of the pair data does not go back to the strategy start date. Typically if a crypto pair is new and was added to TradingView recently, you will not be able to backtest prior to that.
• Chart and rebalance Time Frame
The strategy will give an error if one of the two conditions are not met:
- The Rebalance time frame must be greater than current chart's time frame.
- The Rebalance time frame must be a multiple of current chart's time frame.
Please read the author instructions below for access and automation.
릴리즈 노트
Updated fees calculationsAdded a configurable quantity % allocation for each pair
릴리즈 노트
Updated alert inputs초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청을 보내고 승인을 받아야 합니다. 일반적으로 결제 후에 승인이 이루어집니다. 자세한 내용은 아래 작성자의 지침을 따르거나 cyatophilum에게 직접 문의하세요.
트레이딩뷰는 스크립트 작성자를 완전히 신뢰하고 스크립트 작동 방식을 이해하지 않는 한 스크립트 비용을 지불하거나 사용하지 않는 것을 권장하지 않습니다. 무료 오픈소스 대체 스크립트는 커뮤니티 스크립트에서 찾을 수 있습니다.
작성자 지시 사항
This indicator access can be purchased through a subscription on my website: https://blockchainfiesta.com/strategy/Cyatophilum-Smart-Rebalance-Strategy/42/
🔥Get the Cyatophilum Indicators today and automate them on Binance! => blockchainfiesta.com/strategies/
Discord Server: discord.gg/RVwBkpnQzm
I am taking PineScript Commissions ✔
=> blockchainfiesta.com/contact/
Discord Server: discord.gg/RVwBkpnQzm
I am taking PineScript Commissions ✔
=> blockchainfiesta.com/contact/
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청을 보내고 승인을 받아야 합니다. 일반적으로 결제 후에 승인이 이루어집니다. 자세한 내용은 아래 작성자의 지침을 따르거나 cyatophilum에게 직접 문의하세요.
트레이딩뷰는 스크립트 작성자를 완전히 신뢰하고 스크립트 작동 방식을 이해하지 않는 한 스크립트 비용을 지불하거나 사용하지 않는 것을 권장하지 않습니다. 무료 오픈소스 대체 스크립트는 커뮤니티 스크립트에서 찾을 수 있습니다.
작성자 지시 사항
This indicator access can be purchased through a subscription on my website: https://blockchainfiesta.com/strategy/Cyatophilum-Smart-Rebalance-Strategy/42/
🔥Get the Cyatophilum Indicators today and automate them on Binance! => blockchainfiesta.com/strategies/
Discord Server: discord.gg/RVwBkpnQzm
I am taking PineScript Commissions ✔
=> blockchainfiesta.com/contact/
Discord Server: discord.gg/RVwBkpnQzm
I am taking PineScript Commissions ✔
=> blockchainfiesta.com/contact/
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.