RSIOMA_v2Only
Download scriptThis script functions as a specialized technical analysis tool designed to help traders evaluate the momentum of a financial asset. It works by applying a two-layer smoothing process to market data, creating a more refined version of the standard Relative Strength Index (RSI).
Core Logic and Methodology
The tool operates through a specific sequence of calculations to filter out "market noise" and provide a clearer picture of price trends:
1. The Foundation: Moving Average Smoothing Instead of calculating momentum based directly on volatile raw prices, the script first processes the market data into a Moving Average. By using a user-defined period (defaulting to 14), it averages out the recent price fluctuations. This step is crucial because it creates a "smoother" data set, making the subsequent analysis less susceptible to sudden, erratic price spikes that can often trigger false signals in standard indicators.
2. The Momentum Analysis: RSI Calculation Once the smoothed moving average is established, the script applies the Relative Strength Index (RSI) logic to that specific data set. The RSI measures the speed and change of price movements. By performing this calculation on the Moving Average rather than the raw price, the script produces a "smoothed momentum" reading.
Visual Interpretation for Traders
The indicator is displayed in a separate window below the main price chart, ranging from 0 to 100. It includes several pre-defined horizontal reference levels (such as 80, 70, 50, 30, and 20) to help users identify specific market conditions:
- Overbought/Oversold Zones: High values toward the top of the scale generally suggest that the asset may be overextended in an upward direction, while low values toward the bottom suggest it may be overextended downward.
- Trend Strength: The middle levels (like 50) help traders identify the current prevailing trend—whether the momentum is leaning more towards the "bullish" upper half or the "bearish" lower half.
Summary of Operation
In simple terms, this script takes market prices, averages them out to remove "jitter," and then measures the strength of that average's movement. The result is a cleaner, more stable momentum line that allows traders to see the underlying trend of an asset more clearly than a standard RSI might provide on its own.
//+--------------------------------------------------------------------------------+
//| RSIOMAv2 Only Kalenzo fxtsd.com |
//| RSIOMA only (- Hist/Sig mod) Copyright © 2004, MetaQuotes Software Corp. |
//| Hornet's i-RSI mod web: http://www.fxservice.eu ik |
//| FXtsd.com 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 1
#property indicator_color1 MediumBlue
#property indicator_width1 2
#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;
//---- buffers
double RSIBuffer[];
double MABuffer1[];
string short_name;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
short_name = StringConcatenate("RSIOMA(",RSIOMA,")");
IndicatorBuffers(7);
SetIndexBuffer(0,RSIBuffer);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(2,MABuffer1);
IndicatorShortName(short_name);
SetIndexDrawBegin(0,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--; }
//----
return(0);
}
//+----------------------------------------------
Comments