_TRO_Multi_Meter_High
Download scriptThis script is designed as a visual dashboard for the MetaTrader platform, providing traders with a quick, multi-timeframe overview of price action. Instead of requiring you to switch between different charts manually, it gathers high-price data from nine different timeframes simultaneously and displays them in a neat, organized row on your current screen.
Core Functionality
The primary purpose of this tool is to track "High" price points across various intervals: M1 (1 minute), M5, M15, M30, H1, H4, D1, W1, and MN1. By analyzing these different scales at once, the script helps traders identify the broader market context—allowing you to see if a short-term move is aligned with or moving against the larger weekly or monthly trends.
How It Works
The logic follows a three-step process to refresh your visual dashboard:
- Data Collection: The script constantly "looks" at the high price of the previous candle and the current candle for all nine timeframes specified.
- Trend Analysis: It compares the current high against the previous high for each timeframe.
- If the current high is higher than the previous one, it identifies an upward movement.
- If the current high is lower than the previous one, it identifies a downward movement.
- If there is no change, it identifies a neutral state.
- Visual Display: The script then updates a series of text labels on your chart (usually in the top-right corner). It uses a color-coded system to communicate these trends instantly:
- Green (Lime): Indicates an upward trend.
- Red: Indicates a downward trend.
- Yellow: Indicates a neutral or flat status.
User Experience & Customization
To ensure the tool is easy to read and doesn't obstruct your view, the script includes several "Quality of Life" features:
- Dynamic Positioning: You can adjust the horizontal and vertical positioning of the dashboard using specific settings (Shift/Adjust) so it fits perfectly with your layout.
- Customizable Branding: The display includes a heading row that clearly labels which timeframe each color represents, ensuring there is no confusion during fast-paced trading.
- Automatic Cleanup: The script is programmed to automatically remove its own visual elements when you close the indicator or switch charts, keeping your workspace clean and free of "ghost" objects.
Summary for the Trader
In short, this tool acts as a Multi-Timeframe Heatmap. It translates complex raw data from nine different timeframes into a single row of color-coded signals, allowing you to see at a glance where the market is heading across all major durations without ever having to click away from your primary chart.
//+------------------------------------------------------------------+
//| _TRO_Multi_Meter_High |
//| |
//| Copyright © 2007, Avery T. Horton, Jr. aka TheRumpledOne |
//| |
//| PO BOX 43575, TUCSON, AZ 85733 |
//| |
//| GIFT AND DONATIONS ACCEPTED |
//| |
//| therumpldone@gmail.com |
//+------------------------------------------------------------------+
//| |
//| go to www.kreslik.com for the latest indicator updates |
//+------------------------------------------------------------------+
//| |
//| Use www.efxgroup.com as your forex broker... |
//| ...tell them therumpledone sent you! |
//+------------------------------------------------------------------+
// thank you Xard777 from www.forex-tsd.com for showing me how to delete the objects properly.
// thank you mladen from www.forex-tsd.com for showing me I had a locals and global variables with same name
#property indicator_chart_window
extern bool Show_Heading = false;
extern string IndName = "HIGH" ; // change
extern bool Corner_of_Chart_RIGHT_TOP = true;
extern int Shift_UP_DN =585;
extern int Adjust_Side_to_side = 20; // 20
extern color BarLabel_color = LightBlue;
extern color CommentLabel_color = LightBlue;
extern color Up_color = Lime;
extern color Eq_color = Yellow;
extern color Dn_color = Red;
//*******************
// change inputs for your indicator
//*******************
string ObjHead01,ObjHead02,ObjHead03,ObjHead04,ObjHead05,ObjHead06,ObjHead07,ObjHead08,ObjHead09,ObjHead10,ObjHead11;
string Obj0001,Obj0002,Obj0003,Obj0004,Obj0005,Obj0006,Obj0007,Obj0008,Obj0009,Obj0010,Obj0011;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//***********************************************************************************************************************
string LabelTime="";
if (LabelTime=="") {LabelTime=TimeToStr(TimeLocal(),TIME_SECONDS); }
int counted_bars=IndicatorCounted();
ObjHead01 = "HGHColHead01" + LabelTime ;
ObjHead02 = "HGHColHead02" + LabelTime ;
ObjHead03 = "HGHColHead03" + LabelTime ;
ObjHead04 = "HGHColHead04" + LabelTime ;
ObjHead05 = "HGHColHead05" + LabelTime ;
ObjHead06 = "HGHColHead06" + LabelTime ;
ObjHead07 = "HGHColHead07" + LabelTime ;
ObjHead08 = "HGHColHead08" + LabelTime ;
ObjHead09 = "HGHColHead09" + LabelTime ;
string HGH_ObjHead01 ="M1 " ;
string HGH_ObjHead02 ="M5 " ;
string HGH_ObjHead03 ="M15 " ;
string HGH_ObjHead04 =" M30 " ;
string HGH_ObjHead05 ="H1 " ;
string HGH_ObjHead06 ="H4 " ;
string HGH_ObjHead07 ="D1 " ;
string HGH_ObjHead08 ="W1 " ;
string HGH_ObjHead09 ="MN1" ;
if (Corner_of_Chart_RIGHT_TOP == true)
{ int Col01x = 170+Adjust_Side_to_side ;
int Col01y = 28+Shift_UP_DN ;
}
if (Corner_of_Chart_RIGHT_TOP == false)
{ Col01x = 159+Adjust_Side_to_side ;
Col01y = 24+Shift_UP_DN ;
}
int ColAdj = -20 ;
int Col02x = Col01x + ColAdj ;
int Col03x = Col01x + ColAdj*2 ;
int Col04x = Col01x + ColAdj*3 ;
int Col05x = Col01x + ColAdj*4 ;
int Col06x = Col01x + ColAdj*5 ;
int Col07x = Col01x + ColAdj*6 ;
int Col08x = Col01x + ColAdj*7 ;
int Col09x = Col01x + ColAdj*8 ;
if ( Show_Heading) {
ObjectCreate(ObjHead01, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead01,HGH_ObjHead01 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead01, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead01, OBJPROP_XDISTANCE, Col01x);
ObjectSet(ObjHead01, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead02, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead02,HGH_ObjHead02 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead02, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead02, OBJPROP_XDISTANCE, Col02x);
ObjectSet(ObjHead02, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead03, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead03,HGH_ObjHead03 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead03, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead03, OBJPROP_XDISTANCE, Col03x);
ObjectSet(ObjHead03, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead04, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead04,HGH_ObjHead04 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead04, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead04, OBJPROP_XDISTANCE, Col04x);
ObjectSet(ObjHead04, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead05, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead05,HGH_ObjHead05 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead05, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead05, OBJPROP_XDISTANCE, Col05x);
ObjectSet(ObjHead05, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead06, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead06,HGH_ObjHead06 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead06, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead06, OBJPROP_XDISTANCE, Col06x);
ObjectSet(ObjHead06, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead07, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead07,HGH_ObjHead07 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead07, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead07, OBJPROP_XDISTANCE, Col07x);
ObjectSet(ObjHead07, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead08, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead08,HGH_ObjHead08 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead08, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead08, OBJPROP_XDISTANCE, Col08x);
ObjectSet(ObjHead08, OBJPROP_YDISTANCE, Col01y);
ObjectCreate(ObjHead09, OBJ_LABEL, 0, 0, 0);
ObjectSetText(ObjHead09,HGH_ObjHead09 , 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(ObjHead09, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(ObjHead09, OBJPROP_XDISTANCE, Col09x);
ObjectSet(ObjHead09, OBJPROP_YDISTANCE, Col01y);
} // Show_Heading
//******************* change for your indicator ********************
string M1_HGH= "-",M5_HGH= "-", M15_HGH= "-", M30_HGH= "-", H1_HGH= "-", H4_HGH= "-", D1_HGH= "-",PRC1, W1_HGH= "-", MN1_HGH= "-";
color color_HGHm1,color_HGHm5,color_HGHm15,color_HGHm30,color_HGHH1,color_HGHH4,color_HGHD1,color_HGHW1,color_HGHMN1;
//HGH Signals
double HGH_M1 = iHigh(NULL,PERIOD_M1,0);
double HGH_m1 = iHigh(NULL,PERIOD_M1,1) ;
double HGH_M5 = iHigh(NULL,PERIOD_M5,0) ;
double HGH_m5 = iHigh(NULL,PERIOD_M5,1) ;
double HGH_M15 = iHigh(NULL,PERIOD_M15,0) ;
double HGH_m15 = iHigh(NULL,PERIOD_M15,1) ;
double HGH_M30 = iHigh(NULL,PERIOD_M30,0) ;
double HGH_m30 = iHigh(NULL,PERIOD_M30,1) ;
double HGH_H1 = iHigh(NULL,PERIOD_H1,0) ;
double HGH_h1 = iHigh(NULL,PERIOD_H1,1);
double HGH_H4 = iHigh(NULL,PERIOD_H4,0) ;
double HGH_h4 = iHigh(NULL,PERIOD_H4,1) ;
double HGH_D1 = iHigh(NULL,PERIOD_D1,0);
double HGH_d1 = iHigh(NULL,PERIOD_D1,1) ;
double HGH_W1 = iHigh(NULL,PERIOD_W1,0) ;
double HGH_w1 = iHigh(NULL,PERIOD_W1,1) ;
double HGH_MN1 = iHigh(NULL,PERIOD_MN1,0) ;
double HGH_mn1 = iHigh(NULL,PERIOD_MN1,1) ;
if ((HGH_M1 > HGH_m1)) color_HGHm1 = Up_color;
else {
if ((HGH_M1 < HGH_m1)) color_HGHm1 = Dn_color;
else color_HGHm1 = Eq_color; }
if (( HGH_M5 > HGH_m5)) color_HGHm5 = Up_color;
else {
if (( HGH_M5 < HGH_m5)) color_HGHm5 = Dn_color;
else color_HGHm5 = Eq_color; }
if ((HGH_M15 > HGH_m15)) color_HGHm15 = Up_color;
else {
if ((HGH_M15 < HGH_m15)) color_HGHm15 = Dn_color;
else color_HGHm15 = Eq_color; }
if ((HGH_M30 > HGH_m30)) color_HGHm30 = Up_color;
else {
if ((HGH_M30 < HGH_m30)) color_HGHm30 = Dn_color;
else color_HGHm30 = Eq_color; }
if ((HGH_H1 > HGH_h1)) color_HGHH1 = Up_color;
else {
if ((HGH_H1 < HGH_h1)) color_HGHH1 = Dn_color;
else color_HGHH1 = Eq_color; }
if ((iClose(NULL,PERIOD_H4,0) > HGH_H4)
&& (iClose(NULL,PERIOD_H4,0) > HGH_h4)) color_HGHH4 = Up_color;
else {
if ((iClose(NULL,PERIOD_H4,0) < HGH_H4)
&& (iClose(NULL,PERIOD_H4,0) < HGH_h4)) color_HGHH4 = Dn_color;
else color_HGHH4 = Eq_color; }
if ((HGH_D1 > HGH_d1)) color_HGHD1 = Up_color;
else {
if ((HGH_D1 < HGH_d1)) color_HGHD1 = Dn_color;
else color_HGHD1 = Eq_color; }
if ((HGH_W1 > HGH_w1)) color_HGHW1 = Up_color;
else {
if ((HGH_W1 < HGH_w1)) color_HGHW1 = Dn_color;
else color_HGHW1 = Eq_color; }
if ((HGH_MN1 > HGH_mn1)) color_HGHMN1 = Up_color;
else {
if ((HGH_MN1 < HGH_MN1)) color_HGHMN1 = Dn_color;
else color_HGHMN1 = Eq_color; }
//*******************
int Col00x = Col01x + 20 ;
int Col00y = 50+Shift_UP_DN ;
Col01y = 20+Shift_UP_DN ;
Obj0002 = "SignalHGHM1t" + LabelTime ;
ObjectCreate(Obj0002, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0002,IndName, 7, "Tahoma Narrow", BarLabel_color);
ObjectSet(Obj0002, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0002, OBJPROP_XDISTANCE, Col00x);
ObjectSet(Obj0002, OBJPROP_YDISTANCE, Col00y); // 50+Shift_UP_DN
Obj0003 = "SignalHGHM1" + LabelTime ;
ObjectCreate(Obj0003, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0003, M1_HGH, 40, "Tahoma Narrow", color_HGHm1);
ObjectSet(Obj0003, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0003, OBJPROP_XDISTANCE, Col01x);
ObjectSet(Obj0003, OBJPROP_YDISTANCE, Col01y);
Obj0004 = "SignalHGHM5" + LabelTime ;
ObjectCreate(Obj0004, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0004, M5_HGH, 40, "Tahoma Narrow", color_HGHm5);
ObjectSet(Obj0004, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0004, OBJPROP_XDISTANCE, Col02x);
ObjectSet(Obj0004, OBJPROP_YDISTANCE, Col01y);
Obj0005 = "SignalHGHM15" + LabelTime ;
ObjectCreate(Obj0005, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0005, M15_HGH, 40, "Tahoma Narrow", color_HGHm15);
ObjectSet(Obj0005, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0005, OBJPROP_XDISTANCE, Col03x);
ObjectSet(Obj0005, OBJPROP_YDISTANCE, Col01y);
Obj0006 = "SignalHGHM30" + LabelTime ;
ObjectCreate(Obj0006, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0006, M30_HGH, 40, "Tahoma Narrow", color_HGHm30);
ObjectSet(Obj0006, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0006, OBJPROP_XDISTANCE, Col04x);
ObjectSet(Obj0006, OBJPROP_YDISTANCE, Col01y);
Obj0007 = "SignalHGHM60" + LabelTime ;
ObjectCreate(Obj0007, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0007, H1_HGH, 40, "Tahoma Narrow", color_HGHH1);
ObjectSet(Obj0007, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0007, OBJPROP_XDISTANCE, Col05x);
ObjectSet(Obj0007, OBJPROP_YDISTANCE, Col01y);
Obj0008 = "SignalHGHM240" + LabelTime ;
ObjectCreate(Obj0008, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0008, H4_HGH, 40, "Tahoma Narrow", color_HGHH4);
ObjectSet(Obj0008, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0008, OBJPROP_XDISTANCE, Col06x);
ObjectSet(Obj0008, OBJPROP_YDISTANCE, Col01y);
Obj0009 = "SignalHGHM1440" + LabelTime ;
ObjectCreate(Obj0009, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0009, D1_HGH, 40, "Tahoma Narrow", color_HGHD1);
ObjectSet(Obj0009, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0009, OBJPROP_XDISTANCE, Col07x);
ObjectSet(Obj0009, OBJPROP_YDISTANCE, Col01y);
Obj0010 = "SignalHGHW1" + LabelTime ;
ObjectCreate(Obj0010, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0010, W1_HGH, 40, "Tahoma Narrow", color_HGHW1);
ObjectSet(Obj0010, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0010, OBJPROP_XDISTANCE, Col08x);
ObjectSet(Obj0010, OBJPROP_YDISTANCE, Col01y);
Obj0011 = "SignalHGHMN1" + LabelTime ;
ObjectCreate(Obj0011, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Obj0011, MN1_HGH, 40, "Tahoma Narrow", color_HGHMN1);
ObjectSet(Obj0011, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
ObjectSet(Obj0011, OBJPROP_XDISTANCE, Col09x);
ObjectSet(Obj0011, OBJPROP_YDISTANCE, Col01y);
//----
return(0);
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll(0,OBJ_HLINE);
ObjectsDeleteAll(0,OBJ_TEXT);
ObjectsDeleteAll(0,OBJ_LABEL);
deleteObject();
//----
return(0);
}
void deleteObject()
{
//ObjectDelete(Obj0001);
ObjectDelete(Obj0002);
ObjectDelete(Obj0003);
ObjectDelete(Obj0004);
ObjectDelete(Obj0005);
ObjectDelete(Obj0006);
ObjectDelete(Obj0007);
ObjectDelete(Obj0008);
ObjectDelete(Obj0009);
ObjectDelete(Obj0010);
ObjectDelete(Obj0011);
ObjectDelete(ObjHead01);
ObjectDelete(ObjHead02);
ObjectDelete(ObjHead03);
ObjectDelete(ObjHead04);
ObjectDelete(ObjHead05);
ObjectDelete(ObjHead06);
ObjectDelete(ObjHead07);
ObjectDelete(ObjHead08);
ObjectDelete(ObjHead09);
}
Comments