OPEN-SOURCE SCRIPT
Advanced Momentum Engine [identityKa]

Overview
The Advanced Momentum Engine [identityKa] is a technical oscillator designed to consolidate trend direction and momentum exhaustion into a single visual pane. By mathematically integrating Moving Average Convergence Divergence (MACD) with the Relative Strength Index (RSI), this script aims to reduce chart clutter and provide a strict, rule-based approach to confluence analysis.
Instead of monitoring MACD crossovers and RSI extreme levels in separate windows, this indicator unifies them. The MACD dictates the base histogram color representing the trend, while the RSI dictates specific color overrides when momentum reaches mathematical extremes.
Core Calculations & Logic
The engine operates on two primary technical formulas:
MACD Component: It utilizes the standard MACD calculation (Fast EMA 12, Slow EMA 26, Signal 9 by default). The histogram plots the spread between the MACD line and the Signal line.
RSI Component: A standard RSI (default length 14) is calculated simultaneously in the background to measure the speed and change of price movements.
Dynamic Visualization Features
The histogram colors are not static; they adapt dynamically based on the relationship between these two components:
Trend Phases: When the RSI is in a neutral state (between 30 and 70), the histogram reflects standard MACD momentum. Increasing positive spreads plot as Strong Bullish (Bright Green), decreasing positive spreads as Weak Bullish (Dark Green). The inverse applies to Bearish states (Bright Red / Dark Red).
The Danger Zone Override: If the background RSI calculation breaches the user-defined Overbought (≥70) or Oversold (≤30) thresholds, the script triggers an override. The histogram and background explicitly turn Orange. This mathematical condition indicates that while the MACD trend may still be active, the RSI momentum is statistically exhausted.
HUD Dashboard & AI Suggestion
To simplify real-time data interpretation, the script includes an on-chart panel (HUD) that evaluates the current bar's state and outputs a logical suggestion:
LONG: Triggered when MACD > Signal AND RSI is strictly neutral (< 70).
SHORT: Triggered when MACD < Signal AND RSI is strictly neutral (> 30).
Dangerous: Triggered whenever RSI ≥ 70 OR RSI ≤ 30.
How to Use It
Traders can use this script to filter their entries and manage risk. A standard approach is to look for trend-following entries only when the dashboard indicates a "LONG" or "SHORT" state. Conversely, when the histogram and dashboard turn to the Orange "Danger Zone," it serves as a mechanical rule to avoid new trend-continuation entries and consider tightening stop-losses, as mean reversion is statistically more probable. All moving average lengths, RSI thresholds, and color themes are fully adjustable in the settings.
The Advanced Momentum Engine [identityKa] is a technical oscillator designed to consolidate trend direction and momentum exhaustion into a single visual pane. By mathematically integrating Moving Average Convergence Divergence (MACD) with the Relative Strength Index (RSI), this script aims to reduce chart clutter and provide a strict, rule-based approach to confluence analysis.
Instead of monitoring MACD crossovers and RSI extreme levels in separate windows, this indicator unifies them. The MACD dictates the base histogram color representing the trend, while the RSI dictates specific color overrides when momentum reaches mathematical extremes.
Core Calculations & Logic
The engine operates on two primary technical formulas:
MACD Component: It utilizes the standard MACD calculation (Fast EMA 12, Slow EMA 26, Signal 9 by default). The histogram plots the spread between the MACD line and the Signal line.
RSI Component: A standard RSI (default length 14) is calculated simultaneously in the background to measure the speed and change of price movements.
Dynamic Visualization Features
The histogram colors are not static; they adapt dynamically based on the relationship between these two components:
Trend Phases: When the RSI is in a neutral state (between 30 and 70), the histogram reflects standard MACD momentum. Increasing positive spreads plot as Strong Bullish (Bright Green), decreasing positive spreads as Weak Bullish (Dark Green). The inverse applies to Bearish states (Bright Red / Dark Red).
The Danger Zone Override: If the background RSI calculation breaches the user-defined Overbought (≥70) or Oversold (≤30) thresholds, the script triggers an override. The histogram and background explicitly turn Orange. This mathematical condition indicates that while the MACD trend may still be active, the RSI momentum is statistically exhausted.
HUD Dashboard & AI Suggestion
To simplify real-time data interpretation, the script includes an on-chart panel (HUD) that evaluates the current bar's state and outputs a logical suggestion:
LONG: Triggered when MACD > Signal AND RSI is strictly neutral (< 70).
SHORT: Triggered when MACD < Signal AND RSI is strictly neutral (> 30).
Dangerous: Triggered whenever RSI ≥ 70 OR RSI ≤ 30.
How to Use It
Traders can use this script to filter their entries and manage risk. A standard approach is to look for trend-following entries only when the dashboard indicates a "LONG" or "SHORT" state. Conversely, when the histogram and dashboard turn to the Orange "Danger Zone," it serves as a mechanical rule to avoid new trend-continuation entries and consider tightening stop-losses, as mean reversion is statistically more probable. All moving average lengths, RSI thresholds, and color themes are fully adjustable in the settings.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。