RSIOMA_v3Var
Download scriptThis tool is designed as a specialized visual indicator for trading platforms, created to help traders identify momentum and trend shifts by layering three distinct mathematical filters on top of price action. Instead of looking at the raw price directly, this script smooths out market "noise" to reveal the underlying strength of the current movement.
How the Logic Works
The logic operates through a three-step processing chain. Each step takes the output of the previous one to create a highly refined signal:
1. The Foundation (Moving Average) First, the tool calculates a Moving Average of the price. By doing this, it ignores minor, jagged price fluctuations and creates a smoother line that represents the general direction of the market. You can customize how much historical data is considered and which specific type of average (such as Simple or Exponential) is used to determine this path.
2. The Momentum Filter (RSI of the Moving Average) Rather than applying a standard Relative Strength Index (RSI) directly to the price, this script applies the RSI calculation to the Moving Average produced in the first step. This measures the "velocity" or momentum of the trend itself. It tells you whether the smoothed trend is accelerating upwards, slowing down, or losing steam, helping to identify potential overbought or oversold conditions within a moving trend.
3. The Final Smoothing (Moving Average of the RSI) To ensure the signals are not too erratic, the script performs one final calculation by applying another Moving Average to the momentum values. This final layer acts as a stabilizer, smoothing out any remaining "jitter" in the momentum data.
Visual Output and Interpretation
The result is displayed in a separate window on your trading chart. By combining these three layers—Moving Average $\rightarrow$ RSI $\rightarrow$ Moving Average—the indicator provides a refined view of market dynamics.
- Trend Identification: It allows you to see the "flow" of the market more clearly than price alone.
- Stability: Because it is triple-filtered, the lines on the chart are less likely to react to "fake" price spikes, providing a more consistent view of whether the market strength is truly shifting or merely fluctuating.
- Reference Levels: The tool includes pre-set horizontal levels (such as 80, 70, 50, 30, and 20) to help you quickly identify when the momentum has reached extreme territories.
//+--------------------------------------------------------------------------------+
//| RSIOMA_v3Var by Kalenzo |
//+--------------------------------------------------------------------------------+
// mod2008fxtsd
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 MediumBlue
#property indicator_color2 Purple
#property indicator_width1 2
#property indicator_width2 1
#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[];
//+--
int init()
{
IndicatorBuffers(3);
SetIndexBuffer(0,RSIOMAbuffer);
SetIndexBuffer(1,MaRSIOMAbuffer);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(2,MAbuffer);
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);
//----
return(0);
}
Comments