DrawLine





//+------------------------------------------------------------------+
//|                                                     DrawLine.mq4 |
//|                                            by yangelong  08.07.04|
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2008, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+

extern int price1=0;
extern color color1=Yellow;
extern int width1=1;
extern int price2=0;
extern color color2=Yellow;
extern int width2=1;
extern int price3=0;
extern color color3=Yellow;
extern int width3=1;
extern int price4=0;
extern color color4=Yellow;
extern int width4=1;
extern int price5=0;
extern color color5=Yellow;
extern int width5=1;
extern int price6=0;
extern color color6=Yellow;
extern int width6=1;
extern int price7=0;
extern color color7=Yellow;
extern int width7=1;
extern int price8=0;
extern color color8=Yellow;
extern int width8=1;
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
if(price1!=0)
{
ObjectCreate("price1", OBJ_HLINE, 0, Time[0], price1);
ObjectSet("price1",OBJPROP_COLOR,color1);
ObjectSet("price1",OBJPROP_WIDTH,width1);
}
if(price2!=0)
{
ObjectCreate("price2", OBJ_HLINE, 0, Time[0], price2);
ObjectSet("price2",OBJPROP_COLOR,color2);
ObjectSet("price2",OBJPROP_WIDTH,width2);
}
if(price3!=0)
{
ObjectCreate("price3", OBJ_HLINE, 0, Time[0], price3);
ObjectSet("price3",OBJPROP_COLOR,color3);
ObjectSet("price3",OBJPROP_WIDTH,width3);
}
if(price4!=0)
{
ObjectCreate("price4", OBJ_HLINE, 0, Time[0], price4);
ObjectSet("price4",OBJPROP_COLOR,color4);
ObjectSet("price4",OBJPROP_WIDTH,width4);
}
if(price5!=0)
{
ObjectCreate("price5", OBJ_HLINE, 0, Time[0], price5);
ObjectSet("price5",OBJPROP_COLOR,color5);
ObjectSet("price5",OBJPROP_WIDTH,width5);
}
if(price6!=0)
{
ObjectCreate("price6", OBJ_HLINE, 0, Time[0], price6);
ObjectSet("price6",OBJPROP_COLOR,color6);
ObjectSet("price6",OBJPROP_WIDTH,width6);
}
if(price7!=0)
{
ObjectCreate("price7", OBJ_HLINE, 0, Time[0], price7);
ObjectSet("price7",OBJPROP_COLOR,color7);
ObjectSet("price7",OBJPROP_WIDTH,width7);
}
if(price8!=0)
{
ObjectCreate("price8", OBJ_HLINE, 0, Time[0], price8);
ObjectSet("price8",OBJPROP_COLOR,color8);
ObjectSet("price8",OBJPROP_WIDTH,width8);
}
//----
   return(0);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:

Series array that contains open time of each bar


Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: