Comments for https://ctrader.com/products/3978
Comments for: https://ctrader.com/products/3978
- BBotTraderPro1
What’s the core logic behind this indicator (momentum, mean-reversion, volume, pattern)?
The main logic behind this indicator is Momentum (trend momentum/strength), with strong Mean-Reversion elements and a built-in Volatility filter.
This indicator does not use volume data (Volume) at all, nor does it rely on price patterns (Pattern).
Here's a detailed breakdown of how the code implements each of these assumptions:
- Momentum (Main Logic)
This is the foundation of this tool. The code is based on the RSI (Relative Strength Index), which is, by definition, a momentum oscillator.
Trend Strength Analysis: The indicator creates a "cloud" (Cloud) and a histogram by crossing the RSI itself with its own moving average (SignalLine).
Acceleration/Deceleration: The Histogram (HistUpAccel, HistUpDecel, etc.) calculates the difference between the RSI and the signal line (double hist = currentRsi - currentSig;). This works identically to the MACD histogram – it measures whether momentum is currently increasing or decreasing.
Cycle Phases: The CyclePhase function determines whether bulls/bears are gaining or losing strength based on whether the RSI is rising/falling and whether it is above/below the 50 level.
- Mean-Reversion (Extremes)
Although the indicator follows the trend (momentum), it also has built-in mechanisms for reversal, or mean reversion.
OB/OS Levels: LevelOB (default 70 - Overbought) and LevelOS (default 30 - Oversold) parameters.
When the RSI enters these zones, the indicator activates the "OVERBOUGHT"/"OVERSOLD" status and changes the colors to ColorExtreme (purple by default). This suggests that the market has drifted too far in one direction and a correction is possible.
- Volatility (Market Filter)
Volatility is not the main signal, but it plays a very important filter role here (the so-called Volatility Filter).
ATR (Average True Range): The code calculates the current ATR and compares it to its own average over the specified period (atrAvg).
If the current volatility (volatility) is less than the defined threshold (VolAtrMult), the volOk variable is set to false. As a result, the indicator can fade the candlestick colors on the chart (changing them to gray - #FF555555) and report "Low Vol" in the table. This prevents entering positions during a "flat" market (consolidation).
Summary
This is an Advanced Momentum Oscillator.
Its core analyzes the strength and direction of market movements (Momentum), warns against market overheating (Mean-reversion), and ignores false signals when the market is idle (Volatility filter).