_TRO_RSI_MULTI
Download scriptThis script is a visual multi-timeframe analysis tool designed for MetaTrader. It provides a unique "meter" style display that allows traders to monitor the Relative Strength Index (RSI)—a common momentum indicator—across seven different timeframes simultaneously on a single chart.
Core Logic and Functionality
Multi-Timeframe Synchronization The primary purpose of this script is to consolidate data. Instead of having to switch between different charts to see how the market is performing in the short term (like 1-minute or 5-minute charts) versus the long term (like Daily or Weekly charts), this tool fetches all that information at once. It specifically tracks the following timeframes:
- 1 Minute (M1)
- 5 Minutes (M5)
- 15 Minutes (M15)
- 30 Minutes (M30)
- 1 Hour (H1)
- 4 Hours (H4)
- Daily (D1)
The Visual "Meter" System Rather than plotting standard lines on a graph, the script creates a series of vertical bars or "meters." Each bar represents one of the timeframes listed above. The logic uses color-coding to provide an instant visual cue regarding market momentum:
- Green/Lime: Indicates very high positive momentum (the upper range).
- Yellow/Gold: Represents moderate to high momentum.
- Orange/Red: Indicates lower momentum or potential oversold conditions (the lower range).
When the price moves, these meters update their colors dynamically. This allows a user to see at a glance if all timeframes are aligned in the same direction (e.g., all bars showing strong green) or if there is a conflict between short-term and long-term trends.
Customizable Testing and Offsets The script includes a "Test Mode." When enabled, it allows the user to look back at specific historical data points using a manual date/time input. If the test mode is off, it uses standard real-time data with an optional "shift" (offset) to determine how far back in time the indicator should calculate its values.
User Interface Elements
- Labels: The script automatically creates text labels for each bar so the user knows exactly which timeframe they are looking at (e.g., "M1", "H1", "D1").
- Dynamic Cleaning: Every time the chart updates, the script "blanks" the previous visuals and redraws them. This ensures that the display stays clean and only shows the most current data without leaving "ghost" images or old lines behind.
//+------------------------------------------------------------------+
//| _TRO_RSI_MULTI |
//| |
//| Copyright © 2007, Avery T. Horton, Jr. aka TheRumpledOne |
//| |
//| PO BOX 43575, TUCSON, AZ 85733 |
//| |
//| GIFT AND DONATIONS ACCEPTED |
//| |
//| therumpldone@gmail.com |
//+------------------------------------------------------------------+
// I used code from FERRUXX and Robert Hill - Thanks for sharing!
//+------------------------------------------------------------------+
#property copyright "Avery T. Horton, Jr. aka TheRumpledOne"
#property link ""
#property indicator_chart_window
//---- input parameters
//extern string myPair = "" ;
extern int myxstart=130 ;
extern int myystart=400 ;
// indicators parameters
extern string Shift_Settings_test_only = "=== Format: 2007.05.07 00:00 ===";
extern datetime look_time_shift = D'2007.05.07 00:00'; // Shift for test if "test" is true
extern double shift_indicators = 0; // Shift for indicators if "test" is false
extern bool test = false;
string RSI_Settings = "=== RSI Settings ===";
extern int RSIPeriod = 2; // RSI period
extern double v0 = 95 ;
extern double v1 = 80 ;
extern double v2 = 50 ;
extern double v3 = 20 ;
extern double v4 = 5 ;
extern double v5 = 0 ;
int myPeriod1 = 1 ;
int myPeriod2 = 5 ;
int myPeriod3 = 15 ;
int myPeriod4 = 30 ;
int myPeriod5 = 60 ;
int myPeriod6 = 240 ;
int myPeriod7 = 1440 ;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
initGraph();
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
deleteObject();
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
string Period2Text(int TmPeriod)
{
switch (TmPeriod)
{
case PERIOD_M1 : return("M1");
case PERIOD_M5 : return("M5");
case PERIOD_M15 : return("M15");
case PERIOD_M30 : return("M30");
case PERIOD_H1 : return("H1");
case PERIOD_H4 : return("H4");
case PERIOD_D1 : return("D1");
case PERIOD_W1 : return("W1");
case PERIOD_MN1 : return("MN1");
}
return ("ERR");
}
int start()
{
// Shift calculation for indicators (tests only)
double shift_1, shift_5, shift_15, shift_30, shift_60, shift_240, shift_1440, shift_10080;
if( test == true )
{
shift_1=iBarShift(NULL,PERIOD_M1,look_time_shift,false);
shift_5=iBarShift(NULL,PERIOD_M5,look_time_shift,false);
shift_15=iBarShift(NULL,PERIOD_M15,look_time_shift,false);
shift_30=iBarShift(NULL,PERIOD_M30,look_time_shift,false);
shift_60=iBarShift(NULL,PERIOD_H1,look_time_shift,false);
shift_240=iBarShift(NULL,PERIOD_H4,look_time_shift,false);
shift_1440=iBarShift(NULL,PERIOD_D1,look_time_shift,false);
shift_10080=iBarShift(NULL,PERIOD_W1,look_time_shift,false);
}
else
{
shift_1=shift_indicators;
shift_5=shift_indicators;
shift_15=shift_indicators;
shift_30=shift_indicators;
shift_60=shift_indicators;
shift_240=shift_indicators;
shift_1440=shift_indicators;
shift_10080=shift_indicators;
}
// Indicator (Moving Average)
color color_ind = PowderBlue;
double x;
color color_indic;
// Indicator (RSI)
string RSI_Trend_1, RSI_Trend_5, RSI_Trend_15, RSI_Trend_30, RSI_Trend_60, RSI_Trend_240, RSI_Trend_1440, RSI_Trend_10080;
double rsi_1=iRSI(NULL,PERIOD_M1,RSIPeriod,PRICE_CLOSE,shift_1);
double rsi_5=iRSI(NULL,PERIOD_M5,RSIPeriod,PRICE_CLOSE,shift_5);
double rsi_15=iRSI(NULL,PERIOD_M15,RSIPeriod,PRICE_CLOSE,shift_15);
double rsi_30=iRSI(NULL,PERIOD_M30,RSIPeriod,PRICE_CLOSE,shift_30);
double rsi_60=iRSI(NULL,PERIOD_H1,RSIPeriod,PRICE_CLOSE,shift_60);
double rsi_240=iRSI(NULL,PERIOD_H4,RSIPeriod,PRICE_CLOSE,shift_240);
double rsi_1440=iRSI(NULL,PERIOD_D1,RSIPeriod,PRICE_CLOSE,shift_1440);
double rsi_10080=iRSI(NULL,PERIOD_W1,RSIPeriod,PRICE_CLOSE,shift_10080);
objectBlank();
paintCol1(rsi_1 );
paintCol2(rsi_5 );
paintCol3(rsi_15 );
paintCol4(rsi_30 );
paintCol5(rsi_60 );
paintCol6(rsi_240 );
paintCol7(rsi_1440 );
paintLine();
//----
return(0);
}
//+------------------------------------------------------------------+
void initGraph()
{
deleteObject();
int xstart=myxstart, xinc=20;
int ystart=myystart, yinc=8;
int ystart1=ystart+yinc;
int ystart2=ystart+yinc*2;
int ystart3=ystart+yinc*3;
int ystart4=ystart+yinc*4;
int ystart5=ystart+yinc*5;
objectCreate("RSI_1_0",xstart,ystart5);
objectCreate("RSI_1_1",xstart,ystart4);
objectCreate("RSI_1_2",xstart,ystart3);
objectCreate("RSI_1_3",xstart,ystart2);
objectCreate("RSI_1_4",xstart,ystart1);
objectCreate("RSI_1_5",xstart,ystart);
objectCreate("RSI_1",xstart+2,ystart+1,Period2Text(myPeriod1),9,"Arial Narrow",SkyBlue);
objectCreate("RSI_1p",xstart+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart2 = xstart - xinc ;
objectCreate("RSI_2_0",xstart2,ystart5);
objectCreate("RSI_2_1",xstart2,ystart4);
objectCreate("RSI_2_2",xstart2,ystart3);
objectCreate("RSI_2_3",xstart2,ystart2);
objectCreate("RSI_2_4",xstart2,ystart1);
objectCreate("RSI_2_5",xstart2,ystart);
objectCreate("RSI_2",xstart2+2,ystart+1,Period2Text(myPeriod2),9,"Arial Narrow",SkyBlue);
objectCreate("RSI_2p",xstart2+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart3 = xstart2 - xinc ;
objectCreate("RSI_3_0",xstart3,ystart5);
objectCreate("RSI_3_1",xstart3,ystart4);
objectCreate("RSI_3_2",xstart3,ystart3);
objectCreate("RSI_3_3",xstart3,ystart2);
objectCreate("RSI_3_4",xstart3,ystart1);
objectCreate("RSI_3_5",xstart3,ystart);
objectCreate("RSI_3",xstart3+2,ystart+1,Period2Text(myPeriod3),8,"Arial Narrow",SkyBlue);
objectCreate("RSI_3p",xstart3+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart4 = xstart3 - xinc ;
objectCreate("RSI_4_0",xstart4,ystart5);
objectCreate("RSI_4_1",xstart4,ystart4);
objectCreate("RSI_4_2",xstart4,ystart3);
objectCreate("RSI_4_3",xstart4,ystart2);
objectCreate("RSI_4_4",xstart4,ystart1);
objectCreate("RSI_4_5",xstart4,ystart);
objectCreate("RSI_4",xstart4+2,ystart+1,Period2Text(myPeriod4),8,"Arial Narrow",SkyBlue);
objectCreate("RSI_4p",xstart4+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart5 = xstart4 - xinc ;
objectCreate("RSI_5_0",xstart5,ystart5);
objectCreate("RSI_5_1",xstart5,ystart4);
objectCreate("RSI_5_2",xstart5,ystart3);
objectCreate("RSI_5_3",xstart5,ystart2);
objectCreate("RSI_5_4",xstart5,ystart1);
objectCreate("RSI_5_5",xstart5,ystart);
objectCreate("RSI_5",xstart5+2,ystart+1,Period2Text(myPeriod5),9,"Arial Narrow",SkyBlue);
objectCreate("RSI_5p",xstart5+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart6 = xstart5 - xinc ;
objectCreate("RSI_6_0",xstart6,ystart5);
objectCreate("RSI_6_1",xstart6,ystart4);
objectCreate("RSI_6_2",xstart6,ystart3);
objectCreate("RSI_6_3",xstart6,ystart2);
objectCreate("RSI_6_4",xstart6,ystart1);
objectCreate("RSI_6_5",xstart6,ystart);
objectCreate("RSI_6",xstart6+2,ystart+1,Period2Text(myPeriod6),9,"Arial Narrow",SkyBlue);
objectCreate("RSI_6p",xstart6+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart7 = xstart6 - xinc ;
objectCreate("RSI_7_0",xstart7,ystart5);
objectCreate("RSI_7_1",xstart7,ystart4);
objectCreate("RSI_7_2",xstart7,ystart3);
objectCreate("RSI_7_3",xstart7,ystart2);
objectCreate("RSI_7_4",xstart7,ystart1);
objectCreate("RSI_7_5",xstart7,ystart);
objectCreate("RSI_7",xstart7+2,ystart+1,Period2Text(myPeriod7),9,"Arial Narrow",SkyBlue);
objectCreate("RSI_7p",xstart7+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
string tRSI = "RSI("+RSIPeriod+")" ;
objectCreate("RSI_L97",xstart7,ystart+70,tRSI,10,"Arial",DimGray);
objectCreate("RSI_sign",xstart7,ystart-10,"»»» RSI METER © «««",8,"Arial Narrow",DimGray);
// objectCreate("RSI",xstart+24,ystart3-2,"RSI" ,8,"Arial Narrow",DimGray);
}
//+------------------------------------------------------------------+
void objectCreate(string name,int x,int y,string text="-",int size=42,
string font="Arial",color colour=CLR_NONE)
{
ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSet(name,OBJPROP_CORNER,3);
ObjectSet(name,OBJPROP_COLOR,colour);
ObjectSet(name,OBJPROP_XDISTANCE,x);
ObjectSet(name,OBJPROP_YDISTANCE,y);
ObjectSetText(name,text,size,font,colour);
}
void deleteObject()
{
// ObjectDelete("fma");
// ObjectDelete("mma");
// ObjectDelete("sma");
ObjectDelete("RSI_sign");
ObjectDelete("RSI_L97");
ObjectDelete("RSI_1_0");
ObjectDelete("RSI_1_1");
ObjectDelete("RSI_1_2");
ObjectDelete("RSI_1_3");
ObjectDelete("RSI_1_4");
ObjectDelete("RSI_1_5");
ObjectDelete("RSI_1");
ObjectDelete("RSI_1p");
ObjectDelete("RSI_2_0");
ObjectDelete("RSI_2_1");
ObjectDelete("RSI_2_2");
ObjectDelete("RSI_2_3");
ObjectDelete("RSI_2_4");
ObjectDelete("RSI_2_5");
ObjectDelete("RSI_2");
ObjectDelete("RSI_2p");
ObjectDelete("RSI_3_0");
ObjectDelete("RSI_3_1");
ObjectDelete("RSI_3_2");
ObjectDelete("RSI_3_3");
ObjectDelete("RSI_3_4");
ObjectDelete("RSI_3_5");
ObjectDelete("RSI_3");
ObjectDelete("RSI_3p");
ObjectDelete("RSI_4_0");
ObjectDelete("RSI_4_1");
ObjectDelete("RSI_4_2");
ObjectDelete("RSI_4_3");
ObjectDelete("RSI_4_4");
ObjectDelete("RSI_4_5");
ObjectDelete("RSI_4");
ObjectDelete("RSI_4p");
ObjectDelete("RSI_5_0");
ObjectDelete("RSI_5_1");
ObjectDelete("RSI_5_2");
ObjectDelete("RSI_5_3");
ObjectDelete("RSI_5_4");
ObjectDelete("RSI_5_5");
ObjectDelete("RSI_5");
ObjectDelete("RSI_5p");
ObjectDelete("RSI_6_0");
ObjectDelete("RSI_6_1");
ObjectDelete("RSI_6_2");
ObjectDelete("RSI_6_3");
ObjectDelete("RSI_6_4");
ObjectDelete("RSI_6_5");
ObjectDelete("RSI_6");
ObjectDelete("RSI_6p");
ObjectDelete("RSI_7_0");
ObjectDelete("RSI_7_1");
ObjectDelete("RSI_7_2");
ObjectDelete("RSI_7_3");
ObjectDelete("RSI_7_4");
ObjectDelete("RSI_7_5");
ObjectDelete("RSI_7");
ObjectDelete("RSI_7p");
}
void objectBlank()
{
ObjectSet("RSI_1_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_1p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_2p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_3p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_4p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_5p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_6p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_7p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_L97",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_L97",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI",OBJPROP_COLOR,CLR_NONE);
ObjectSet("RSI_L97",OBJPROP_COLOR,CLR_NONE);
}
void paintCol1(double value1)
{
if (value1 > v5) ObjectSet("RSI_1_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_1_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_1_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_1_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_1_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_1_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_1",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_1p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_1",value);
}
void paintCol2(double value1)
{
if (value1 > v5) ObjectSet("RSI_2_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_2_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_2_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_2_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_2_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_2_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_2",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_2p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_2",value);
}
void paintCol3(double value1)
{
if (value1 > v5) ObjectSet("RSI_3_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_3_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_3_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_3_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_3_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_3_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_3",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_3p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_3",value);
}
void paintCol4(double value1)
{
if (value1 > v5) ObjectSet("RSI_4_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_4_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_4_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_4_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_4_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_4_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_4",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_4p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_4",value);
}
void paintCol5(double value1)
{
if (value1 > v5) ObjectSet("RSI_5_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_5_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_5_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_5_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_5_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_5_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_5",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_5p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_5",value);
}
void paintCol6(double value1)
{
if (value1 > v5) ObjectSet("RSI_6_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_6_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_6_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_6_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_6_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_6_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_6",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_6p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_6",value);
}
void paintCol7(double value1)
{
if (value1 > v5) ObjectSet("RSI_7_5",OBJPROP_COLOR,Red);
if (value1 > v4) ObjectSet("RSI_7_4",OBJPROP_COLOR,Orange);
if (value1 > v3) ObjectSet("RSI_7_3",OBJPROP_COLOR,Gold);
if (value1 > v2) ObjectSet("RSI_7_2",OBJPROP_COLOR,Yellow);
if (value1 > v1) ObjectSet("RSI_7_1",OBJPROP_COLOR,YellowGreen);
if (value1 > v0) ObjectSet("RSI_7_0",OBJPROP_COLOR,Lime);
ObjectSet("RSI_7",OBJPROP_COLOR,SkyBlue);
// ObjectSetText("RSI_7p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
// GlobalVariableSet("RSI_7",value);
}
void paintLine()
{
ObjectSet("RSI_L98",OBJPROP_COLOR,DimGray);
ObjectSet("RSI_L97",OBJPROP_COLOR,DimGray);
ObjectSet("RSI",OBJPROP_COLOR,DimGray);
}
return(0);
Comments