Author: Tak3Profit Copyright
RapidRSI

This tool is a specialized technical indicator designed for the MetaTrader platform. It is built to identify market momentum by providing a more reactive and precise version of the standard Relative Strength Index (RSI).

The Core Concept

In traditional trading, the RSI is often used to determine if an asset is "overbought" (priced too high) or "oversold" (priced too low). However, many traders find that the standard RSI can be sluggish; it sometimes fails to reach these extreme levels quickly enough to provide a useful signal, or it creates too much "noise" when the settings are adjusted to make it faster.

How This Version Works

The logic behind this specific script solves that problem by changing how price movements are calculated. Instead of using a traditional moving average—which smooths out price action and can "lag" behind current market trends—this indicator focuses on the raw sum of price changes over a specific period.

Here is the step-by-step logic used:

  • Price Movement Tracking: The script looks back at a user-defined number of days (the Period). For every day in that window, it calculates the difference between the closing price and the previous day's price.
  • Separating Up vs. Down: It separates these differences into two categories: total upward movement and total downward movement.
  • The Rapid Calculation: Rather than averaging these movements to find a "mean" trend, it treats them as a direct ratio. It calculates what percentage of the total price movement during that period was "up" versus "down."
  • The Final Score: The result is displayed on a scale from 0 to 100:
    • A score of 100 would mean all price movement in that period was upward.
    • A score of 0 would mean all price movement was downward.
    • A score of 50 indicates balanced movement (no net bias).

Key Benefits for the User

By removing the "averaging effect" of the standard RSI, this script provides a more immediate and sensitive reflection of market sentiment. It is designed to highlight shifts in momentum more rapidly, making it easier to identify aggressive moves in the market that a standard indicator might miss.

Miscellaneous
Implements a curve of type %1
8 Views
0 Downloads
0 Favorites
RapidRSI
//+------------------------------------------------------------------+
//|                                                  TP RapidRSI.mq4 |
//|                                                 NoName Copyright |
//|                                   http://TakeProfit.BlogSpot.com |
//| Given that the RSI line very rarely moves to oversold or         |
//| overbought we possibly need a more sensitive version of RSI.     |
//| This could be done by selecting an RSI of shorter duration but   |
//| more often than not all this does is increase the volatility of  |
//| the swings without actually providing any signals.               |
//| The alternative is to remove the averaging effect of the up and  |
//| down moves.                                                      |
//| Thus we shall replace this with the sum of the up and down moves:|
//|                                                                  |
//| Rapid RSI = 100 - ( 100 )                                        |
//| (1 - RS)                                                         |   
//| Where RS = sum of x day's up closes divided by sum of x day's    |
//| down closes                                                      |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Tak3Profit Copyright"
#property link      "http://TakeProfit.BlogSpot.com"

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
#property indicator_level1 70
#property indicator_level2 50
#property indicator_level3 30

extern int RSIPeriod = 14;

double RSI[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
   IndicatorBuffers(1);
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(0, RSI);
   SetIndexDrawBegin(0, RSIPeriod);
   
   string shortName = "RapidRSI [" + RSIPeriod + "]";
   IndicatorShortName(shortName);
   SetIndexLabel(0, shortName);
   SetLevelStyle(STYLE_SOLID,1,Red);

   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
   int counted_bars=IndicatorCounted();
//----
   if(Bars<=RSIPeriod) return(0);

   int limit = Bars - counted_bars-1;
   for(int i = limit + RSIPeriod; i>=0; i--)
{
      double up=0, down=0, diff=0;
      for(int j= i + RSIPeriod - 1; j>=i; j--){
         diff = Close[j] - Close[j+1];
         if(diff>0)
            up += diff;
         else 
            down += -diff;
      }
      if(up + down == 0){
         RSI[i] = 50;
      }else{
         RSI[i] = 100 * up / (up + down);
      }
   }
   return(0);
}
//+------------------------------------------------------------------+

Comments