OPEN-SOURCE SCRIPT
Actualizado

DCA Bot v7 - Cryptosa Nostra 1.0

407
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.
Notas de prensa
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
Notas de prensa

DCA Signal Engine (Adaptive Logic + Golden Pocket)

The DCA Signal Engine is not just a buy/sell indicator; it is a comprehensive Dollar Cost Averaging system designed to solve the biggest problem in algorithmic trading: Market Noise.

Most DCA scripts use fixed percentage drops (e.g., "Buy every 5% drop"). This fails during high volatility crashes. This engine solves that by using Adaptive ATR Bands and a background "Virtual Trading Brain" that adjusts the strategy's sensitivity in real-time based on market conditions.

🧠 How It Works: The "Adaptive Brain"
The core innovation of this script is the Adaptive Logic module.

Virtual Tracking: The script runs a background simulation of trades.

Self-Correction: If the bot detects that recent signals would have resulted in a loss (choppy market), it automatically widens the deviation bands. This makes the bot more conservative to prevent "catching a falling knife."

Aggression: If the bot detects a winning streak, it tightens the bands to capture more aggressive entries during a strong trend.

🎯 Key Features
1. Dynamic Trigger Lines (ATR Based) Instead of fixed price levels, the engine plots dynamic Green (Buy) and Red (Sell) trigger lines based on the Average True Range.

Deep Buy Zone: Triggers when price drops significantly below the average, combined with RSI oversold conditions.

Reload Zone: Triggers in uptrends when RSI is neutral, allowing you to "buy the dip" in a bull market without waiting for a crash.

2. Golden Pocket Booster (Fibonacci Integration) The script automatically looks for the "Golden Pocket" (0.618 – 0.65 Retracement) relative to the recent swing high/low.

Blue Diamond Signal: If a Buy Signal aligns with the Golden Pocket and low RSI, the script paints a BOOSTED signal, indicating a high-confluence entry.

3. Two Operation Modes

Trading Mode: Issues Sell signals for profit-taking when price hits overbought levels.

Accumulation Mode: Disables standard sell signals and only alerts you during "Euphoria" (RSI > 80), meant for long-term investors who just want to stack assets.

4. Live Status Dashboard A table in the top-right corner displays:

Current Status (Scanning, Buying, or Selling).

Exact price levels for the next Buy/Sell triggers.

Current "Brain" Multipliers (shows how aggressive or conservative the bot is currently acting).

🚦 Visual Guide
🟢 Green Dot: Standard Volatility Buy.

💎 Blue Diamond: Boosted Buy (Volatility + Golden Pocket Confluence).

🔴 Red Dot: Profit Taking Sell.

🟠 Orange Dot: Euphoria Sell (Extreme RSI extension).

⚙️ Settings Overview
Bot Mode: Switch between "Trading" (Active selling) or "Accumulation" (Hodl mode).

Fib Lookback: Defines how many days back to look for the High/Low to calculate the Fibonacci sequence.

Adaptation Factor: Controls how quickly the "Brain" adjusts. Higher numbers make the bot react faster to wins/losses.

RSI Levels: Fully customizable thresholds for Oversold, Overbought, and Euphoria.

⚠️ Disclaimer
This tool is for informational purposes and assists in visualizing DCA opportunities. It does not guarantee profit. Past performance of the "Adaptive Brain" does not guarantee future results. Always manage your risk.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.