_TRO_Multi_Meter_STR

Download script
_TRO_Multi_Meter_STR

This script functions as a multi-timeframe visual dashboard for MetaTrader. It is designed to give traders a quick, bird's-eye view of market momentum across several different time horizons—ranging from very fast (1-minute) to long-term (daily)—all displayed simultaneously on a single chart.

Core Functionality

The script automates the process of gathering data from multiple timeframes and "translates" that data into simple color-coded signals. Instead of requiring you to manually switch between different charts to see what is happening, it pulls that information in the background and displays it as a dashboard in a corner of your screen.

How the Logic Works

The script analyzes three primary technical indicators for every timeframe it monitors:

  1. RSI (Relative Strength Index): Measures the speed and change of price movements.
  2. Stochastic Oscillator: Helps identify overbought or oversold conditions by comparing a closing price to its range over a period of time.
  3. CCI (Commodity Channel Index): Identifies new trends by measuring how far the price is deviating from its average.

Signal Processing and Visualization

For each timeframe (M1, M5, M15, M30, H1, H4, and D1), the script follows a specific logic flow to determine the visual output:

  • Bullish Signals (Lime Green): If all three indicators (RSI, Stochastic, and CCI) meet specific "positive" criteria simultaneously on a timeframe, the dashboard will display a green signal. This suggests that multiple technical factors are aligning to indicate upward momentum.
  • Bearish Signals (Red): If the indicators align to meet specific "negative" criteria across a timeframe, the dashboard displays a red signal, indicating downward momentum.
  • Mixed/Neutral Signals (Orange): The script includes complex "if-then" logic to detect conflicting data. For example, if one indicator is leaning bullish while another is leaning bearish, the dashboard will display an orange signal. This serves as a warning that the market may be undecided or experiencing high volatility on that specific timeframe.

User Experience

  • Dynamic Dashboard: The script creates several labels on your chart (e.g., "SignalSTRM1", "SignalSTRM5") and updates them in real-time.
  • Customizable Layout: Users can adjust the position of the dashboard on the screen, change colors, and modify the internal settings of the indicators to fit their specific trading style.
  • Clean Up: The script includes a "cleanup" routine, ensuring that when you remove the indicator from your chart, all the labels and dashboard elements are automatically deleted, leaving your chart clean.
Indicators Used
Relative strength indexStochastic oscillatorCommodity channel index
7 Views
0 Downloads
0 Favorites
_TRO_Multi_Meter_STR
//+------------------------------------------------------------------+ 
//|   _TRO_Multi_Meter_STR                                           | 
//|                                                                  | 
//|   Copyright © 2007, Avery T. Horton, Jr. aka TheRumpledOne       |
//|                                                                  |
//|   PO BOX 43575, TUCSON, AZ 85733                                 |
//|                                                                  |
//|   GIFT AND DONATIONS ACCEPTED                                    | 
//|                                                                  |
//|   therumpldone@gmail.com                                         |  
//+------------------------------------------------------------------+ 

#property indicator_chart_window

extern bool Show_Heading = false;
 
extern string IndName = "STR" ; // change

//*******************

extern bool Corner_of_Chart_RIGHT_TOP = true;

extern int Shift_UP_DN =75; 
extern int Adjust_Side_to_side  = 20;

extern color BarLabel_color = LightBlue;
extern color CommentLabel_color = LightBlue;

//******************* 
// change inputs for your indicator 

extern int RSI_Period = 9;
extern int RSI_PRICE_TYPE = 0;

extern int CCI_Period = 13;
extern int CCI_PRICE_TYPE = 0;

extern int STOCH_K_Period = 5;
extern int STOCH_D_Period = 3;
extern int STOCH_Slowing = 3;
extern int STOCH_MA_MODE = 1;

//*******************

string Obj0001,Obj0002,Obj0003,Obj0004,Obj0005,Obj0006,Obj0007,Obj0008,Obj0009;  

//+------------------------------------------------------------------+
//| 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();
   
