//+------------------------------------------------------------------+ //| Pivot_BOX.mq4 | //| Yuriy Tokman (YTG) | //| http://ytg.com.ua/ | //+------------------------------------------------------------------+ #property copyright "Yuriy Tokman (YTG)" #property link "http://ytg.com.ua/" #property version "1.00" #property description "yuriytokman@gmail.com" #property description " " #property description "http://ytg.com.ua/" #property strict #property indicator_chart_window input color colir_LUP = clrLime; input color colir_LDN = clrRed; input color colir_LCE = clrBlack; input color colir_BUP = clrKhaki; input color colir_BDN = clrPink; input bool PriceClose = false; string tx = "ytg_"; double H2,H4,H5,L2,L4,L5,close; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- GetDellName (); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0; i=0;i--) { vName = ObjectName(i); if (StringFind(vName,name_n) !=-1) ObjectDelete(vName); } } //---- void GetRECTANGLE(string name,datetime t_1,double p_1,datetime t_2, double p_2,color c) { if (ObjectFind(name)==-1) ObjectCreate(name,OBJ_RECTANGLE,0,t_1,p_1,t_2,p_2); ObjectSet(name,OBJPROP_STYLE,0); ObjectSet(name,OBJPROP_COLOR,c); ObjectSet(name,OBJPROP_BACK,true); } //+---- void RICE_ARROW(string label,datetime time1,double price1,color colir,int WIDTH ) { if (ObjectFind(label)!=-1) ObjectDelete(label); ObjectCreate(label,OBJ_ARROW, 0,time1,price1); ObjectSet(label,OBJPROP_ARROWCODE,SYMBOL_RIGHTPRICE); ObjectSet(label, OBJPROP_COLOR, colir); ObjectSet(label, OBJPROP_WIDTH,WIDTH); ObjectSet(label, OBJPROP_BACK, false); }