OPEN-SOURCE SCRIPT
[3Commas] BCH Overbought RSI Fade - Short Indicator

[3Commas] BCH Overbought RSI Fade - Short Indicator
🔷 What it does:
This is the signal-only companion to the BCH Overbought RSI Fade Short strategy — it fires alerts without running a backtest engine. It tracks one virtual short at a time, opened when the 5-minute RSI(9) crosses back DOWN through 80 (an overbought rollover). Up to three averaging orders stack at +1%, +2%, and +3% above entry (equal size). The deal closes on a 1.3% Take Profit from the average with a 0.3% trailing lock, or a hard 8% Stop Loss. Running average entry, deployed capital, open PnL, and lifetime realized PnL are all kept from honest fill-by-fill bookkeeping. Every event emits a webhook-ready JSON payload for a DCA Bot.
- Entry on the RSI rollover: 5m RSI(9) crossing DOWN through 80.
- Uniform averaging ladder above entry: +1% / +2% / +3%.
- 1.3% Take Profit with a 0.3% trailing lock, plus a hard 8% Stop Loss.
- Live Open PnL and lifetime Total PnL on the chart.
🔷 Who is it for:
- Intraday traders fading blow-off spikes on BCH on lower timeframes.
- Bot operators wiring TradingView alerts straight into a DCA Bot via per-event JSON.
- Traders who want a defined-risk short signal — averaging with a stop, not a stopless martingale.
- Operators who want to watch the virtual deal state (entry, fills, exit) directly on the chart.
🔷 How does it work:
Entry Trigger: A 5-minute RSI(9) is pulled with request.security and lookahead disabled (no repaint). The short fires when that RSI was ≥ 80 on the prior 5m close and drops below it on the current close.
Base Entry: On the trigger, the indicator marks a virtual short, records the entry, and seeds the cost-basis ledger with the base order size (default 500 USDT).
Averaging Ladder (uniform): Three safety orders at fixed +1% / +2% / +3% above base, 250 USDT each. Each fill updates the running cost-basis and dispatches its own webhook, raising the virtual average entry.
Honest Bookkeeping: Cost and quantity update on every event, so the average entry, deployed capital, Open PnL, and Total PnL in the status table reflect the true broker-equivalent state.
Exit (TP + Trailing): At 1.3% below the running average, a trailing exit arms; the indicator tracks the in-favor low and signals a close on a 0.3% retrace off it.
Stop Loss: A hard 8% stop above the average fires the close webhook, banks realized PnL, and resets the virtual position.
Lifetime Total PnL: Each closed cycle's realized PnL accumulates into a lifetime counter shown alongside the current-cycle Open PnL.
🔷 Why it's unique:
- Rollover, Not Just Overbought: Firing on the RSI cross-down through 80 skips trades that ignite while momentum is still rising — it waits for the turn.
- Stop-Bounded Averaging: A compact 3-rung ladder plus an explicit 8% stop keeps the worst-case loss known up front.
- Trailing Profit Lock: The 1.3% target arms a 0.3% trail, banking the snap-back while letting an extended drop run.
- Lifetime PnL Tracking: Open and lifetime Total PnL on the chart give strategy-tester-equivalent insight without a backtest.
- Plug-and-Play Webhooks: Base, each AO, and the exit each emit a complete JSON alert; one "Any alert() function call" alert drives a DCA Bot end-to-end.
🔷 Considerations Before Using the Indicator:
Sample Size: The companion strategy's backtest produced 160 closed trades — above the ~100-trade floor commonly used for statistical relevance. Still a single test window, so treat the metrics as indicative.
Short Execution Venue: This signals shorts. Live shorting of BCH requires a margin or perpetual venue — it cannot run on a spot account.
Lower-Timeframe Sensitivity: The trigger runs on a 5-minute RSI. Fast timeframes mean more signals and more fee/slippage drag — confirm both fit your venue.
Stop Loss Discipline: The 8% stop is the core risk control. Base plus three AOs deploy at most ~1,250 USDT (12.5% of the default reference equity); an 8% stop on that caps the worst case near ~1% of equity. Keep the stop on.
Trend Risk: Fading strength suits ranges and choppy tape. In a relentless uptrend the short can be stopped out repeatedly; the rollover trigger reduces, but does not remove, that risk.
Cross Detection Granularity: Entries, AO fills, and exits evaluate on bar close. A spike-and-revert within a single bar may be missed by design — matching realistic polling and avoiding intra-bar over-signaling.
Live vs Historical State: The virtual state is rebuilt from chart history on each recompile. If added mid-deployment or if the live bot diverges (manual interventions, partial fills), states may differ. Toggle the indicator off and on to reset.
Backtesting Note: This is an indicator, not a strategy. There is no built-in P&L tester — but the live Total PnL counter gives a running approximation. For full metrics over a ~4.8-month sample (160 closed trades, 84.38% win rate, 1.78% max drawdown, profit factor 2.207, +4.01% net return), use the companion strategy version on identical parameters.
🔷 How to Use It:
🔸 Add the indicator to a 5m BCH / USDT chart.
🔸 Review the RSI trigger level, the averaging-order count/deviation/size, the Take Profit, Trailing, and Stop Loss percentages. Defaults mirror the source DCA Bot configuration.
🔸 Set Base Order Size and AO sizes to match your bot's configuration (the avg-entry display becomes meaningful when virtual sizing matches real sizing).
🔸 In the DCA Bot Webhook group, paste the Bot ID, Email Token, and Pair (QUOTE_BASE format, e.g., USDT_BCH).
🔸 Create an alert on the indicator with "Any alert() function call". Paste the DCA Bot's webhook URL into the alert's Webhook field. The indicator emits JSON for entry, each averaging order, and the TP/SL exit.
🔷 INDICATOR SETTINGS
Base Order Size (USDT): Virtual order size for the avg-entry / open-PnL computation.
Averaging Orders per Trade: Number of safety orders (default 3).
First AO Size (USDT): Virtual size of each averaging order (uniform by default).
Deviation to First AO (%) / Deviation Step Multiplier: Spacing of the AO ladder above base entry. Defaults to uniform +1% steps.
Order Size Multiplier: Per-rung size scaling (1.0 = uniform).
RSI Timeframe / Length / Crossing Down Level: The RSI(9) crossing-down trigger (default 5m).
Take Profit (%) / Trailing (%): TP distance below average entry and the trailing retrace that closes the position.
Stop Loss (%): Hard stop above average entry.
Active Window: Optional date filter — when ON, the indicator only fires signals between From and To dates.
DCA Bot Webhook: Bot ID, Email Token, and Pair fields injected into every alert payload.
Visualization: Toggle DCA Ladder, Avg / TP / SL plot lines, fill labels, signal triangles, status table.
Brand Watermark: Configurable text, position, size, and transparency.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc.
🔷 What it does:
This is the signal-only companion to the BCH Overbought RSI Fade Short strategy — it fires alerts without running a backtest engine. It tracks one virtual short at a time, opened when the 5-minute RSI(9) crosses back DOWN through 80 (an overbought rollover). Up to three averaging orders stack at +1%, +2%, and +3% above entry (equal size). The deal closes on a 1.3% Take Profit from the average with a 0.3% trailing lock, or a hard 8% Stop Loss. Running average entry, deployed capital, open PnL, and lifetime realized PnL are all kept from honest fill-by-fill bookkeeping. Every event emits a webhook-ready JSON payload for a DCA Bot.
- Entry on the RSI rollover: 5m RSI(9) crossing DOWN through 80.
- Uniform averaging ladder above entry: +1% / +2% / +3%.
- 1.3% Take Profit with a 0.3% trailing lock, plus a hard 8% Stop Loss.
- Live Open PnL and lifetime Total PnL on the chart.
🔷 Who is it for:
- Intraday traders fading blow-off spikes on BCH on lower timeframes.
- Bot operators wiring TradingView alerts straight into a DCA Bot via per-event JSON.
- Traders who want a defined-risk short signal — averaging with a stop, not a stopless martingale.
- Operators who want to watch the virtual deal state (entry, fills, exit) directly on the chart.
🔷 How does it work:
Entry Trigger: A 5-minute RSI(9) is pulled with request.security and lookahead disabled (no repaint). The short fires when that RSI was ≥ 80 on the prior 5m close and drops below it on the current close.
Base Entry: On the trigger, the indicator marks a virtual short, records the entry, and seeds the cost-basis ledger with the base order size (default 500 USDT).
Averaging Ladder (uniform): Three safety orders at fixed +1% / +2% / +3% above base, 250 USDT each. Each fill updates the running cost-basis and dispatches its own webhook, raising the virtual average entry.
Honest Bookkeeping: Cost and quantity update on every event, so the average entry, deployed capital, Open PnL, and Total PnL in the status table reflect the true broker-equivalent state.
Exit (TP + Trailing): At 1.3% below the running average, a trailing exit arms; the indicator tracks the in-favor low and signals a close on a 0.3% retrace off it.
Stop Loss: A hard 8% stop above the average fires the close webhook, banks realized PnL, and resets the virtual position.
Lifetime Total PnL: Each closed cycle's realized PnL accumulates into a lifetime counter shown alongside the current-cycle Open PnL.
🔷 Why it's unique:
- Rollover, Not Just Overbought: Firing on the RSI cross-down through 80 skips trades that ignite while momentum is still rising — it waits for the turn.
- Stop-Bounded Averaging: A compact 3-rung ladder plus an explicit 8% stop keeps the worst-case loss known up front.
- Trailing Profit Lock: The 1.3% target arms a 0.3% trail, banking the snap-back while letting an extended drop run.
- Lifetime PnL Tracking: Open and lifetime Total PnL on the chart give strategy-tester-equivalent insight without a backtest.
- Plug-and-Play Webhooks: Base, each AO, and the exit each emit a complete JSON alert; one "Any alert() function call" alert drives a DCA Bot end-to-end.
🔷 Considerations Before Using the Indicator:
Sample Size: The companion strategy's backtest produced 160 closed trades — above the ~100-trade floor commonly used for statistical relevance. Still a single test window, so treat the metrics as indicative.
Short Execution Venue: This signals shorts. Live shorting of BCH requires a margin or perpetual venue — it cannot run on a spot account.
Lower-Timeframe Sensitivity: The trigger runs on a 5-minute RSI. Fast timeframes mean more signals and more fee/slippage drag — confirm both fit your venue.
Stop Loss Discipline: The 8% stop is the core risk control. Base plus three AOs deploy at most ~1,250 USDT (12.5% of the default reference equity); an 8% stop on that caps the worst case near ~1% of equity. Keep the stop on.
Trend Risk: Fading strength suits ranges and choppy tape. In a relentless uptrend the short can be stopped out repeatedly; the rollover trigger reduces, but does not remove, that risk.
Cross Detection Granularity: Entries, AO fills, and exits evaluate on bar close. A spike-and-revert within a single bar may be missed by design — matching realistic polling and avoiding intra-bar over-signaling.
Live vs Historical State: The virtual state is rebuilt from chart history on each recompile. If added mid-deployment or if the live bot diverges (manual interventions, partial fills), states may differ. Toggle the indicator off and on to reset.
Backtesting Note: This is an indicator, not a strategy. There is no built-in P&L tester — but the live Total PnL counter gives a running approximation. For full metrics over a ~4.8-month sample (160 closed trades, 84.38% win rate, 1.78% max drawdown, profit factor 2.207, +4.01% net return), use the companion strategy version on identical parameters.
🔷 How to Use It:
🔸 Add the indicator to a 5m BCH / USDT chart.
🔸 Review the RSI trigger level, the averaging-order count/deviation/size, the Take Profit, Trailing, and Stop Loss percentages. Defaults mirror the source DCA Bot configuration.
🔸 Set Base Order Size and AO sizes to match your bot's configuration (the avg-entry display becomes meaningful when virtual sizing matches real sizing).
🔸 In the DCA Bot Webhook group, paste the Bot ID, Email Token, and Pair (QUOTE_BASE format, e.g., USDT_BCH).
🔸 Create an alert on the indicator with "Any alert() function call". Paste the DCA Bot's webhook URL into the alert's Webhook field. The indicator emits JSON for entry, each averaging order, and the TP/SL exit.
🔷 INDICATOR SETTINGS
Base Order Size (USDT): Virtual order size for the avg-entry / open-PnL computation.
Averaging Orders per Trade: Number of safety orders (default 3).
First AO Size (USDT): Virtual size of each averaging order (uniform by default).
Deviation to First AO (%) / Deviation Step Multiplier: Spacing of the AO ladder above base entry. Defaults to uniform +1% steps.
Order Size Multiplier: Per-rung size scaling (1.0 = uniform).
RSI Timeframe / Length / Crossing Down Level: The RSI(9) crossing-down trigger (default 5m).
Take Profit (%) / Trailing (%): TP distance below average entry and the trailing retrace that closes the position.
Stop Loss (%): Hard stop above average entry.
Active Window: Optional date filter — when ON, the indicator only fires signals between From and To dates.
DCA Bot Webhook: Bot ID, Email Token, and Pair fields injected into every alert payload.
Visualization: Toggle DCA Ladder, Avg / TP / SL plot lines, fill labels, signal triangles, status table.
Brand Watermark: Configurable text, position, size, and transparency.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
📈 Stop guessing your settings — backtest & optimize with QuantPilot
🎁 Free to start
🎁 Free to start
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
📈 Stop guessing your settings — backtest & optimize with QuantPilot
🎁 Free to start
🎁 Free to start
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.