RSI_MTF is a technical indicator based on the Relative Strength Index (RSI) designed to display RSI signals from multiple timeframes simultaneously within a single MetaTrader 5 chart window. This indicator is highly useful for traders who want to perform efficient multi-timeframe analysis.
Main Features
- Displays RSI signals from up to 21 different timeframes (M1 to MN1).
- Visualizes RSI direction signals using colored arrows (up, down, neutral).
- Interactive panel to switch timeframes directly from the chart.
- Signal notifications via pop-up, email, and push notifications.
- Flexible settings for colors, fonts, and panel positioning.
Technical Overview: How the Indicator Works
In this section of this article discusses the technical details and implementation of the RSI_MTF indicator on the MetaTrader 5 platform.
This section explains how key functions such as: RSI_MTF_Config(void) Function
virtual void RSI_MTF_Config(void)
{
//--
ENUM_TIMEFRAMES TFIx[]= {PERIOD_M1,PERIOD_M2,PERIOD_M3,PERIOD_M4,PERIOD_M5,PERIOD_M6,PERIOD_M10,PERIOD_M12,PERIOD_M15,
PERIOD_M20,PERIOD_M30,PERIOD_H1,PERIOD_H2,PERIOD_H3,PERIOD_H4,PERIOD_H6,PERIOD_H8,PERIOD_H12,
PERIOD_D1,PERIOD_W1,PERIOD_MN1};
tfxar=ArraySize(TFIx);
ArrayResize(TFId,tfxar,tfxar);
ArrayResize(Arwcolor,tfxar,tfxar);
ArrayCopy(TFId,TFIx,0,0,WHOLE_ARRAY);
//--
string TFxc[]= {"M1","M2","M3","M4","M5","M6","M10","M12","M15","M20","M30","H1",
"H2","H3","H4","H6","H8","H12","D1","W1","MN1"}; // 21 Timeframes
//--
ArrayResize(hRSI,tfxar,tfxar);
ArrayResize(TFSc,tfxar,tfxar);
ArrayCopy(TFSc,TFxc,0,0,WHOLE_ARRAY);
//--
if(BarCalc<1)
{
RSI_period=14;
PrintFormat("Incorrect value for input variable BarCalc = %d. Indicator will use value %d for calculations.",
BarCalc,RSI_period);
}
else
RSI_period=BarCalc;
//--
ttlbars=BarCalc*3+3;
//--
for(int x=0; x<tfxar; x++)
hRSI[x]=iRSI(Symbol(),TFId[x],RSI_period,PRICE_CLOSE); // Handle of iRSI Indicator on each timeframe
//--
DeletedRSIObject();
RSIMovementCalculation(25);
PositionCore();
//--
if(display)
DrawRSIObject();
//---
}
//---
RSIDirectionScan() Function
//---
int RSIDirectionScan(const ENUM_TIMEFRAMES stf,int shift) // Scan OBV Direction
{
//--
int ret=0;
int rise=1,
down=-1;
//--
int br=shift+2;
double res=0.0;
UpdatePrice(stf);
//--
double RSI[];
ArrayResize(RSI,br,br);
ArraySetAsSeries(RSI,true);
//--
int xx=TFIndexArray(stf);
CopyBuffer(hRSI[xx],0,0,br,RSI);
//--
if(RSI[shift]>RSI[shift+1]) ret=rise;
if(RSI[shift]<RSI[shift+1]) ret=down;
//--
return(ret);
//---
} //-end RSIDirectionScan()
//---
RSIMovementCalculation() Function work synergistically to produce accurate and easy-to-understand multi-timeframe RSI signals.
//---
void RSIMovementCalculation(int barCnt) // Scan the direction of iRSI on each timeframe
{
//--
ArrayResize(PowerMove,barCnt,barCnt);
ArraySetAsSeries(PowerMove,true);
//--
for(int i=barCnt-1; i>=0; i--)
{
up=0;
dw=0;
//--
for(int x=0; x<tfxar; x++)
{
Arwcolor[x]=NTArrow;
PowerMove[i]=0.0;
int PPM=RSIDirectionScan(TFId[x],0);
if(PPM>0)
{
up++;
Arwcolor[x]=ArrowUp;
}
if(PPM<0)
{
dw++;
Arwcolor[x]=ArrowDn;
}
if(x==tfxar-1)
{
if(up>dw+1)
{
PowerMove[i]=1.0;
TColor=ArrowUp;
curAlert=1;
}
if(dw>up+1)
{
PowerMove[i]=-1.0;
TColor=ArrowDn;
curAlert=-1;
}
}
}
}
//--
return;
//---
} //-end RSIMovementCalculation()
//---
The RSI_MTF_Config() function is responsible for retrieving RSI values from various user-defined timeframes. These values are then analyzed by RSIDirectionScan() to determine the RSI movement direction on each timeframe—whether it is rising, falling, or neutral.
Subsequently, RSIMovementCalculation() calculates the number of upward and downward signals from all monitored timeframes. If upward signals dominate by a certain margin, the indicator displays a green arrow indicating an uptrend. Conversely, if downward signals dominate, a red arrow appears. If signals are neutral or no dominance exists, a gray arrow is shown.
This section also explains how the interactive panel on the chart allows users to easily switch the monitored timeframe by clicking available buttons. The panel can be positioned at the top or bottom of the chart according to user preference.
With a deep understanding from this section, users can optimize the use of the RSI_MTF indicator for more effective and efficient multi-timeframe analysis in trading decisions.
Visualization and Interactive Panel
The DrawRSIObject() function is responsible for displaying arrows and interactive buttons on the chart. Traders can click timeframe buttons to instantly switch the chart view to that timeframe. The panel can be positioned at the top or bottom of the chart based on user preference.
//---
void DrawRSIObject(void)
{
//--
CreateButtonTemplate(CI,ObjName+"Template",397,66,STYLE_SOLID,9,BORDER_RAISED,clrMistyRose,clrLavenderBlush,clrWhite,bcor,corx,cory,true);
for(int x=0; x<tfhalf; x++)
{
CreateArrowLabel(CI,ObjName+"_win_arrow_"+string(x),CharToString((uchar)windchar),"Wingdings",windsize,Arwcolor[x],bcor,
txttf+horizL1+(x*scaleX)+offsetX+x,vertiL1,true,"Arrow_"+TFSc[x]);
CreateButtonClick(CI,TFSc[x],27,15,font_mode,fontSize,BORDER_FLAT,TFSc[x],clrBurlyWood,clrSilver,clrBlue,
bcor,txttf+horizL2+(x*scaleA)+offsetX,vertiL2,true,
"Change Timeframe to : "+TFSc[x]);
}
for(int x=tfhalf, x2=0; x<tfxar; x++, x2++)
{
CreateArrowLabel(CI,ObjName+"_win_arrow_"+string(x),CharToString((uchar)windchar),"Wingdings",windsize,Arwcolor[x],bcor,
txttf+horizL3+(x2*scaleX)+offsetX+x2,vertiL3,true,"Arrow_"+TFSc[x]);
CreateButtonClick(CI,TFSc[x],27,15,font_mode,fontSize,BORDER_FLAT,TFSc[x],clrBurlyWood,clrSilver,clrBlue,
bcor,txttf+horizL4+(x2*scaleA)+offsetX,vertiL4,true,
"Change Timeframe to : "+TFSc[x]);
//--
if(x==20)
{
int arrowChar=TColor==ArrowUp ? 200 : TColor==ArrowDn ? 202 : windchar;
CreateArrowLabel(CI,ObjName+"_tfx_arrow_"+string(x+1),"Move",font_mode,fontSize,clrBlue,bcor,
519+horizL5,vertiL5,true,"Move");
CreateArrowLabel(CI,ObjName+"_win_arrow_"+string(x+1),CharToString((uchar)arrowChar),"Wingdings",15,TColor,bcor,
522+horizL6,vertiL6,true,"Arrow Indicator Movement");
}
}
DisplayButtonClick("X");
CreateButtonTemplate(CI,ObjName+"TemplateName1",17,15,STYLE_SOLID,1,BORDER_FLAT,clrMistyRose,clrLavenderBlush,clrWhite,bcor,TNamex,TNamey1,true);
CreateButtonTemplate(CI,ObjName+"TemplateName2",17,15,STYLE_SOLID,1,BORDER_FLAT,clrMistyRose,clrLavenderBlush,clrWhite,bcor,TNamex,TNamey2,true);
CreateButtonTemplate(CI,ObjName+"TemplateName3",17,15,STYLE_SOLID,1,BORDER_FLAT,clrMistyRose,clrLavenderBlush,clrWhite,bcor,TNamex,TNamey3,true);
CreateArrowLabel(CI,ObjName+"_name1",hName1,font_mode,fontSize+1,clrBlue,bcor,TNamexn,TNamey1n,true,hName1);
CreateArrowLabel(CI,ObjName+"_name2",hName2,font_mode,fontSize+1,clrBlue,bcor,TNamexn,TNamey2n,true,hName2);
CreateArrowLabel(CI,ObjName+"_name3",hName3,font_mode,fontSize+1,clrBlue,bcor,TNamexn,TNamey3n,true,hName3);
//--
if(corpos==postop)
{
DisplayButtonClick("cstar");
DisplayButtonClick("arbot");
}
if(corpos==posbot)
{
DisplayButtonClick("cstar");
DisplayButtonClick("artop");
}
//--
return;
//---
} //-end DrawRSIObject()
//---
Supporting Functions and Code Explanation
In this section, we provide detailed explanations of specific key functions used in the RSI_MTF indicator to help you understand their roles and how they contribute to the overall functionality.
1. The DrawRSIObject() function is designed to create and display a graphical user interface (GUI) for an RSI (Relative Strength Index) indicator in a trading platform, likely MetaTrader (MQL4 or MQL5). It builds a panel with buttons and arrow labels that allow the user to interact with different timeframes and visual elements.
//---
void DrawRSIObject(void)
{
//--
CreateButtonTemplate(CI,ObjName+"Template",397,66,STYLE_SOLID,9,BORDER_RAISED,clrMistyRose,clrLavenderBlush,clrWhite,bcor,corx,cory,true);
for(int x=0; x<tfhalf; x++)
{
CreateArrowLabel(CI,ObjName+"_win_arrow_"+string(x),CharToString((uchar)windchar),"Wingdings",windsize,Arwcolor[x],bcor,
txttf+horizL1+(x*scaleX)+offsetX+x,vertiL1,true,"Arrow_"+TFSc[x]);
CreateButtonClick(CI,TFSc[x],27,15,font_mode,fontSize,BORDER_FLAT,TFSc[x],clrBurlyWood,clrSilver,clrBlue,
bcor,txttf+horizL2+(x*scaleA)+offsetX,vertiL2,true,
"Change Timeframe to : "+TFSc[x]);
}
for(int x=tfhalf, x2=0; x<tfxar; x++, x2++)
{
CreateArrowLabel(CI,ObjName+"_win_arrow_"+string(x),CharToString((uchar)windchar),"Wingdings",windsize,Arwcolor[x],bcor,
txttf+horizL3+(x2*scaleX)+offsetX+x2,vertiL3,true,"Arrow_"+TFSc[x]);
CreateButtonClick(CI,TFSc[x],27,15,font_mode,fontSize,BORDER_FLAT,TFSc[x],clrBurlyWood,clrSilver,clrBlue,
bcor,txttf+horizL4+(x2*scaleA)+offsetX,vertiL4,true,
"Change Timeframe to : "+TFSc[x]);
//--
if(x==20)
{
int arrowChar=TColor==ArrowUp ? 200 : TColor==ArrowDn ? 202 : windchar;
CreateArrowLabel(CI,ObjName+"_tfx_arrow_"+string(x+1),"Move",font_mode,fontSize,clrBlue,bcor,
519+horizL5,vertiL5,true,"Move");
CreateArrowLabel(CI,ObjName+"_win_arrow_"+string(x+1),CharToString((uchar)arrowChar),"Wingdings",15,TColor,bcor,
522+horizL6,vertiL6,true,"Arrow Indicator Movement");
}
}
DisplayButtonClick("X");
CreateButtonTemplate(CI,ObjName+"TemplateName1",17,15,STYLE_SOLID,1,BORDER_FLAT,clrMistyRose,clrLavenderBlush,clrWhite,bcor,TNamex,TNamey1,true);
CreateButtonTemplate(CI,ObjName+"TemplateName2",17,15,STYLE_SOLID,1,BORDER_FLAT,clrMistyRose,clrLavenderBlush,clrWhite,bcor,TNamex,TNamey2,true);
CreateButtonTemplate(CI,ObjName+"TemplateName3",17,15,STYLE_SOLID,1,BORDER_FLAT,clrMistyRose,clrLavenderBlush,clrWhite,bcor,TNamex,TNamey3,true);
CreateArrowLabel(CI,ObjName+"_name1",hName1,font_mode,fontSize+1,clrBlue,bcor,TNamexn,TNamey1n,true,hName1);
CreateArrowLabel(CI,ObjName+"_name2",hName2,font_mode,fontSize+1,clrBlue,bcor,TNamexn,TNamey2n,true,hName2);
CreateArrowLabel(CI,ObjName+"_name3",hName3,font_mode,fontSize+1,clrBlue,bcor,TNamexn,TNamey3n,true,hName3);
//--
if(corpos==postop)
{
DisplayButtonClick("cstar");
DisplayButtonClick("arbot");
}
if(corpos==posbot)
{
DisplayButtonClick("cstar");
DisplayButtonClick("artop");
}
//--
return;
//---
} //-end DrawRSIObject()
//---
This function builds a user interface for an RSI indicator, complete with buttons for changing timeframes, visual arrow indicators, and labels. It adapts the layout based on the number of timeframes and the current position setting PositionCore(void) function, and includes interactive elements for user control.
2. The ChangeChartSymbol() function is used to update the chart's timeframe and refresh the RSI (Relative Strength Index) panel accordingly. It's part of a graphical user interface system for a trading platform, likely MetaTrader.
//---
void ChangeChartSymbol(string tf_name,ENUM_TIMEFRAMES stf)
{
//---
//--- unpress the button
ObjectSetInteger(CI,tf_name,OBJPROP_STATE,false);
ObjectSetInteger(CI,tf_name,OBJPROP_ZORDER,0);
//--
DeletedRSIObject();
PanelPosChange(corpos);
ChartSetSymbolPeriod(CI,Symbol(),stf);
if(display)
DrawRSIObject();
//--
ChartRedraw(CI);
//--
return;
//---
} //-end ChangeChartSymbol()
//---
This function handles the logic for switching timeframes in a trading chart. It ensures the interface updates correctly by resetting the button state, removing and redrawing the RSI panel, and refreshing the chart display.
3. The DisplayButtonClick() function dynamically creates and displays specific buttons on a trading chart interface based on a given action request. It’s part of a graphical user interface (GUI) system, likely for a MetaTrader platform.
//---
void DisplayButtonClick(string actreq)
{
//--
if(actreq=="cstar")
CreateButtonClick(CI,cstar,20,20,"Wingdings",13,BORDER_FLAT,cstar,clrWhite,clrWhite,TColor,CORNER_RIGHT_UPPER,25,40,true,"Open Panel Indicator");
if(actreq=="artop")
CreateButtonClick(CI,artop,18,18,"Wingdings",11,BORDER_FLAT,artop,clrWhite,clrWhite,clrGreen,CORNER_RIGHT_UPPER,24,20,true,"Change Panel to Top");
if(actreq=="arbot")
CreateButtonClick(CI,arbot,18,18,"Wingdings",11,BORDER_FLAT,arbot,clrWhite,clrWhite,clrGreen,CORNER_RIGHT_UPPER,24,62,true,"Change Panel to Bottom");
if(actreq=="X")
CreateButtonClick(CI,"X",17,15,"Arial Black",fontSize,BORDER_FLAT,"X",clrWhite,clrWhite,clrRed,bcor,txttf-7+(11*scaleA)+offsetX,cory,true,"Close Panel");
//--
ChartRedraw(CI);
//--
return;
//---
} //-end DisplayButtonClick()
//---
This function acts like a button dispatcher. Based on the input string (), it creates and displays a specific button on the chart interface. Each button has a unique purpose—like opening the panel, moving it, or closing it—and is styled and positioned accordingly.
4. The CreateArrowLabel() function creates a custom text label—typically used to display an arrow or symbol—on a trading chart. This label is styled and positioned according to the parameters passed in, and it can include a tooltip for user interaction.
//---
bool CreateArrowLabel(long chart_id,
string lable_name,
string label_text,
string font_model,
int font_size,
color label_color,
int chart_corner,
int x_cor,
int y_cor,
bool price_hidden,
string tooltip)
{
//--
ObjectDelete(chart_id,lable_name);
//--
if(!ObjectCreate(chart_id,lable_name,OBJ_LABEL,0,0,0,0,0)) // create Label
{
Print(__FUNCTION__, ": failed to create \"Arrow Label\" sign! Error code = ",GetLastError());
return(false);
}
//--
ObjectSetString(chart_id,lable_name,OBJPROP_TEXT,label_text);
ObjectSetString(chart_id,lable_name,OBJPROP_FONT,font_model);
ObjectSetInteger(chart_id,lable_name,OBJPROP_FONTSIZE,WS(font_size));
ObjectSetInteger(chart_id,lable_name,OBJPROP_COLOR,label_color);
ObjectSetInteger(chart_id,lable_name,OBJPROP_CORNER,chart_corner);
ObjectSetInteger(chart_id,lable_name,OBJPROP_ANCHOR,ancp);
ObjectSetInteger(chart_id,lable_name,OBJPROP_XDISTANCE,WS(x_cor));
ObjectSetInteger(chart_id,lable_name,OBJPROP_YDISTANCE,WS(y_cor));
ObjectSetInteger(chart_id,lable_name,OBJPROP_HIDDEN,price_hidden);
ObjectSetString(chart_id,lable_name,OBJPROP_TOOLTIP,tooltip);
//-- successful execution
return(true);
//---
} //-end CreateArrowLabel()
//---
This function creates a styled label (often used for arrows or icons) on a chart, deletes any existing label with the same name, and configures its appearance and position. It’s a reusable utility for building GUI elements in a trading interface.
5. The CreateButtonTemplate() function creates a rectangular label on a trading chart (likely in MetaTrader) that acts as a visual button. It sets the button’s size, style, colors, position, and visibility.
//---
void CreateButtonTemplate(long chartid,
string obj_name,
int x_size,
int y_size,
int style,
int width,
int border,
color bordcolor,
color bgcolor,
color objcolor,
int corner,
int x_dist,
int y_dist,
bool hidden)
{
//--
ObjectCreate(chartid,obj_name,OBJ_RECTANGLE_LABEL,0,0,0); // create Rectangle Label
ObjectSetInteger(chartid,obj_name,OBJPROP_XSIZE,WS(x_size));
ObjectSetInteger(chartid,obj_name,OBJPROP_YSIZE,WS(y_size));
ObjectSetInteger(chartid,obj_name,OBJPROP_STYLE,style);
ObjectSetInteger(chartid,obj_name,OBJPROP_WIDTH,WS(width));
ObjectSetInteger(chartid,obj_name,OBJPROP_BORDER_TYPE,WS(border));
ObjectSetInteger(chartid,obj_name,OBJPROP_BORDER_COLOR,bordcolor);
ObjectSetInteger(chartid,obj_name,OBJPROP_BGCOLOR,bgcolor);
ObjectSetInteger(chartid,obj_name,OBJPROP_COLOR,objcolor);
ObjectSetInteger(chartid,obj_name,OBJPROP_CORNER,corner);
ObjectSetInteger(chartid,obj_name,OBJPROP_XDISTANCE,WS(x_dist));
ObjectSetInteger(chartid,obj_name,OBJPROP_YDISTANCE,WS(y_dist));
ObjectSetInteger(chartid,obj_name,OBJPROP_HIDDEN,hidden);
ChartRedraw(chartid);
//--
return;
//---
} //-end CreateButtonTemplate()
//---
This function is a reusable utility for drawing styled rectangular buttons on a chart. It abstracts away the complexity of setting multiple visual and positional properties, making it easier to maintain consistent UI elements across the trading interface.
6. The OnChartEvent() function handles user interactions with chart objects—specifically mouse clicks on GUI elements like buttons. It’s part of an interactive RSI panel system in MetaTrader, allowing users to control the panel’s visibility, position, and chart timeframe.
//+------------------------------------------------------------------+
//| ChartEvent function |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
const long &lparam,
const double &dparam,
const string &sparam)
{
//---
//--- handling CHARTEVENT_CLICK event ("Clicking the chart")
ResetLastError();
//--
if(id==CHARTEVENT_OBJECT_CLICK)
{
//--- if "X" button is click
if(sparam=="X")
{
mi.DeletedRSIObject();
//--- unpress the button
ObjectSetInteger(mi.CI,"X",OBJPROP_STATE,false);
ObjectSetInteger(mi.CI,"X",OBJPROP_ZORDER,0);
//--
mi.display=false;
ObjectDelete(mi.CI,"X");
mi.DisplayPanelButton();
}
//--- if "cstar" button is click
if(sparam==mi.cstar)
{
mi.DeletedRSIObject();
mi.DisplayPanelButton();
//--- unpress the button
ObjectSetInteger(mi.CI,mi.cstar,OBJPROP_STATE,false);
ObjectSetInteger(mi.CI,mi.cstar,OBJPROP_ZORDER,0);
if(!mi.display)
mi.display=true;
if(mi.corpos==mi.posbot) ObjectDelete(mi.CI,mi.arbot);
if(mi.corpos==mi.postop) ObjectDelete(mi.CI,mi.artop);
mi.DrawRSIObject();
//--
ChartRedraw(mi.CI);
}
//--- if "artop" button is click
if(sparam==mi.artop)
{
mi.DeletedRSIObject();
mi.DisplayPanelButton();
//--- unpress the button
ObjectSetInteger(mi.CI,mi.artop,OBJPROP_STATE,false);
ObjectSetInteger(mi.CI,mi.artop,OBJPROP_ZORDER,0);
if(!mi.display)
mi.display=true;
ObjectDelete(mi.CI,mi.artop);
mi.PanelPosChange(mi.postop);
//--
ObjectDelete(mi.CI,"X");
mi.DisplayButtonClick("arbot");
mi.DrawRSIObject();
//--
ChartRedraw(mi.CI);
}
//--- if "arbot" button is click
if(sparam==mi.arbot)
{
mi.DeletedRSIObject();
mi.DisplayPanelButton();
//--- unpress the button
ObjectSetInteger(mi.CI,mi.arbot,OBJPROP_STATE,false);
ObjectSetInteger(mi.CI,mi.arbot,OBJPROP_ZORDER,0);
if(!mi.display)
mi.display=true;
ObjectDelete(mi.CI,mi.arbot);
mi.PanelPosChange(mi.posbot);
//--
ObjectDelete(mi.CI,"X");
mi.DisplayButtonClick("artop");
mi.DrawRSIObject();
//--
ChartRedraw(mi.CI);
}
//--- if TF button is click
//--
if(sparam==mi.TFSc[0])
{
mi.ChangeChartSymbol(mi.TFSc[0],mi.TFId[0]);
}
//--
if(sparam==mi.TFSc[1])
{
mi.ChangeChartSymbol(mi.TFSc[1],mi.TFId[1]);
}
//--
if(sparam==mi.TFSc[2])
{
mi.ChangeChartSymbol(mi.TFSc[2],mi.TFId[2]);
}
//--
if(sparam==mi.TFSc[3])
{
mi.ChangeChartSymbol(mi.TFSc[3],mi.TFId[3]);
}
//--
if(sparam==mi.TFSc[4])
{
mi.ChangeChartSymbol(mi.TFSc[4],mi.TFId[4]);
}
//--
if(sparam==mi.TFSc[5])
{
mi.ChangeChartSymbol(mi.TFSc[5],mi.TFId[5]);
}
//--
if(sparam==mi.TFSc[6])
{
mi.ChangeChartSymbol(mi.TFSc[6],mi.TFId[6]);
}
//--
if(sparam==mi.TFSc[7])
{
mi.ChangeChartSymbol(mi.TFSc[7],mi.TFId[7]);
}
//--
if(sparam==mi.TFSc[8])
{
mi.ChangeChartSymbol(mi.TFSc[8],mi.TFId[8]);
}
//--
if(sparam==mi.TFSc[9])
{
mi.ChangeChartSymbol(mi.TFSc[9],mi.TFId[9]);
}
//--
if(sparam==mi.TFSc[10])
{
mi.ChangeChartSymbol(mi.TFSc[10],mi.TFId[10]);
}
//--
if(sparam==mi.TFSc[11])
{
mi.ChangeChartSymbol(mi.TFSc[11],mi.TFId[11]);
}
//--
if(sparam==mi.TFSc[12])
{
mi.ChangeChartSymbol(mi.TFSc[12],mi.TFId[12]);
}
//--
if(sparam==mi.TFSc[13])
{
mi.ChangeChartSymbol(mi.TFSc[13],mi.TFId[13]);
}
//--
if(sparam==mi.TFSc[14])
{
mi.ChangeChartSymbol(mi.TFSc[14],mi.TFId[14]);
}
//--
if(sparam==mi.TFSc[15])
{
mi.ChangeChartSymbol(mi.TFSc[15],mi.TFId[15]);
}
//--
if(sparam==mi.TFSc[16])
{
mi.ChangeChartSymbol(mi.TFSc[16],mi.TFId[16]);
}
//--
if(sparam==mi.TFSc[17])
{
mi.ChangeChartSymbol(mi.TFSc[17],mi.TFId[17]);
}
//--
if(sparam==mi.TFSc[18])
{
mi.ChangeChartSymbol(mi.TFSc[18],mi.TFId[18]);
}
//--
if(sparam==mi.TFSc[19])
{
mi.ChangeChartSymbol(mi.TFSc[19],mi.TFId[19]);
}
//--
if(sparam==mi.TFSc[20])
{
mi.ChangeChartSymbol(mi.TFSc[20],mi.TFId[20]);
}
//--
}
//---
} //-end OnChartEvent()
//---------//
This function is the central event handler for all GUI interactions in the RSI panel. It manages:
- Showing/hiding the panel.
- Moving the panel between top and bottom positions.
- Switching chart timeframes via button clicks.
It ensures the interface remains responsive and visually consistent after each user action.
Conclusion
The Relative Strength Index Multi-Timeframe Indicator for MT5 offers a complete solution for traders who want to understand trend strength across all timeframes simultaneously. Using a unique formula that scans and weighs up/down movement across 21 timeframes, it delivers a summary arrow signal that simplifies complex data into an actionable visual.
With features like dynamic chart interaction, visual arrows, alerts, and a lightweight design, this tool is ideal for discretionary and algorithmic traders alike.
We hope that this article and the RSI_MTF or Relative Strength Index Multi-Timeframe Indicator for MT5 program will be useful for traders in learning and generating new ideas for trading, who can ultimately make money from home by trading forex.
Please download the RSI_MTF indicator from My Google Drive: Relative Strength Index Multi-Timeframe Indicator for MT5
Vital Records
If you would like to receive a source program for this article, please send a request via Contact Us form page, and I will send it to your email, source code: Relative Strength Index Multi-Timeframe Indicator for MT5
If you think the Relative Strength Index Multi-Timeframe Indicator for MT5 is worthy of being used for automated trading as an Expert Advisor, please leave a comment below this article.
If at least 25 people agree that this indicator is worthy of being used as an Expert Advisor, I will create an Expert Advisor based on its signals and share it on this blog.
Thanks for reading this article.


0 comments:
Post a Comment