s-gorizontali





//+------------------------------------------------------------------+
//|                                                  gorizontali.mq4 |
//|                                                           bor-ix |
//+------------------------------------------------------------------+
#property copyright "bor-ix"
#property show_inputs

string LineName           = "ãîðèçîíòàëü";
extern int    LineKoli4   = 10;
extern int    LineShag    = 100;
extern int    PriroShenie = 0;
color LineColor, LineColor01, LineColor02;
extern color  LineColor0  = Red;
extern color  LineColor1  = DodgerBlue;
extern color  LineColor2  = DarkSlateBlue;
extern int    LineStyle   = 0;
extern int    LineWidth   = 2;
extern bool   DELETE.FULL = false;


int i, ii;
double gorizontal;

int deinit() 
{
 if (DELETE.FULL == true)
 {  
  for (ii=0;ii<LineKoli4*1000;ii++) 
   {
   ObjectDelete(LineName+"+"+DoubleToStr(ii,0));
   ObjectDelete(LineName+"-"+DoubleToStr(ii,0));
   }         
  return(0);
 }
}
 
int start()
{
 int digits   = MarketInfo(Symbol(),MODE_DIGITS);
 double value = WindowPriceOnDropped();
   
 for(int i=0; i<LineKoli4; i++) 
 {
  ii++;

  if (i == 0) {LineColor01 = LineColor0; LineColor02 = LineColor0;}
  else {LineColor01 = LineColor1; LineColor02 = LineColor2;}
  
  gorizontal=value+i*(LineShag+(PriroShenie*i-PriroShenie)/2)*Point;
    
  {
  ObjectDelete (LineName+"+"+DoubleToStr(ii,0));
  ObjectCreate (LineName+"+"+DoubleToStr(ii,0),OBJ_HLINE,0,0,gorizontal);
  ObjectSet    (LineName+"+"+DoubleToStr(ii,0),OBJPROP_STYLE,LineStyle);
  ObjectSet    (LineName+"+"+DoubleToStr(ii,0),OBJPROP_COLOR,LineColor01);
  ObjectSet    (LineName+"+"+DoubleToStr(ii,0),OBJPROP_WIDTH,LineWidth);

  }
  
  gorizontal=value-i*(LineShag+(PriroShenie*i-PriroShenie)/2)*Point;
   
  {
  ObjectDelete (LineName+"-"+DoubleToStr(ii,0));
  ObjectCreate (LineName+"-"+DoubleToStr(ii,0),OBJ_HLINE,0,0,gorizontal);
  ObjectSet    (LineName+"-"+DoubleToStr(ii,0),OBJPROP_STYLE,LineStyle);
  ObjectSet    (LineName+"-"+DoubleToStr(ii,0),OBJPROP_COLOR,LineColor02);
  ObjectSet    (LineName+"-"+DoubleToStr(ii,0),OBJPROP_WIDTH,LineWidth);

  }
  }
  return(0);
}





Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: