Author: Copyright � 2006 , David W Honeywell , 12/12/2006
ColorRSI

This indicator is designed to provide a visual representation of the Relative Strength Index (RSI), a common tool used by traders to determine whether an asset is being overbought or oversold. Rather than showing a single continuous line, this script enhances the standard RSI by incorporating dynamic color coding to help you identify market sentiment at a glance.

Core Functionality

The primary goal of this tool is to distinguish between upward and downward momentum automatically. It monitors the RSI value in real-time and splits the visual data into two distinct categories based on a central threshold of 50:

  • Bullish Momentum (Above 50): When the RSI value climbs above the 50 mark, the indicator recognizes this as positive momentum. The script then highlights this data in Green.
  • Bearish Momentum (Below 50): When the RSI value falls below the 50 mark, the indicator identifies this as negative momentum and highlights the data in Red.

How it Works for the User

By separating the data into two different colors based on that middle line, the tool makes it easier to see the "tug-of-war" between buyers and sellers. Instead of just seeing a wavy line, you can instantly see when the trend shifts from one side to the other because the color of the line will switch.

Key Customizations

The script allows you to adjust several settings to fit your specific trading style:

  • RSI Periods: You can change the sensitivity of the calculation (how many past candles are used to determine the current strength).
  • Applied Price: This allows you to choose which price data the indicator should look at (e.g., the closing price, the open price, etc.).
  • Line Width: You can adjust how bold or thin the lines appear on your chart for better visibility.

In summary, this is a visual enhancement tool that simplifies market analysis by using color-coded shifts to notify you immediately when momentum moves from bullish to bearish territory.

Indicators Used
Relative strength index
Miscellaneous
Implements a curve of type %1
13 Views
0 Downloads
0 Favorites
ColorRSI
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                     ColorRSI.mq4 |
//|                Copyright © 2006 , David W Honeywell , 12/12/2006 |
//|                                     HellOnWheels.Trans@gmail.com |
//+------------------------------------------------------------------+

#property copyright "Copyright © 2006 , David W Honeywell , 12/12/2006"
#property link      "HellOnWheels.Trans@gmail.com"

#property indicator_separate_window

#property indicator_buffers 2

#property indicator_color1 Green
#property indicator_color2 Red

#property indicator_maximum 100.0
#property indicator_minimum   0.0

#property indicator_level1 70
#property indicator_level2 50
#property indicator_level3 20

extern int IndicatorTime =  0;
extern int RSI_Periods   = 3;
extern int Applied_Price =  0;
extern int LineWidth     =  4;

double Buffer0[];
double Buffer1[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
 {
//---- indicators

SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,LineWidth);
SetIndexBuffer(0,Buffer0);

SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,LineWidth);
SetIndexBuffer(1,Buffer1);

IndicatorShortName(" ColorRSI ( "+RSI_Periods+" )");

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

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+

int deinit()
 {

//----

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

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+

int start()
 {
  
  int     counted_bars=IndicatorCounted();
  double  RSIValue;
  int     i;
  int     limit;

  limit = Bars-counted_bars;
  
  for(i=limit; i>0; i--)
   {
     RSIValue=iRSI(Symbol(),IndicatorTime,RSI_Periods,Applied_Price,i);
    if (RSIValue > 50.00000000)
     {
       Buffer0[i] = RSIValue;
       Buffer1[i] = EMPTY_VALUE;
       if (Buffer0[i+1] == EMPTY_VALUE) Buffer0[i+1] = Buffer1[i+1]; 
     }
    else
     {
       Buffer0[i] = EMPTY_VALUE; 
       Buffer1[i] = RSIValue;
       if (Buffer1[i+1] == EMPTY_VALUE) Buffer1[i+1] = Buffer0[i+1]; 
     }
   }

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

//+------------------------------------------------------------------+

Comments