RSIOMA_v2MaMa

Download script
Author: Copyright � 2007, MetaQuotes Software Corp.
RSIOMA_v2MaMa

The RSIOMAv2MA (Lite) is a sophisticated technical analysis tool designed to provide a smoother, multi-layered perspective on market momentum. Unlike the standard Relative Strength Index (RSI), which can often be volatile and produce "choppy" signals, this indicator applies a series of mathematical filters to refine the data, helping traders identify more reliable trends with less visual noise.

Core Logic and Data Processing

The script operates through a hierarchical calculation process. Instead of simply calculating the RSI based on raw price action (like open or close prices), it processes the data in four distinct stages:

  1. Base Smoothing: The script first takes the primary price data and applies an Exponential Moving Average (EMA). This initial step stabilizes the raw price input, removing minor fluctuations before any momentum analysis begins.
  2. Momentum Calculation: It then calculates the Relative Strength Index (RSI) based on that smoothed average. By deriving the RSI from a moving average rather than raw price, the resulting momentum reading is inherently more "fluid."
  3. Primary Trend Filtering: The script takes that RSI result and applies a second layer of smoothing—a Simple Moving Average (SMMA). This identifies the medium-term trend of the momentum itself.
  4. Secondary Trend Filtering: Finally, it applies a third layer of smoothing to the previous result. This creates a "signal" line that represents the macro-trend of the momentum.

Visual Interpretation for Traders

On your trading chart, this logic translates into three distinct lines:

  • The Momentum Line (Rsioma): Represents the primary smoothed RSI. It tells you the current strength of the move.
  • The Signal Lines (Ma_RSIOMA & MaMa_RSIOMA): These represent the deeper trends of the momentum.

How to Read the Results

Because this script applies multiple layers of moving averages, it is designed for traders who prefer "lagging" but more reliable signals over "leading" but erratic ones.

  • Trend Confirmation: When all three lines move in the same direction, it indicates a strong, well-established trend.
  • Crossovers: Traders often look for instances where the faster momentum lines cross the slower, deeper signal lines. These crossovers act as visual cues for potential shifts in market sentiment or potential entry and exit points.
  • Overbought/Oversold Context: By using the standard RSI levels (such as 70 for overbought and 30 for oversold) as a backdrop, you can see not just if the price is stretched, but whether the momentum of that price action is beginning to Exhaust or reverse.
Indicators Used
Moving average indicatorRelative strength indexMoving average indicator
Miscellaneous
Implements a curve of type %1
11 Views
0 Downloads
0 Favorites
RSIOMA_v2MaMa
//+--------------------------------------------------------------------------------+
//|                         RSIOMAv2MA(Lite)             Kalenzo    fxtsd.com      |
//| Hornet(i-RSI) - HistLevel/Sig mod   Copyright © 2004, MetaQuotes Software Corp.|
//|  FXtsd.com                                    web: http://www.fxservice.eu   ik|
//|                                           email: bartlomiej.gorski@gmail.com   |
//+--------------------------------------------------------------------------------+
//  The base for this indicator was orginal RSI attached with Metatrader.
//                                       ^ removed ^ :)|-<   Hornet  buchered by fxbs

#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net/"

#property indicator_separate_window
#property indicator_maximum 100
#property indicator_minimum 0
#property indicator_buffers 3
#property indicator_color1 Blue
#property indicator_color2 DarkViolet
#property indicator_color3 DodgerBlue
#property indicator_width1 2   
#property indicator_width2 1
#property indicator_width3 1   
#property indicator_level1 100
#property indicator_level2 80//76.4
#property indicator_level3 70//61.8
#property indicator_level4 50
#property indicator_level5 30//38.2
#property indicator_level6 20 //23.6
#property indicator_level7 0
#property indicator_levelcolor  SlateGray
//---- input parameters
extern int RSIOMA          = 14;
extern int RSIOMA_MODE     = MODE_EMA;
extern int RSIOMA_PRICE    = PRICE_CLOSE;

extern int Ma_RSIOMA       = 9,
           Ma_RSIOMA_MODE  = MODE_SMMA;

 extern int MaMa_RSIOMA       = 7,
            MaMa_RSIOMA_MODE  =MODE_SMMA;

//---- buffers
double RSIBuffer[];
double MABuffer1[];
double MaRsioma[];
double MaMaRsioma[];
string short_name;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   short_name = StringConcatenate("RSIOMA(",RSIOMA,")");   
   IndicatorBuffers(7);
   
   SetIndexBuffer(0,RSIBuffer);
   SetIndexBuffer(1,MaRsioma);
    SetIndexBuffer(2,MaMaRsioma);
  
   SetIndexStyle(0,DRAW_LINE);
   SetIndexStyle(1,DRAW_LINE);
    SetIndexStyle(2,DRAW_LINE);
  
   SetIndexBuffer(3,MABuffer1);
         
   IndicatorShortName(short_name);

   SetIndexDrawBegin(0,RSIOMA);
   SetIndexDrawBegin(1,RSIOMA);
   SetIndexDrawBegin(2,RSIOMA);
   SetIndexShift(2,0);
 
   SetIndexLabel(0,"Rsioma ["+RSIOMA+"]("+RSIOMA_MODE+")");
   SetIndexLabel(1,"MaRsioma["+Ma_RSIOMA+"]("+Ma_RSIOMA_MODE+")");
   SetIndexLabel(2,"MaMaRsioma["+MaMa_RSIOMA+"]("+MaMa_RSIOMA_MODE+")");
  
   return(0);
  }
//+------------------------------------------------------------------+
//| Relative Strength Index                                          |
//+------------------------------------------------------------------+
int start()
  {
   int   i, ii; 
   int   counted_bars=IndicatorCounted();
//----
   if(Bars<=RSIOMA) return(0);
//---- initial zero
   if(counted_bars<1)
      for(i=1;i<=RSIOMA;i++) {RSIBuffer[Bars-i]=0.0;}
//----
   ii=Bars-RSIOMA-1;
   if(counted_bars>=RSIOMA) ii=Bars-counted_bars-1;
   i = ii;
   while(i>=0)
      {  MABuffer1[i]=iMA(Symbol(),0,RSIOMA,0,RSIOMA_MODE,RSIOMA_PRICE,i);
      i--;  }
   i=ii;
   while(i>=0)           
      {  RSIBuffer[i]=iRSIOnArray(MABuffer1,0,RSIOMA,i);
      i--;  }
   i=ii;   
   while(i>=0)
      {  MaRsioma[i] = iMAOnArray(RSIBuffer,0,Ma_RSIOMA,0,Ma_RSIOMA_MODE,i); 
      i--;}
   i=ii;  
   while(i>=0)
      {  MaMaRsioma[i] = iMAOnArray(MaRsioma,0,MaMa_RSIOMA,1,MaMa_RSIOMA_MODE,i); 
      i--;}
 i=ii;  

//----
return(0);
}
//+------------------------------------------------------------------+

Comments