OPEN-SOURCE SCRIPT

[3Commas] Equity Pulse Long - Indicator

383
[3Commas] Equity Pulse Long — Indicator

🔷 What it does:
This indicator visualizes a long-only Dollar-Cost-Averaging signal framework for tokenized equity perpetuals, using an RSI-confirmed exit gate. It marks base order entries continuously, projects the full 8-level safety order ladder, tracks a virtual deal lifecycle on the chart, and exposes webhook-ready alerts for automated execution through an external DCA Bot. No orders are placed by the indicator itself — it is a pure signal and visualization layer.
- Base Order signal: opens immediately when no active deal exists (nonstop reload)
- Safety Order ladder: 8 cumulative levels (step coef 1.22), all equal size
- Exit signal: RSI(14) on 15m crosses above 70 AND profit ≥ 0.6% from average entry
- On-chart virtual P&L tracker: Net Profit, Max Drawdown, Trades, Win Rate, Profit Factor

🔷 Who is it for:
DCA traders applying averaged-entry logic to tokenized equity perpetuals.
Bot operators who automate execution through webhook integration with a DCA Bot.
Free-tier TradingView users who want access to the same signal logic as the Strategy version without requiring backtest functionality.
Discretionary traders who want clear on-chart triggers and ladder projections for manual execution.

🔷 How does it work:
Long Entry Signal: When no virtual deal is active, the indicator marks a Base Order fill on the next confirmed bar with a green "BO" triangle below the bar. The base price, total cost, and quantity are recorded for later P&L calculation.
Short Entry: Not used — long-only signal framework by design.
Exit Management: A take-profit signal fires when two conditions align simultaneously — RSI(14, 15m) crosses above 70 AND the unrealized profit from the average entry reaches the minimum threshold (default 0.6%). The dual gate filters out RSI-triggered exits that would close deep-averaged positions at a loss. On exit, the indicator marks the bar with a cyan "TP" diamond and resets the virtual deal state.

🔷 Why it's unique:
Dual-gate exit logic — neither the RSI signal nor the minimum profit gate acts alone. Closing requires both — the timing trigger AND the economic justification. This ensures every signaled close is both momentum-confirmed and accumulation-corrected.
Tokenized equity focus — calibrated for perpetuals on tokenized stocks (GOOGL, AAPL, NVDA, COIN) where bullish equity drift combines with intraday volatility. The default 8-level cumulative ladder (cumulative −8.88% from base) reflects this volatility regime.
Bot Integration — entry and exit alerts ship with webhook-ready JSON payloads. Bot ID, Email Token, and pair label are exposed as inputs and automatically embedded into the alert message format.

🔷 What you'll see on the chart:
Cyan line — Base Entry price (reference for the SO ladder)
Yellow line — Average Entry price (recalculates as SOs fill)
Lime line — Take Profit target (Average × (1 + minProfit%))
Red lines (8) — Full SO ladder projected from base; fades to gray as each level fills
Green "BO" triangle (below bar) — New virtual deal opened
Red "SO" triangle (above bar) — Safety order filled at one of the ladder levels
Cyan "TP" diamond (above bar) — Dual-gate exit triggered, deal closed
Pink × marker — RSI cross above threshold (only profit-gate condition still pending)
Background tints — Green on BO bar, Red on SO bar, Cyan on TP bar
Stats card (top-left, configurable) — Live virtual results: Net P&L, Max Drawdown, Total Trades, Win Rate, Profit Factor

🔷 Considerations Before Using the Indicator:

Market & Timeframe: Designed for a 15-minute chart on tokenized equity perpetuals with active intraday range. Best suited to instruments with sustained bullish drift and regular pullback structure. Less suited for sustained downtrends or instruments without structural upside bias — tokenized stocks have embedded long-term upward expectation that crypto-native pairs do not always share. Other timeframes will produce different signal density.

Limitations: The indicator does not place orders. It tracks a "virtual deal" state on the chart for visualization purposes only — actual execution must be performed through a connected bot or manually. The signal framework carries no stop loss; in sustained downtrends extending beyond the deepest safety order (−8.88% from base), the virtual deal holds unrealized loss until either the average is recovered or the alert flow is manually overridden. The structural assumption is that the underlying tokenized equity will mean-revert upward over time — if this assumption breaks during equity bear markets, the strategy is materially exposed.

