PROTECTED SOURCE SCRIPT

CCI + Buy/Sell Cross (supfabio)

20
This indicator is an enhanced version of the Commodity Channel Index (CCI) designed to generate clear BUY and SELL signals based on customizable level crossovers, with built-in support for webhook automation and external trade execution.

🔹 Signal Logic

BUY Signal:
Triggered when the CCI crosses upward (from below to above) the user-defined BUY level (red line).

SELL Signal:
Triggered when the CCI crosses downward (from above to below) the user-defined SELL level (green line).

Signals can optionally be configured to trigger only on candle close, reducing real-time noise and false signals.

🔹 Key Features

✅ Original CCI calculation (standard formula preserved)

✅ Fully configurable BUY and SELL levels

✅ Optional display of signal level lines

✅ Visual BUY / SELL markers plotted on the CCI panel

✅ Support for moving average smoothing and Bollinger Bands applied to the CCI

✅ Dynamic alerts using alert(), ideal for:

Webhook integrations

Trading bots

External servers and automated execution systems

🔹 Alerts & Webhook Integration

The indicator sends dynamic alert messages containing:

Action type (BUY / SELL)

Symbol

Closing price

Timestamp

To use:

Add the indicator to your chart

Create an alert and select “Any alert() function call”

Enable Webhook URL and configure your endpoint

Done — signals will be sent automatically

🔹 Best Use Cases

Traders who use CCI as a primary entry trigger

Momentum or mean-reversion strategies

Automated trading systems

Visual backtesting and signal validation

⚠️ Disclaimer

This indicator is not a complete trading system and does not replace proper risk management. Always use it in combination with market context, confirmation tools, and sound position sizing.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.