OPEN-SOURCE SCRIPT
Обновлено

DCA Bot v7 - Cryptosa Nostra 1.0

133
Technical Overview: Adaptive RSI DCA Bot

This is a sophisticated DCA (Dollar Cost Averaging) indicator designed for accumulating assets and managing portfolio distribution. It does not trade on simple RSI crosses. Instead, it combines multi-zone RSI analysis with ATR-based volatility triggers to execute staggered, dynamically-sized trades.

Its core feature is a "learning" engine that adapts its own settings over time. This "brain" can be trained on historical data and then applied to your real-time portfolio holdings via a "Live Override" feature.

Core Logic: How It Works

A trade is only executed when two conditions are met simultaneously:

The RSI Condition: The RSI must be inside one of the four pre-defined zones.

The Price Condition: The price must cross a "trigger line" (the green or red line) that is dynamically calculated based on volatility.

1. The Four RSI Zones

This script uses four distinct zones to determine the intent to trade:

Deep Buy Zone (Default: RSI <= 35 & Downtrend): This is the primary "value" buy signal. It only activates if the RSI is deeply oversold and the price is below the 200-period Trend MA.

Reload Buy Zone (Default: RSI 40-50 & Uptrend): This is a "buy the dip" signal. It looks for minor pullbacks during an established uptrend (price above the 200-period Trend MA).

Profit-Taking Zone (Default: RSI 70-80): Triggers a standard, small sell when the market is overbought.

Euphoria Zone (Default: RSI >= 80): Triggers a larger, more aggressive sell during extreme "blow-off" tops.

2. Dynamic Trade Sizing

The amount to buy or sell is not fixed. It scales dynamically based on how high or low the RSI is:

Buy Sizing: Spends a higher percentage of available cash when RSI is at its lowest (e.g., 35) and a smaller percentage when it's at the top of the reload zone (e.g., 50).

Sell Sizing: Sells a smaller percentage of holdings when RSI just enters the overbought zone (e.g., 70) and a much larger percentage when it's in the euphoria zone (e.g., 80+).

3. The "Adaptive Brain" (ATR Multipliers)

This is the script's learning mechanism. The green/red trigger lines are calculated as: Last Trade Price +/- (ATR * Multiplier).

This "Multiplier" is the brain. It adapts based on trade performance.

After a successful trade (as defined by profit_target_multiplier), the bot gets more confident and reduces the multiplier. This places the next trigger line closer to the price, making it more aggressive.

After a losing trade (as defined by loss_limit_multiplier), the bot gets more cautious and increases the multiplier. This places the next trigger line further away, making it more patient.

How to Use This Indicator

This script is designed to be "trained" on historical data to provide relevant signals for today.

To Train the Brain: In the settings, go to "1. Backtest Settings". Set the "Start Date (For Learning)" to a date in the past (e.g., 6 months or 1 year ago). The script will run a simulation from that date, allowing its Adaptive Multipliers (the "brain") to adjust to the market's volatility.

To See Live Signals: In "2. Live Portfolio Override", check the box "Override Backtest Balance?" and enter your real current coin and USD holdings.

Result: The "Live Status" table (top-right) will now display signals from the trained brain but will calculate the "Potential Buy %" and "Potential Sell %" based on your real portfolio. The "Buy Multi" and "Sell Multi" fields show you the brain's current learned values.
Информация о релизе
Technical Overview: Adaptive RSI DCA Bot

This is a sophisticated DCA (Dollar Cost Averaging) indicator designed for accumulating assets and managing portfolio distribution. It does not trade on simple RSI crosses. Instead, it combines multi-zone RSI analysis with ATR-based volatility triggers to execute staggered, dynamically-sized trades.

Its core feature is a "learning" engine that adapts its own settings over time. This "brain" can be trained on historical data and then applied to your real-time portfolio holdings via a "Live Override" feature.

Core Logic: How It Works

A trade is only executed when two conditions are met simultaneously:

The RSI Condition: The RSI must be inside one of the four pre-defined zones.

The Price Condition: The price must cross a "trigger line" (the green or red line) that is dynamically calculated based on volatility.

1. The Four RSI Zones

This script uses four distinct zones to determine the intent to trade:

Deep Buy Zone (Default: RSI <= 35 & Downtrend): This is the primary "value" buy signal. It only activates if the RSI is deeply oversold and the price is below the 200-period Trend MA.

Reload Buy Zone (Default: RSI 40-52 & Uptrend): This is a "buy the dip" signal. It looks for minor pullbacks during an established uptrend (price above the 200-period Trend MA).

Profit-Taking Zone (Default: RSI 68-80): Triggers a standard, small sell when the market is overbought.

Euphoria Zone (Default: RSI >= 80): Triggers a larger, more aggressive sell during extreme "blow-off" tops.

2. The "Bot Mode" Toggle

This setting allows you to align the bot with your primary goal.

Mode 1: Trading (Profit-Taking): The default mode. The bot will sell at both the Profit-Taking (68) and Euphoria (80) levels.

Mode 2: Accumulation (Euphoria Only): The bot ignores the Profit-Taking (68) level completely. It will only sell when the RSI hits the extreme Euphoria (80+) zone, maximizing accumulation.

3. Dynamic Trade Sizing

The amount to buy or sell is not fixed. It scales dynamically based on how high or low the RSI is:

Buy Sizing: Spends a higher percentage of available cash when RSI is at its lowest (e.g., 35) and a smaller percentage when it's at the top of the reload zone (e.g., 52).

Sell Sizing: Sells a smaller percentage of holdings when RSI just enters the overbought zone (e.g., 68) and a much larger percentage when it's in the euphoria zone (e.g., 80+).

4. The "Adaptive Brain" (ATR Multipliers)

This is the script's learning mechanism. The green/red trigger lines are calculated as: Last Trade Price +/- (ATR * Multiplier).

This "Multiplier" is the brain. It adapts based on trade performance.

After a successful trade (as defined by profit_target_multiplier), the bot gets more confident and reduces the multiplier. This places the next trigger line closer to the price, making it more aggressive.

After a losing trade (as defined by loss_limit_multiplier), the bot gets more cautious and increases the multiplier. This places the next trigger line further away, making it more patient.

How to Use This Indicator

This script is designed to be "trained" on historical data to provide relevant signals for today.

To Train the Brain: In the settings, go to "1. Backtest Settings". Set the "Start Date (For Learning)" to a date in the past (e.g., 6 months or 1 year ago). The script will run a simulation from that date, allowing its Adaptive Multipliers (the "brain") to adjust to the market's volatility.

To See Live Signals: In "2. Live Portfolio Override", check the box "Override Backtest Balance?" and enter your real current coin and USD holdings.

Result: The "Live Status" table (top-right) will now display signals from the trained brain but will calculate the "Potential Buy %" and "Potential Sell %" based on your real portfolio. The "Buy Multi" and "Sell Multi" fields show you the brain's current learned values.

Changed 11/17/25
- Made ticker show actual chart currently on
- Added trading/DCA feature

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.