RSIOMA_v3CDVar
Download scriptThe RSIOMA_v3CDVar indicator is a multi-layered technical analysis tool designed to smooth out market noise and identify specific momentum trends. Unlike standard indicators that look at price in isolation, this script applies a "nested" logic, calculating moving averages on top of other moving averages to produce a refined view of market behavior.
Here is a breakdown of how the logic flows:
1. The Foundation: Moving Average (MA)
The process begins by calculating a standard Moving Average based on the price of the asset (such as the closing price). This serves as the base layer, smoothing out minor price fluctuations to reveal the primary trend.
2. The Momentum Layer: RSI of the MA
Instead of applying a Relative Strength Index (RSI) directly to the raw price—which can often be erratic—this script applies the RSI calculation to the Moving Average created in the first step. By doing this, the indicator measures the "strength" of the trend rather than just the volatility of the price. This helps in identifying whether the current movement has sustained momentum or if it is beginning to exhaust itself.
3. The Smoothing Layer: MA of the RSIOMA
To further refine the data, the script performs another layer of smoothing. It takes the result from the previous step (the RSI of the Moving Average) and applies yet another Moving Average to it. This secondary smoothing filters out "false signals" or temporary spikes, providing a cleaner, more stable line for the user to observe.
4. The Final Output: The MACD Component
The final visual element is generated by calculating the difference between the RSIOMA (the smoothed momentum) and its own Moving Average. This follows the logic of a MACD (Moving Average Convergence Divergence) system.
In practical terms, this means:
- Visual Representation: The indicator provides you with a histogram and lines that represent the "gap" between current momentum and average momentum.
- Trend Identification: When these values move significantly above or below the center line, it suggests a strengthening trend in either the bullish (upward) or bearish (downward) direction.
- Filtering Noise: Because this logic layers three different calculations (MA $\rightarrow$ RSI $\rightarrow$ MA), it is specifically designed to provide a "quieter" and more reliable signal than most standard indicators, making it useful for traders who want to see the underlying trend without being distracted by minor market vibrations.
//+--------------------------------------------------------------------------------+
//| RSIOMA_v3CDVar by Kalenzo |
//+--------------------------------------------------------------------------------+
// mod2008fxtsd ml ki
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 DarkSlateGray
#property indicator_color2 Purple
#property indicator_color3 MediumBlue
#property indicator_width1 1
#property indicator_width2 1
#property indicator_width3 2
//#property indicator_maximum 100
//#property indicator_minimum 0
#property indicator_level1 80 //76.4
#property indicator_level2 70 //61.8
#property indicator_level3 50
#property indicator_level4 30 //38.2
#property indicator_level5 20 //23.6
#property indicator_levelcolor SlateGray
//---- input parameters
extern int MA_Period = 11;
extern int MA_MODE = MODE_EMA;
extern int MA_PRICE = PRICE_CLOSE;
extern int RSI_ofMA_Period = 9;
extern int RSI_ofMA_PRICE = PRICE_CLOSE;
extern int MA_RSIOMA_Period = 7;
extern int MA_RSIOMA_MODE = MODE_EMA;
extern string note_MA_Mode = "SMA0 EMA1 SMMA2 LWMA3";
extern string _____Price = "0C 1O 2H 3L 4Md 5Tp 6WghC: Md(HL/2)4,Tp(HLC/3)5,Wgh(HLCC/4)6";
//---- buffers
double MAbuffer[];
double RSIOMAbuffer[];
double MaRSIOMAbuffer[];
double RSIOMACDbuffer[];
//+--
int init()
{
IndicatorBuffers(4);
SetIndexBuffer (0,RSIOMACDbuffer);
SetIndexBuffer (1,MaRSIOMAbuffer);
SetIndexBuffer (2,RSIOMAbuffer);
SetIndexBuffer (3,MAbuffer);
SetIndexStyle (0,DRAW_HISTOGRAM);
SetIndexStyle (1,DRAW_LINE);
SetIndexStyle (2,DRAW_LINE);
SetIndexLabel (0,"MA_RSIOMACD");
SetIndexLabel (1,"MA_RSIOMA");
SetIndexLabel (2,"RSIOMA");
string short_name;
short_name = "RSIOMA (MA "+MA_Period+", RSI "+RSI_ofMA_Period+", MaRSIOMA "+MA_RSIOMA_Period+")";
IndicatorShortName(short_name);
return(0);
}
//+--
int start()
{
int i, limit, counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i=limit;i>=0;i--) MAbuffer[i] = iMA(NULL,0,MA_Period,0,MA_MODE,MA_PRICE,i);
for(i=limit;i>=0;i--) RSIOMAbuffer[i] = iRSIOnArray(MAbuffer,0,RSI_ofMA_Period,i);
for(i=limit;i>=0;i--) MaRSIOMAbuffer[i] = iMAOnArray(RSIOMAbuffer,0,MA_RSIOMA_Period,0,MA_RSIOMA_MODE,i);
for(i=limit;i>=0;i--) RSIOMACDbuffer[i] = RSIOMAbuffer[i] - MaRSIOMAbuffer[i];
//----
return(0);
}
Comments