Virtual P&L Accuracy: The on-chart stats card uses a simplified internal accounting model — it does not factor exchange commission or slippage. Realized profit is computed as the raw (close − avgPx) × qty at the moment of exit. Use the Strategy version for fee-adjusted backtest results.

Backtesting & Demo Testing: Always validate the signal framework on historical data before connecting to a live bot. The companion Strategy version of this script is available on the same profile for full backtest analysis with realistic commissions and slippage. Demo-trade for at least one month to observe behavior in conditions not represented in historical data. Past performance is not indicative of future results.

Parameter Adjustments: RSI threshold (70) and the minimum profit gate (0.6%) should be tuned per instrument volatility. Tighter thresholds for lower-volatility tokenized stocks, wider for high-beta tickers. SO step (0.5%) and step coefficient (1.22) define ladder depth — widen the step for instruments with bigger intraday swings.

🔷 Backtest Validation:

This indicator shares identical signal logic with the Strategy version of the same framework, available on this profile for full historical performance review with realistic commission and slippage:

Strategy version:
[3Commas] Equity Pulse Long - DCA on Tokenized Stocks


Reference results from the Strategy version on BITGET:GOOGLUSDT.P, 15m chart, tested period Aug 26 2025 — May 15 2026:
Net Profit: +26.75 USDT (+5.35%) | Max Drawdown: 16.37 USDT (3.11%) | Total Trades: 199 | Win Rate: 84.92% (169 / 199) | Profit Factor: 8.782

The reference window captures a strong bullish phase for Google stock — the structurally ideal regime for the strategy's nonstop reload + RSI-confirmed exit design. The unusually high Profit Factor (8.78) reflects this regime favorability and is not expected to persist through bear markets or extended sideways periods. Refer to the Strategy publication for the complete equity curve, trade-by-trade breakdown, and Strategy Tester report.

🔷 How to Use It:
🔸 Adjust Settings: Configure Base Order and Safety Order volumes proportional to your account size and risk tolerance. The default 13.5 / 9-USDT structure is calibrated for a 500-USDT test account; scale linearly to your equity. RSI threshold can be tightened to 65 for more frequent exits or widened to 75 for fewer, larger captures. SO step should be widened on instruments with higher intraday volatility.

🔸 Visual Confirmation: Use the on-chart projections (base entry, SO ladder, average entry, TP target) to verify that the active virtual deal aligns with your bot's actual position. The indicator's virtual deal state is a 1-to-1 mirror of the Strategy version's signal logic (minus commission), so any divergence between chart visuals and bot position is a flag for investigation. The pink × markers help trace when RSI conditions fire without the profit gate being met yet.

🔸 Create alerts to trigger the DCA Bot: Two alert events are exposed by the indicator — "Deal Start" fires on each new base order signal, and "Deal Close" fires when the dual-gate exit triggers. Configure both alerts in TradingView with the webhook URL pointing to your DCA Bot's signal endpoint. The Bot ID, Email Token, and Pair label can be set in the script's inputs and are automatically embedded into the alert JSON payload.

🔷 INDICATOR SETTINGS
Base Order Volume (USDT, ref) — Reference notional for the initial entry; used for virtual P&L calculation.
Safety Order Volume (USDT, ref) — Reference notional for each averaging-down order.
Max Safety Orders — Total number of averaging steps tracked in the virtual deal.
Price Step % (1st SO from base) — Percentage deviation from base price for the first safety order.
Martingale Step Coefficient — Multiplier applied to each successive deviation step.
Martingale Volume Coefficient — Size multiplier applied to each successive safety order (default 1.0 = all equal).
Require RSI cross-above for close — Toggle the dual-gate exit; off makes it pure %-profit close.
RSI Length / Threshold / Timeframe — Parameters for the exit RSI signal.
Min Profit % (from avg entry) — Minimum unrealized profit threshold required for the exit gate.
Limit by Date Range — Constrain virtual backtest to a specific date window.
Initial Capital (ref for % calc) — Reference capital base for percentage metrics in the stats card.
Visual Layer toggles — Show/hide base line, average line, TP line, SO ladder, signal markers.
Stats card / Watermark — Display layer controls for on-chart virtual backtest summary and branding.
Webhook — Bot ID, Email Token, and Pair label for DCA Bot signal routing.

👨🏻‍💻💭 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.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.