#(SF_TREND_LINES_ALL)





//+------------------------------------------------------------------+
//|                                           SF_TREND_LINES_ALL.mq4 |
//|                                        Copyright © 2007, LEGRUPO |
//|                                           http://www.legrupo.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, LEGRUPO"
#property link      "http://www.legrupo.com"

extern bool show_m1_trendlines = false;
extern color m1_line_color = LavenderBlush;

extern bool show_m5_trendlines = false;
extern color m5_line_color = Honeydew;

extern bool show_m15_trendlines = false;
extern color m15_line_color = AntiqueWhite;

extern bool show_m30_trendlines = false;
extern color m30_line_color = LightPink;

extern bool show_H1_trendlines = true;
extern color H1_line_color = Yellow;

extern bool show_H4_trendlines = true;
extern color H4_line_color = Blue;

extern bool show_D1_trendlines = true;
extern color D1_line_color = Red;

extern bool show_W1_trendlines = true;
extern color W1_line_color = DarkOrange;

extern bool show_MN_trendlines = false;
extern color MN_line_color = White;

#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   ObjectsDeleteAll();
   if (show_m1_trendlines) {
      double m1_trendline = iCustom(NULL,1,"#(SF_TREND_LINES)",m1_line_color,240,0,0,0);
   }
   if (show_m5_trendlines) {
      double m5_trendline = iCustom(NULL,5,"#(SF_TREND_LINES)",m5_line_color,240,0,0,0);
   }
   if (show_m15_trendlines) {
      double m15_trendline = iCustom(NULL,15,"#(SF_TREND_LINES)",m15_line_color,240,0,0,0);
   }
   if (show_m30_trendlines) {
      double m30_trendline = iCustom(NULL,30,"#(SF_TREND_LINES)",m30_line_color,240,0,0,0);
   }
   if (show_H1_trendlines) {
      double H1_trendline = iCustom(NULL,60,"#(SF_TREND_LINES)",H1_line_color,240,0,0,0);
   }
   if (show_H4_trendlines) {
      double H4_trendline = iCustom(NULL,240,"#(SF_TREND_LINES)",H4_line_color,240,0,0,0);
   }
   if (show_D1_trendlines) {
      double D1_trendline = iCustom(NULL,1440,"#(SF_TREND_LINES)",D1_line_color,240,0,0,0);
   }
   if (show_W1_trendlines) {
      double W1_trendline = iCustom(NULL,10080,"#(SF_TREND_LINES)",W1_line_color,240,0,0,0);
   }
   if (show_MN_trendlines) {
      double MN_trendline = iCustom(NULL,43200,"#(SF_TREND_LINES)",MN_line_color,240,0,0,0);
   }   
   int    counted_bars=IndicatorCounted();
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:




Custom Indicators Used:
#(SF_TREND_LINES)

Order Management characteristics:

Other Features: