//+------------------------------------------------------------------+ //| GannResistance.mq4 | //| Martingeil© 2011, | //| fx.09@mail.ru | //+------------------------------------------------------------------+ //2011 год 1 июля. #property copyright "Martingeil© 2011," #property link "fx.09@mail.ru" #property indicator_chart_window extern string a="Таймфрейм ZZ_FF"; extern int tf=6; //0=текущий тф,1=М1,2=М5,3=М15,4=М30,5=Н1,6=Н4,7=D1,8=W1,9=MN. extern string b = "Пункты между клетками"; extern string c = "4-x =5; для 5-знака = 50;"; extern double pip=50.0; //пункты прибавления к цене для последующих цен в квадрате int q; int h,l; datetime t0,time1,time2,ny_time; double pips; double R1,R2,R3,R4,R5,R6,R7,R8,R9,S1,S2,S3,S4,S5,S6,S7,S8,S9; int mper[10]={0,1,5,15,30,60,240,1440,10080,43200}; //массив таймфрейма //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int init() { pips=pip*Point; return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int deinit() { ObjectDelete("R1");ObjectDelete("R2");ObjectDelete("R3"); ObjectDelete("R4");ObjectDelete("R5");ObjectDelete("R6"); ObjectDelete("R7");ObjectDelete("R8");ObjectDelete("R9"); ObjectDelete("S1");ObjectDelete("S2");ObjectDelete("S3"); ObjectDelete("S4");ObjectDelete("S5");ObjectDelete("S6"); ObjectDelete("S7");ObjectDelete("S8");ObjectDelete("S9"); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { int s; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; if(counted_bars==0) limit--; if(limit<100) return(0); //---- double LouZZ=ZZ_FF(); ny_time=iTime(NULL,PERIOD_D1,0)+(0-Period()/60.0)*3600; time1=t0; time2=ny_time+24*3600+Period()*60; //---- if(hl){pric=hai;t0=th;}else{pric=lou;t0=tl;} return(pric); } //--------------------------------------------------------------------------------- void PlotLine(string name,double value,double value1,double line_color) { double valueN=NormalizeDouble(value,Digits); double valueN1=NormalizeDouble(value1,Digits); bool res=ObjectCreate(name,OBJ_TREND,0,time1,valueN,time2,valueN1); ObjectSet(name,OBJPROP_WIDTH,1); ObjectSet(name,OBJPROP_STYLE,0); ObjectSet(name,OBJPROP_RAY,false); ObjectSet(name,OBJPROP_BACK,true); ObjectSet(name,OBJPROP_COLOR,line_color); } //---------------------------------------------------------------------------------