PROTECTED SOURCE SCRIPT
CCI + Buy/Sell Cross (supfabio)

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.
🔹 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.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.