if ( Show_Heading) {         
    if (Corner_of_Chart_RIGHT_TOP == true)
    {  
    
   Obj0001 = "STR_Head" + LabelTime ; 
   string STR_Head = "    M1  M5  M15 M30 H1  H4   D1" ;
   
           ObjectCreate(Obj0001, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0001, STR_Head , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(Obj0001, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0001, OBJPROP_XDISTANCE, 17+Adjust_Side_to_side);
   ObjectSet(Obj0001, OBJPROP_YDISTANCE, 28+Shift_UP_DN); 
   }
    if (Corner_of_Chart_RIGHT_TOP == false)
   { 
           ObjectCreate(Obj0001, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0001, STR_Head, 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(Obj0001, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0001, OBJPROP_XDISTANCE, 17+Adjust_Side_to_side);
   ObjectSet(Obj0001, OBJPROP_YDISTANCE, 24+Shift_UP_DN); 
    } 
} // Show_Heading

 //*******************   change for  your indicator ********************  
  
//STR Signals 

   double rsi_d1 = iRSI(NULL, PERIOD_D1, RSI_Period , RSI_PRICE_TYPE, 0);
   double rsi_h4 = iRSI(NULL, PERIOD_H4, RSI_Period , RSI_PRICE_TYPE, 0);
   double rsi_h1 = iRSI(NULL, PERIOD_H1, RSI_Period , RSI_PRICE_TYPE, 0);
   double rsi_m30 = iRSI(NULL, PERIOD_M30, RSI_Period , RSI_PRICE_TYPE, 0);
   double rsi_m15 = iRSI(NULL, PERIOD_M15, RSI_Period , RSI_PRICE_TYPE, 0);
   double rsi_m5 = iRSI(NULL, PERIOD_M5, RSI_Period , RSI_PRICE_TYPE, 0);
   double rsi_m1 = iRSI(NULL, PERIOD_M1, RSI_Period , RSI_PRICE_TYPE, 0);
   
   double stoc_D1 = iStochastic(NULL, PERIOD_D1, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);
   double stoc_H4 = iStochastic(NULL, PERIOD_H4, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);
   double stoc_H1 = iStochastic(NULL, PERIOD_H1, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);
   double stoc_M30 = iStochastic(NULL, PERIOD_M30, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);
   double stoc_M15 = iStochastic(NULL, PERIOD_M15, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);//sto was 15,5,5
   double stoc_M5 = iStochastic(NULL, PERIOD_M5, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);
   double stoc_M1 = iStochastic(NULL, PERIOD_M1, STOCH_K_Period,STOCH_D_Period,STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0);// was mode signal now gets value off main line
   
   double cci_DD1 = iCCI(NULL, PERIOD_D1,CCI_Period , CCI_PRICE_TYPE, 0);
   double cci_HH4 = iCCI(NULL, PERIOD_H4,CCI_Period , CCI_PRICE_TYPE, 0);
   double cci_HH1 = iCCI(NULL, PERIOD_H1,CCI_Period , CCI_PRICE_TYPE, 0); 
   double cci_MM30 = iCCI(NULL, PERIOD_M30,CCI_Period , CCI_PRICE_TYPE, 0);     
   double cci_MM15 = iCCI(NULL, PERIOD_M15,CCI_Period , CCI_PRICE_TYPE, 0);    
   double cci_MM5 = iCCI(NULL, PERIOD_M5,CCI_Period , CCI_PRICE_TYPE, 0);       
   double cci_MM1 = iCCI(NULL, PERIOD_M1,CCI_Period , CCI_PRICE_TYPE, 0);
   
    
   string H1_STR = "", M15_STR = "", M5_STR = "", M1_STR = "", H4_STR ="",M30_STR= "",D1_STR= "",STR_w1= "";
   
   color  color_signal,color_STRm1,color_STRm5,color_STRm15,color_STRm30,color_STRm60,color_STRm240,color_STRm1440;
   
   if ((rsi_d1 > 50) && (stoc_D1 > 40) && (cci_DD1 > 0)) { D1_STR = "-";color_STRm1440 = Lime;}  
   if ((rsi_h4 > 50) && (stoc_H4 > 40) && (cci_HH4 > 0)) { H4_STR = "-";color_STRm240 = Lime;}  
   if ((rsi_h1 > 50) && (stoc_H1 > 40) && (cci_HH1 > 0)) { H1_STR = "-";color_STRm60 = Lime;}
   if ((rsi_m30 > 50) && (stoc_M30 > 40) && (cci_MM30 > 0)) { M30_STR = "-";color_STRm30 = Lime; }
   if ((rsi_m15 > 50) && (stoc_M15 > 40) && (cci_MM15 > 0)) { M15_STR = "-";color_STRm15 = Lime; }
   if ((rsi_m5 > 50) && (stoc_M5 > 40) && (cci_MM5 > 0)) { M5_STR = "-"; color_STRm5 = Lime;}
   if ((rsi_m1 > 50) && (stoc_M1 > 40) && (cci_MM1 > 0)) { M1_STR = "-";  color_STRm1 = Lime;}
   
  
   if ((rsi_d1 < 50) && (stoc_D1 < 60) && (cci_DD1 < 0)) { D1_STR = "-";color_STRm1440 = Red;}
   if ((rsi_h4 < 50) && (stoc_H4 < 60) && (cci_HH4 < 0)) { H4_STR = "-";color_STRm240 = Red;}
   if ((rsi_h1 < 50) && (stoc_H1 < 60) && (cci_HH1 < 0)) { H1_STR = "-";color_STRm60 = Red;}
   if ((rsi_m30 < 50) && (stoc_M30 < 60) && (cci_MM30 < 0)) { M30_STR = "-";color_STRm30 = Red;}
   if ((rsi_m15 < 50) && (stoc_M15 < 60) && (cci_MM15 < 0)) { M15_STR = "-";color_STRm15 = Red;}
   if ((rsi_m5 < 50) && (stoc_M5 < 60) && (cci_MM5 < 0)) { M5_STR = "-";color_STRm5 = Red;}
   if ((rsi_m1 < 50) && (stoc_M1 < 60) && (cci_MM1 < 0)) { M1_STR = "-"; color_STRm1 = Red;}
   
     
   if ((rsi_m1 < 50) && (stoc_M1 > 40) && (cci_MM1 > 0)) { M1_STR = "-";  color_STRm1 = Orange;}
   if ((rsi_m1 > 50) && (stoc_M1 < 60) && (cci_MM1 < 0)) { M1_STR = "-";  color_STRm1 = Orange;}
   if ((rsi_m1 < 50) && (stoc_M1 > 40) && (cci_MM1 < 0)) { M1_STR = "-";  color_STRm1 = Orange;}
   if ((rsi_m1 > 50) && (stoc_M1 < 60) && (cci_MM1 > 0)) { M1_STR = "-";  color_STRm1 = Orange;}
   if ((rsi_m1 > 50) && (stoc_M1 > 40) && (cci_MM1 < 0)) { M1_STR = "-";  color_STRm1 = Orange;}  
   if ((rsi_m1 > 50) && (stoc_M1 < 60) && (cci_MM1 < 0)) { M1_STR = "-";  color_STRm1 = Orange;}
   
   
   if ((rsi_m5 < 50) && (stoc_M5 > 40) && (cci_MM5 > 0)) { M5_STR = "-";  color_STRm5 = Orange;}
   if ((rsi_m5 > 50) && (stoc_M5 < 60) && (cci_MM5 < 0)) { M5_STR = "-";  color_STRm5 = Orange;}
   if ((rsi_m5 < 50) && (stoc_M5 > 40) && (cci_MM5 < 0)) { M5_STR = "-";  color_STRm5 = Orange;}
   if ((rsi_m5 > 50) && (stoc_M5 < 60) && (cci_MM5 > 0)) { M5_STR = "-";  color_STRm5 = Orange;}
   if ((rsi_m5 > 50) && (stoc_M5 > 40) && (cci_MM5 < 0)) { M5_STR = "-";  color_STRm5 = Orange;}  
   if ((rsi_m5 > 50) && (stoc_M5 < 60) && (cci_MM5 < 0)) { M5_STR = "-";  color_STRm5 = Orange;}
   
   if ((rsi_m15 < 50) && (stoc_M15 > 40) && (cci_MM15 > 0)) { M15_STR = "-";  color_STRm15 = Orange;}
   if ((rsi_m15 > 50) && (stoc_M15 < 60) && (cci_MM15 < 0)) { M15_STR = "-";  color_STRm15 = Orange;}
   if ((rsi_m15 < 50) && (stoc_M15 > 40) && (cci_MM15 < 0)) { M15_STR = "-";  color_STRm15 = Orange;}
   if ((rsi_m15 > 50) && (stoc_M15 < 60) && (cci_MM15 > 0)) { M15_STR = "-";  color_STRm15 = Orange;}
   if ((rsi_m15 > 50) && (stoc_M15 > 40) && (cci_MM15 < 0)) { M15_STR = "-";  color_STRm15 = Orange;}  
   if ((rsi_m15 > 50) && (stoc_M15 < 60) && (cci_MM15 < 0)) { M15_STR = "-";  color_STRm15 = Orange;}
      
   if ((rsi_m30 < 50) && (stoc_M30 > 40) && (cci_MM30 > 0)) { M30_STR = "-";  color_STRm30 = Orange;}
   if ((rsi_m30 > 50) && (stoc_M30 < 60) && (cci_MM30 < 0)) { M30_STR = "-";  color_STRm30 = Orange;}
   if ((rsi_m30 < 50) && (stoc_M30 > 40) && (cci_MM30 < 0)) { M30_STR = "-";  color_STRm30 = Orange;}
   if ((rsi_m30 > 50) && (stoc_M30 < 60) && (cci_MM30 > 0)) { M30_STR = "-";  color_STRm30 = Orange;}
   if ((rsi_m30 > 50) && (stoc_M30 > 40) && (cci_MM30 < 0)) { M30_STR = "-";  color_STRm30 = Orange;}  
   if ((rsi_m30 > 50) && (stoc_M30 < 60) && (cci_MM30 < 0)) { M30_STR = "-";  color_STRm30 = Orange;}
   
   if ((rsi_h1 < 50) && (stoc_H1 > 40) && (cci_HH1 > 0)) { H1_STR = "-";  color_STRm60 = Orange;}
   if ((rsi_h1 > 50) && (stoc_H1 < 60) && (cci_HH1 < 0)) { H1_STR = "-";  color_STRm60 = Orange;}
   if ((rsi_h1 < 50) && (stoc_H1 > 40) && (cci_HH1 < 0)) { H1_STR = "-";  color_STRm60 = Orange;}
   if ((rsi_h1 > 50) && (stoc_H1 < 60) && (cci_HH1 > 0)) { H1_STR = "-";  color_STRm60 = Orange;}
   if ((rsi_h1 > 50) && (stoc_H1 > 40) && (cci_HH1 < 0)) { H1_STR = "-";  color_STRm60 = Orange;}  
   if ((rsi_h1 > 50) && (stoc_H1 < 60) && (cci_HH1 < 0)) { H1_STR = "-";  color_STRm60 = Orange;}
   
   if ((rsi_h4 < 50) && (stoc_H4 > 40) && (cci_HH4 > 0)) { H4_STR = "-";  color_STRm240 = Orange;}
   if ((rsi_h4 > 50) && (stoc_H4 < 60) && (cci_HH4 < 0)) { H4_STR = "-";  color_STRm240 = Orange;}
   if ((rsi_h4 < 50) && (stoc_H4 > 40) && (cci_HH4 < 0)) { H4_STR = "-";  color_STRm240 = Orange;}
   if ((rsi_h4 > 50) && (stoc_H4 < 60) && (cci_HH4 > 0)) { H4_STR = "-";  color_STRm240 = Orange;}
   if ((rsi_h4 > 50) && (stoc_H4 > 40) && (cci_HH4 < 0)) { H4_STR = "-";  color_STRm240 = Orange;}  
   if ((rsi_h4 > 50) && (stoc_H4 < 60) && (cci_HH4 < 0)) { H4_STR = "-";  color_STRm240 = Orange;}
   
   if ((rsi_d1 < 50) && (stoc_D1 > 40) && (cci_DD1 > 0)) { D1_STR = "-";  color_STRm1440 = Orange;}
   if ((rsi_d1 > 50) && (stoc_D1 < 60) && (cci_DD1 < 0)) { D1_STR = "-";  color_STRm1440 = Orange;}
   if ((rsi_d1 < 50) && (stoc_D1 > 40) && (cci_DD1 < 0)) { D1_STR = "-";  color_STRm1440 = Orange;}
   if ((rsi_d1 > 50) && (stoc_D1 < 60) && (cci_DD1 > 0)) { D1_STR = "-";  color_STRm1440 = Orange;}
   if ((rsi_d1 > 50) && (stoc_D1 > 40) && (cci_DD1 < 0)) { D1_STR = "-";  color_STRm1440 = Orange;}  
   if ((rsi_d1 > 50) && (stoc_D1 < 60) && (cci_DD1 < 0)) { D1_STR = "-";  color_STRm1440 = Orange;}
   

   Obj0002 = "SignalSTRM1t" + 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, 155+Adjust_Side_to_side);
   ObjectSet(Obj0002, OBJPROP_YDISTANCE, 50+Shift_UP_DN);  

   Obj0003 = "SignalSTRM1" + LabelTime ;        
           ObjectCreate(Obj0003, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0003, M1_STR, 40, "Tahoma Narrow",  color_STRm1);
   ObjectSet(Obj0003, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0003, OBJPROP_XDISTANCE, 130+Adjust_Side_to_side);
   ObjectSet(Obj0003, OBJPROP_YDISTANCE, 20+Shift_UP_DN); 

   Obj0004 = "SignalSTRM5" + LabelTime ;          
           ObjectCreate(Obj0004, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0004, M5_STR, 40, "Tahoma Narrow",  color_STRm5);
   ObjectSet(Obj0004, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0004, OBJPROP_XDISTANCE, 110+Adjust_Side_to_side);
   ObjectSet(Obj0004, OBJPROP_YDISTANCE, 20+Shift_UP_DN); 
      
   Obj0005 = "SignalSTRM15" + LabelTime ; 
   ObjectCreate(Obj0005, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0005, M15_STR, 40, "Tahoma Narrow",  color_STRm15);
   ObjectSet(Obj0005, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0005, OBJPROP_XDISTANCE, 90+Adjust_Side_to_side);
   ObjectSet(Obj0005, OBJPROP_YDISTANCE, 20+Shift_UP_DN); 
      
   Obj0006 = "SignalSTRM30" + LabelTime ; 
   ObjectCreate(Obj0006, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0006, M30_STR, 40, "Tahoma Narrow",  color_STRm30);
   ObjectSet(Obj0006, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0006, OBJPROP_XDISTANCE, 70+Adjust_Side_to_side);
   ObjectSet(Obj0006, OBJPROP_YDISTANCE, 20+Shift_UP_DN); 

   Obj0007 = "SignalSTRM60" + LabelTime ;      
           ObjectCreate(Obj0007, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0007, H1_STR, 40, "Tahoma Narrow",  color_STRm60);
   ObjectSet(Obj0007, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0007, OBJPROP_XDISTANCE, 50+Adjust_Side_to_side);
   ObjectSet(Obj0007, OBJPROP_YDISTANCE, 20+Shift_UP_DN); 

   Obj0008 = "SignalSTRM240" + LabelTime ;          
           ObjectCreate(Obj0008, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0008, H4_STR, 40, "Tahoma Narrow",  color_STRm240);
   ObjectSet(Obj0008, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0008, OBJPROP_XDISTANCE, 30+Adjust_Side_to_side);
   ObjectSet(Obj0008, OBJPROP_YDISTANCE, 20+Shift_UP_DN);

   Obj0009 = "SignalSTRM1440" + LabelTime ;    
           ObjectCreate(Obj0009, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(Obj0009, D1_STR, 40, "Tahoma Narrow",  color_STRm1440);
   ObjectSet(Obj0009, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0009, OBJPROP_XDISTANCE, 10+Adjust_Side_to_side);
   ObjectSet(Obj0009, OBJPROP_YDISTANCE, 20+Shift_UP_DN);
  
 //----
   return(0);
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
// thank you Xard777 from www.forex-tsd.com for showing me how to delete the objects properly.

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); 
 
  }

Comments