OPEN-SOURCE SCRIPT
Atualizado

CASCADE DCA - Spot Long Strategy

1 152
# CASCADE DCA 🌊 — Spot Long Strategy
### Intelligent accumulation with dynamic exits. No RSI. No guesswork.

---

## What is CASCADE DCA?

Most DCA strategies buy blindly at fixed intervals. CASCADE DCA is different — it only buys when the price is **consolidating at support**, not in free fall. It scales in with increasing position sizes as price drops, then exits when the bullish impulse is fully exhausted.

The result: high win rates, low drawdowns, and exits timed to capture the full bounce — not just the first tick of recovery.

---

## How It Works

### 🟢 Entry Logic — The "Scouting Entry"
The first buy is intentionally small (configurable, default $5). It fires when price drops a defined % from a recent swing high **and** lands in a consolidation zone. Think of it as placing a sensor, not a bet.

If price keeps falling, the strategy scales in with progressively larger positions at deeper levels — but only when price consolidates again. It never buys into a free fall.

### 📉 DCA Levels — Mathematical Progression
Drop distances follow a user-defined formula. You set the first DCA drop % and choose the progression type:
- **Linear (+)**: each level adds a fixed increment → 50% / 60% / 70% / 80%...
- **Geometric (×)**: each level multiplies → 50% / 65% / 84.5% / 109.8%...

Position sizes grow with each level (configurable multiplier), with a hard **safety cap** to prevent oversizing accidents.

### 🔲 Consolidation Filter — The Key Differentiator
Every buy — initial and DCA — requires the price to be in a **lateral zone**, detected by two independent indicators:
- **BBW** (Bollinger Band Width): narrow bands = price coiling = consolidation
- **ADX**: low values = no directional trend = sideways market

You can require either condition (permissive) or both simultaneously (strict mode).

### 💨 Exit Engine — VWM (Volume-Weighted Momentum)
This is the original indicator at the heart of CASCADE DCA. **No RSI used.**

**Formula:**
```
ROC = Rate of Change of price (n bars)
rVol = current volume / average volume
VWM = EMA( ROC × rVol , smoothing )
```

**Interpretation:**
- VWM > 0 and rising → impulse building → **HOLD**
- VWM > 0 and falling for N consecutive bars → impulse dying → **EXIT**

The exit only fires when the position is already profitable (configurable minimum). This prevents closing at a loss during post-entry noise.

An optional **Supertrend safety exit** catches sudden reversals that VWM might take longer to detect.

---

## Dashboard
A full real-time control panel shows:
- **Active DCA level** and total USD deployed
- **Average cost**, entry price, open P&L %
- **Open P&L USD**, closed P&L, and **Total P&L** (matches backtest exactly)
- Live VWM score and impulse status
- Lateral zone confirmation (BBW + ADX)
- Supertrend direction
- Full DCA schedule with drop %, trigger prices, and USD amounts — with ✓ for filled levels and ► for the next pending level

---

## Backtest Results (1H, Binance Spot Perpetuals)

| Pair | Period | Win Rate | Profit Factor | Total PnL|
|--------------------|---------------|--------------|-----------------|------------|
| 1000RATSUSDT | 18 months | **93.59%** | 1.87 | +$26.65 |
| AIOTUSDT | 13 months | **89.71%** | **23.97** | +$816.92 |
| ACXUSDT | 16 months | 80.00% | **9.54** | +$131.55 |
| ACTUSDT | 14 months | 85.19% | 2.47 | +$75.79 |
| 1000MOGUSDT | 17 months | 82.22% | 5.11 | +$72.19 |
| ACEUSDT | 15 months | 76.00% | 2.51 | +$25.38 |
| AEROUSDT | 14 months | 82.50% | 2.55 | +$46.95 |
| ACHUSDT | 15 months | 85.71% | 3.16 | +$14.08 |

> ⚠️ *Past performance does not guarantee future results. Always backtest on the specific pair and timeframe before live trading.*

---

## Recommended Settings (Starting Point)

| Parameter | Value | Notes |
|---------------------------|----------------|---------------------------------------|
| Base USD | $5 | Small scouting entry |
| Amount Increment | 10× | Scales fast — use the cap |
| Max USD Cap | $200 | Hard safety ceiling per level |
| Initial drop | 5% | From recent swing high |
| First DCA drop | 50% | From initial entry price |
| Progression | Linear +10% | Predictable spacing |
| DCA Levels | 9 | Red of safety — most never fire |
| Min profit to exit | 2% | Avoids exiting at a loss |
| Supertrend exit | ON | Safety net for sudden reversals |

---

## Best Use Cases
- ✅ Mid-cap altcoins on 1H timeframe (XXX/USDT spot)
- ✅ Markets that have already experienced a significant correction
- ✅ Pairs with volume — the VWM engine requires real volume data
- ❌ Do NOT use during sustained bear markets with no consolidation
- ❌ Do NOT use on illiquid pairs with manipulated volume

---

## Why No RSI?

RSI is a great indicator. It's also in roughly 80% of all published TradingView strategies. The VWM (Volume-Weighted Momentum) was designed specifically to measure impulse exhaustion using price velocity amplified by volume conviction — giving you a more dynamic read of when a rally is truly running out of steam, not just when price is "overbought" by a fixed threshold.

