PROTECTED SOURCE SCRIPT

RCI Buy/Sell Signals

41
RCI Buy/Sell Signals — Dual-RCI State Machine with EMA Bias (Protected)

A purpose-built signal tool that combines two RCI horizons with a deterministic state machine and an EMA-based background bias. It is not a simple mashup: the components are designed to work together so that trend context, timing, and exits form a coherent workflow.
The code remains closed-source to protect a proprietary implementation; this description explains what it does and how the pieces interact so traders can evaluate it.

What it does

On-chart signals: Marks potential BUY/SELL entries and EXITs directly on the chart (markers are drawn with a −1 bar offset for readability).

Trend bias at a glance: Background shading reflects EMA context:

Green when price is above both EMA1 and EMA2

Red when price is below both EMA1 and EMA2

No shading otherwise
(EMA lengths and timeframes are user-configurable.)

Deterministic state machine: Ensures only one active side at a time (flat → long/short → exit), so entries/exits do not overlap or contradict each other.

How it works (conceptual)

Two-horizon RCI framework:

A MID-RCI monitors regime transitions using mid-range thresholds.

A LONG-RCI acts as a slower directional filter/validator.

Two timing modes (you can enable either or both):

Steadily — MID-RCI transitions across mid-band thresholds (e.g., around −50/50) govern entries; LONG-RCI direction is used to confirm/align.

Above — LONG-RCI crosses its pivotal level (around zero) with directional agreement.
These modes are integrated—not stacked randomly—so that one provides timing, the other directional context.

Exits & risk guard: Exits trigger on MID-RCI reaching extreme bands (e.g., ±85) or when price violates a simple N-bar extremum stop (default: 20-bar low/high), whichever comes first. This makes exits explicit rather than relying on a trailing overlay.

Why this is not “just a merge”

The EMAs are not a separate indicator pasted on top; they only provide a binary bias that gates background shading and helps filter entries visually.

The RCI pair is functionally split (timing vs. confirmation) and then synchronized through a state machine that prevents conflicting signals and enforces clean transitions.

The script ships with signal placement discipline (−1 offset markers for clarity) and built-in exit logic based on RCI extremes plus a simple context stop—an integrated design choice, not an ad-hoc mix.

Inputs (overview)

Display: Show Entry Signals / Show Exit Signals / Show Background

Context: EMA1/EMA2 lengths & timeframes (background bias only)

RCI: Long/Mid lengths and source

How to use

Apply the script on a clean chart (no other indicators unless you explain why).

Use the background color as high-level bias, then use the on-chart signals for timing.

Optionally set alerts with “Any alert() function call” to receive signal notifications.

Confirm with your own risk management, liquidity checks, and higher-timeframe confluence.

Notes on publication (for moderators & traders)

Closed-source rationale: The specific RCI ranking/threshold scheme and the state-machine selection logic are part of ongoing proprietary research; the code is protected.

This description details the concepts and interactions sufficiently to understand what the script does and how components work together, while preserving implementation specifics.

Disclaimer

For educational/informational purposes only; not financial advice. Test thoroughly before live use. Trading involves risk.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.