RSIOMA_v2MA

Author: Copyright � 2007, MetaQuotes Software Corp.
RSIOMA_v2MA

This technical indicator is designed to help traders identify momentum and potential trend reversals by smoothing out the standard Relative Strength Index (RSI) data. While a standard RSI can often be "noisy" or produce frequent false signals due to rapid price fluctuations, this specific tool applies multiple layers of mathematical filtering to provide a clearer picture of market behavior.

Core Logic Overview

The script follows a three-step process to transform raw price data into a smoother, more reliable visual trend:

1. Price Smoothing (Moving Average) Instead of calculating the indicator based on the immediate closing price of every candle, the tool first calculates a Moving Average (MA). By doing this, it filters out "market noise"—the small, insignificant ups and downs—and focuses on the broader price movement over a specific period.

2. Momentum Calculation (RSI) Once the price data is smoothed, the script applies the Relative Strength Index (RSI) formula to that smoothed average. This step measures the speed and change of price movements. Because it is measuring a smoothed average rather than raw price, the resulting momentum values are much more stable and less prone to erratic spikes.

3. Trend Filtering (Final Smoothing) To ensure the highest level of clarity, the script applies a final layer of smoothing to the RSI results. This produces a final "signal" line that helps traders see the underlying trend direction without being distracted by minor fluctuations in the momentum.

Visual Interpretation

The indicator operates within a window ranging from 0 to 100, featuring several key horizontal levels (such as 80, 70, 50, 30, and 20) that serve as visual boundaries:

  • Overbought/Oversold Zones: When the lines approach the upper levels (near 80), it suggests the market may be overextended to the upside. Conversely, when they dip toward the lower levels (near 20), it may indicate an oversold condition.
  • Trend Direction: The primary goal of this multi-layered smoothing logic is to let the trader see whether momentum is steadily increasing or decreasing. By removing the "jitter" found in standard oscillators, it allows for a more relaxed observation of where the market is heading.

Summary for the Trader

Essentially, this tool takes raw price data and puts it through a "refinery." It strips away the minor distractions of the market first, calculates the momentum of that refined data, and then polishes that result into a smooth line. This makes it an ideal choice for traders who prefer following established trends rather than reacting to every small, instantaneous price twitch.

Indicators Used
Moving average indicatorRelative strength indexMoving average indicator
Miscellaneous
Implements a curve of type %1
15 Views
0 Downloads
0 Favorites
RSIOMA_v2MA
//+--------------------------------------------------------------------------------+
//|                         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 2
#property indicator_color1 MediumBlue
#property indicator_color2 Purple
#property indicator_width1 2   
#property indicator_width2 1
//#property indicator_level1 100
#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_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       = 21,
           Ma_RSIOMA_MODE  = MODE_EMA;


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

   SetIndexDrawBegin(0,RSIOMA);
   SetIndexDrawBegin(1,RSIOMA);
   return(0);
  }
//+------------------------------------------------------------------+
//| Relative Strength Index                                          |
//+------------------------------------------------------------------+
int start()
  {
   int   i, ii; 
   int   counted_bars=IndicatorCounted();
   double rel,negative,positive;
//----
   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--;}
//----
return(0);
}
//+------------------------------------------------------------------+

Comments