---

## Parameters Guide

**💰 DCA Amounts**
- `Base Amount`: USD invested on the initial scouting entry
- `Amount Increment`: Multiplier per level. Level 0 = Base×1, Level 1 = Base×1.5, etc.
- `Max USD Cap`: Hard ceiling — no single level can exceed this amount. **Always set this first.**

**📉 DCA Drop Progression**
- `Initial Entry drop %`: How far below the recent swing high to open the first position
- `First DCA drop %`: The anchor of the progression formula (measured from initial entry)
- `Progression Type`: Linear or Geometric spacing between levels
- `Linear Increment / Geometric Multiplier`: Controls how fast levels spread apart

**🔲 Lateral Zone Detection**
- `BBW threshold`: Lower = stricter consolidation requirement
- `ADX threshold`: Lower = stricter no-trend requirement
- `Require BOTH`: AND mode for strictest filtering

**🚀 Exit — VWM**
- `Min profit %`: Position must be profitable before exit can fire
- `Decay bars`: Consecutive bars of VWM decline needed to trigger exit
- `Supertrend exit`: Additional safety exit on trend reversal

---

*Built with 10 years of algorithmic trading experience. Designed for spot markets. Long only.*
*The VWM indicator is original to this strategy.*
Notas de Lançamento
CASCADE DCA 50: Precision Average-Down Strategy

The CASCADE DCA 50 is a professional-grade automated trading strategy designed for high-frequency, long-term accumulation using a structured Dollar Cost Averaging (DCA) approach. This version introduces a robust 50-level escalation system, providing maximum flexibility and precision in volatile market conditions.

Key Features:

50-Level Escalation: Dynamically manages up to 50 DCA positions to ensure optimized entry pricing. The strategy intelligently scales exposure based on predefined market conditions.

Dynamic Break-Even Engine: A custom-built profit protection layer. Once an active position moves into profit, the strategy triggers an automated "Break-Even" exit if the price reverts, protecting the initial capital and realized gains from turning into losses.

Smart Profit Taking: Features a calculated Take Profit target that works in tandem with the average price of all open positions, maximizing efficiency during trend reversals.

Lateral Filter: Integrated market-state detection to avoid entering trades during unstable or non-trending phases, ensuring entries are only made when the established technical criteria are met.

Optimized Risk Management: By combining a granular entry system with automatic safety exits, the strategy maintains a high success rate while keeping the maximum drawdown within controlled parameters.
Notas de Lançamento
Full version (release notes):

CASCADE DCA — v1.3 Release Notes

🔧 Critical fix — DCA trigger levels 10–50
Trigger prices for levels 10 through 50 were incorrectly reusing the drop distances of levels 1–9, causing deep DCA levels to activate at prices the market had already passed. Each level now uses its correct get_drop(n) distance. The missing DCA-50 block was also added.

🔒 Anti-cascade guard (one fill per bar)
Fixed a core Pine execution issue where all 50 DCA blocks could chain within a single bar (level 1→2→3…→50), stacking every entry on one candle. A per-bar lock now ensures at most one DCA fills per bar.

🎯 Rebound confirmation (anti-stacking)
DCA orders no longer fill mid-crash. A level now arms when the cycle low reaches its trigger, and the buy only executes once price rebounds a configurable % from the bottom. Includes:

Minimum gap between fills (hard spacing lock, % below last fill)
Bottom confirmation (N bars without a new low before buying)
Optional green-candle requirement
Toggle to revert to classic behavior

⚖️ Rescue Mode with breakeven exit
When a position accumulates N or more DCAs, a breakeven arms once price recovers a small profit. If open USD P&L returns to zero, the full position closes — a rescued position never goes back into the red. Normal VWM/Supertrend exit retains priority.

📊 Dashboard — live DCA cycle window
The level table now shows a moving 3-row window (Previous / Currently Running / Next) that scrolls with the active level, instead of a fixed list. Added Rescue Mode, breakeven, rebound state, and cycle-low tracking rows.
Notas de Lançamento
FIX | DCA CASCADE V1.4:

🚀 Trend Re-Entry — Never miss the next rally
After taking profit, the strategy used to wait patiently for a pullback before buying again. That works great in choppy, sideways markets — but when the price takes off in a clean uptrend right after a sale, the bot would just sit on the sidelines and watch the move go by.
This update fixes that. CASCADE DCA now recognizes when a real uptrend is forming and steps back in to ride it, instead of waiting for a dip that may never come.
How it decides the trend is for real: it only re-enters when multiple signals agree — Supertrend turns bullish, trend strength (ADX) is high enough, momentum points up, price holds above its moving average, and the slope is clearly rising. No single indicator can trigger it alone, which keeps it from chasing fakeouts.
What you get: one clean re-entry per cycle, marked with a dedicated arrow on the chart and a live status in the dashboard (watching → ready → in). From there it behaves like any normal entry: if the rally continues, you stay in for the ride; if it pulls back, the full DCA safety grid kicks in automatically.
Fully optional — toggle it on or off, and tune how strong the trend must be before it commits.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.