RSI Volume LadderA long-only pyramiding strategy that scales into corrections using RSI oversold conditions confirmed by above-average volume. Each subsequent entry requires a meaningful price drop from the previous fill, with an asymmetric exit structure: Take Profit anchored to the average entry, Stop Loss anchored to the lowest fill. Built for traders who want to systematically dollar-cost into pullbacks within an uptrend, with clearly defined risk per pyramid stack.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ORIGINALITY — WHAT MAKES THIS DIFFERENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Five specific mechanics that, in this combination, distinguish this script from other averaging-down systems published on TradingView:
- ASYMMETRIC EXIT ANCHORING
Take Profit is calculated from the average entry price of the pyramid — so winners run from the averaged-down cost basis. Stop Loss is calculated from the LOWEST entry price among all open positions — so the absolute worst-case loss is bounded by your deepest fill, not your average. This asymmetry is the key to making pyramiding viable: averaging works for you on the upside without inflating downside risk.
- PRICE-DROP GATE FOR EACH PYRAMID LEG
Every subsequent entry requires both a fresh RSI + volume signal AND a configurable minimum price drop from the previous fill (default 1.5%). This prevents stacking three positions within a tight range during a slow grind down — pyramiding only triggers on meaningful pullbacks, forcing real averaging instead of cosmetic averaging.
- ASYMMETRIC COOLDOWN ON EXIT
After a Stop Loss, the strategy waits N bars (default 3) before allowing new entries — blocks the "catch the falling knife" pattern where RSI stays oversold for many bars during a cascade. After a Take Profit, cooldown is configurable separately and defaults to 0, because a successful exit signals continued mean-reversion behavior worth participating in.
- ENTRY-TIMING SAFETY
Exit detection runs at the top of the bar evaluation, BEFORE the entry check. This means a Stop Loss hit on a bar cannot trigger a new entry on the same bar — even if RSI is still deeply oversold and volume is elevated. The cooldown counter is set before the entry logic ever sees the bar, eliminating a subtle but realistic execution problem in pyramiding systems.
- VISUAL EXIT CLASSIFICATION
When the position closes, the script automatically classifies the exit as TP or SL by measuring distance from actual fill price to each pre-set level, and renders a fuchsia or red cross at the exit price. No look-ahead, no estimation — the classification uses the closed trade's recorded exit price.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CREDITS & FOUNDATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This script builds on established methodologies with original Pine v5 implementation of every layer:
- RSI — Wilder, 1978 (standard implementation via ta.rsi)
- Volume confirmation — classical technical analysis
- Pyramiding / scaling-in — standard portfolio management technique (Tharp, Elder)
- Dollar-cost averaging principles — long-standing investment methodology
ALL CODE in this script was written from scratch. No code has been copied from other public or private scripts. The five mechanics listed under ORIGINALITY above are original combinations and implementations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW THE STRATEGY WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTRY CONDITIONS (all must be true):
- RSI below the configurable oversold threshold (default 30)
- Volume above SMA × configurable multiplier (default 1.5× of SMA20)
- For pyramiding: price must be at least X% below the last fill (default 1.5%)
- Cooldown not active from the previous exit
- Open positions count below the pyramiding cap (default 3)
PYRAMID BUILDING:
Up to 3 long positions can be opened. Each new entry independently re-checks all conditions — the RSI + volume signal must reappear, AND the price drop gate must be satisfied. Position size per entry is fixed (default 5% of equity), so a full three-position stack uses approximately 15% of equity.
EXIT LOGIC:
Both legs run as an OCO (one-cancels-other) bracket:
Take Profit = average entry × (1 + tpPercent / 100), default +4%
Stop Loss = lowest entry × (1 − slPercent / 100), default −3%
All positions close together when either level is hit. The TP/SL levels update on every bar as the pyramid grows — average shifts on each new fill, lowest fill anchors deeper if a new low is hit.
COOLDOWN MECHANISM:
On exit, the strategy records the bar index and exit type. While bar_index − lastExitBar ≤ requiredCooldown , new entries are blocked. The required cooldown differs by exit type (default 3 bars after SL, 0 bars after TP), reflecting that an SL exit often happens during continuing weakness, while a TP exit signals healthy mean reversion.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VISUALIZATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTRY ARROWS — blue triangles below each fill, labeled Long_1 / Long_2 / Long_3 with the order price
AVERAGE ENTRY LINE — blue, updates as the pyramid grows (staircase pattern)
TAKE PROFIT LINE — fuchsia, updates with the average
STOP LOSS LINE — red, anchored to the lowest fill (steps down only if a deeper entry occurs)
EXIT CROSS — fuchsia at TP hit, red at SL hit, placed at the actual exit price
The line style is plot.style_linebr , which connects within an open position and breaks cleanly between positions — making each pyramid cycle visually self-contained on the chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE IT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This is a complete entry + exit strategy, but it is NOT a turn-it-on-and-walk-away system. Use it as a framework to test and adapt to your specific instrument:
- Load on a liquid asset with mean-reverting behavior in an uptrend. The strategy was developed on crypto majors (BTC, ETH) and major equity indices.
Start with the default parameters and run the Strategy Tester on at least 6 months of history.
- Pay attention to:
• Net Profit and Max Drawdown ratio
• Average loss vs. average win
• Whether losing streaks cluster during specific market regimes
Tune to your instrument's volatility:
• Higher-volatility assets (alt-coins, small caps) → increase dropPercent (2-3%), increase slPercent (4-6%)
• Lower-volatility assets (BTC, indices) → decrease dropPercent (1-1.5%), tighter slPercent (2-3%)
• Higher timeframes (1h, 4h) → wider TP/SL to match bar range
- Consider adding an external trend filter for your live use. The strategy will pyramid into any oversold reading regardless of higher-timeframe context. Adding an EMA200 filter (only enter if price > EMA200) materially changes the risk profile on instruments prone to extended downtrends.
- Treat the strategy output as a structured framework for your dip-buying process, not as a guaranteed system. Combine with your own market analysis, position sizing, and broader risk management.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INPUTS WORTH KNOWING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RSI Length (default 14) and Oversold threshold (default 30) — standard RSI configuration. Lower threshold = fewer, deeper-oversold entries.
Volume SMA length (default 20) and Multiplier (default 1.5×) — volume confirmation strength. Higher multiplier = only enter on standout volume spikes, fewer entries.
Min drop between pyramid entries (default 1.5%) — prevents tight clustering. Higher = waits for deeper pullbacks before adding.
Max pyramid positions (default 3) — caps the stack. Note: pyramiding=3 is also set in the strategy() header.
Take Profit % from average (default 4%) — anchored to running average entry price.
Stop Loss % from lowest fill (default 3%) — anchored to the deepest entry, shared across all open positions.
Cooldown after SL (default 3 bars) — blocks the falling-knife pattern after a stop-out.
Cooldown after TP (default 0 bars) — re-enter immediately after a successful exit.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REALISTIC EXPECTATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pyramiding into corrections is a well-known approach with well-known limitations. The strategy works best when:
The underlying asset has a structural uptrend
Volatility produces regular pullbacks of meaningful depth
The market is not in a sustained bear regime
What this strategy provides:
A disciplined framework for scaling into pullbacks instead of single-shot entries
Asymmetric exit anchoring that lets winners run from the averaged cost basis
Built-in protection against catching the falling knife via cooldown
Transparent visualization of each pyramid leg, exit, and risk level
What it does NOT provide:
Protection from prolonged bear trends (averaging down into a structural decline is the dominant failure mode of this entire strategy family)
A guaranteed profitable system
A signal generator for assets that don't mean-revert
A replacement for your own market analysis, position sizing, or higher-timeframe context
Treat the output as ONE structured input in your trading process. The biggest risk to your account using a pyramiding strategy is mis-applying it to a downtrending asset — always confirm regime alignment before going live.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TECHNICAL NOTES & DISCLOSURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NO REPAINT . Uses process_orders_on_close=true — all orders execute on confirmed bar close. No request.security() calls, no lookahead_on, no barmerge.lookahead_on.
REALISTIC EXECUTION . Default commission 0.05% per trade (typical crypto exchange taker fee). Position sizing in % of equity, not fixed contracts. Initial capital 10,000.
DATA USED : only standard Pine inputs — open, high, low, close, volume. Indicators: RSI, SMA of volume. No external feeds, no security() calls, no synthetic data.
PERFORMANCE : max_labels_count=500. Pyramiding capped at 3. No unbounded growth of internal objects.
ASSETS : developed on crypto majors and tested across 5m, 15m timeframes. Works on equities and forex but parameters were tuned on crypto and may need adjustment for assets with different intraday behavior.
EDUCATIONAL AND ANALYTICAL TOOL . Intended for traders who understand pyramiding mechanics and the inherent risk of averaging-down strategies, and who want a structured framework to test on their own instruments.
OPEN SOURCE . Read the code, learn from it, fork it. Feedback and bug reports welcome in the comments.
Check my profile for other published scripts.
Pine Script™ 전략






















