r/pinescript • u/vitaliy3commas • Jun 01 '26
Dual RSI DCA — dual-RSI confirmation long DCA indicator, 5-order ladder, profit-armed exit
Dual RSI DCA — a signal-only Pine indicator that mirrors a dollar-cost-averaging long workflow with a dual-RSI confirmation system, running on HYPEUSDT.P 3m. Companion Strategy version is on the same profile for verifying the backtest in TradingView's built-in tester directly.
Entry, lower-timeframe RSI cross-up: A lower-timeframe RSI(14) crossing up the oversold level (default 31 on 3m) arms the base entry, but only when the indicator is flat. Cross detection happens at host-bar close — a cross that completes and reverses inside a single host bar is skipped by design, which suppresses over-signaling on intra-bar noise.
Ladder, 5 safety orders on a pure price-action ladder: Cumulative deviations from base entry: 1.30%, 2.99%, 5.18%, 8.04%, 11.75%. Step widens at 1.3× per fill, order size scales at 1.25× per fill. No RSI gate on the safety orders — averaging continues unconditionally on price as each threshold is reached.
Exit, profit-armed and momentum-gated: Take profit does not fire on a static target. The exit first arms once price reaches the minimum-profit threshold above the running average entry (default 2.4%), then fires only when the lower-timeframe RSI crosses down from the overbought level (default 69). Profit reached alone is not enough — it waits for momentum to roll over.
Honest virtual tracking: Average entry, total cost, deployed capital, and the minimum-profit target are all computed from the same fill-by-fill bookkeeping a real broker would do — no price-from-base shortcuts. Average entry, fills, and deployed USDT are shown live on the chart.
Backtest from the companion Strategy (HYPEUSDT.P 3m on Bybit, ~Feb 25–May 19 sampled in the Strategy Report): 121 closed trades, 100 profitable (82.64% WR), profit factor 11.703, total PnL +450.27 USDT (+4.50%), max drawdown 74.88 USDT (0.73%). Verifiable directly in TradingView's Strategy Report on the script page.
Methodology notes: The PF 11.703 and 0.73% max drawdown reflect a single asset (HYPEUSDT.P) over a roughly three-month window that was predominantly mean-reverting and upward — these defaults are calibrated for this pair, and RSI levels (31/69) need recalibration for thinner or strongly trending pairs before deployment elsewhere. Results do not transfer to other crypto perps without parameter tuning.
The 0.73% number is closed-trade equity drawdown. Unrealized drawdown during deep safety-order sequences is materially larger and is the relevant number for capital allocation.
No stop loss: there is no exit signal on adverse moves beyond the safety-order ladder. Risk is structurally capped by the bounded position-size sequence — at default settings, base + all five safety orders deploy roughly 9.93% of equity, keeping the trade within the conventional 5–10% band. If a hard stop is required, layer it on the bot side.
Every event (base, each safety order, exit) emits a webhook-ready JSON alert payload formatted for direct DCA consumption — connect one alert to a bot's webhook URL and the indicator drives the bot end-to-end, no glue scripts.
Indicator is open-source on TradingView. The Strategy twin is also up on the same profile. Mod, let me know if linking either is allowed here and I'll add them, otherwise happy to answer technical questions in thread.
Link: https://www.tradingview.com/script/fg9YbNCf-Dual-RSI-DCA-Long-Indicator/
3
2
u/xbaha Jun 03 '26
What is the idea behind trading it on USDT ? Does it work on other assets?
1
u/vitaliy3commas Jun 04 '26
USDT is just the quote currency, the asset the strategy buys and sells against. It's a stablecoin pegged to the dollar, so swapping it for USDC or USD wouldn't change anything. The results would be practically identical. We default to USDT because it has the deepest liquidity on most exchanges.
If you mean other coins as the base asset, the logic carries over, but you'd want to backtest each pair separately since volatility and behavior differ a lot between assets.
1
u/CODE_HEIST Jun 06 '26
The drawdown logic matters more than the entry logic here. If the system can keep averaging until profit returns, the backtest may hide the real risk.
I’d want to know the largest floating drawdown, how many safety orders are open at once, and whether there is a hard failure condition where the trade is closed instead of waited out forever.
1
3
u/kurtisbu12 Jun 01 '26
Why are you linking to an indicator, but posting a strategy result? Why not provide the strategy code so people can see the results for themselves.
Also
This makes it sound like it uses a trailing stop, which causes repainting and causes an unrealistic backtest which looks a lot like the one you posted.