



//+------------------------------------------------------------------+
//|                                                        GatorLines.mq4 |
//|                      
//|                                      
//+------------------------------------------------------------------+
#property copyright "TradeForex"
#property link      ""

#property indicator_chart_window

double storeLineVals[]    ;
string storeLineComments[],filler;
int storeLineTypes[];

int theMode;


extern color Label_Color= Black; 
extern bool SHOWTEXT=true;

extern bool       TextRightShift = true;
extern int        TextOffset = 50;
extern int        FontSize = 7; 
extern int        FillerCount = 42; 
extern int mult=1;
extern bool HideIndicator=false;


extern bool M1HideOpen=false;
extern bool M1HidePreLondon=true;
extern bool M1HideLO=false;
extern bool M1HideLOYesterday=true;
extern bool M1HideUSO=true;
extern bool M1HideYesterday=false;
extern bool M1HideCN=false;
extern bool M1HideHTF=false;
extern bool M1HideH4=true;
extern bool M1HideH1=true;
extern bool M1HideM15=true;
extern bool M1HidePin=false;
extern bool M1HideMNSwings=false;
extern bool M1HideWKSwings=false;

extern bool M5HideOpen=false;
extern bool M5HidePreLondon=true;
extern bool M5HideLO=true;
extern bool M5HideLOYesterday=true;
extern bool M5HideUSO=true;
extern bool M5HideYesterday=true;
extern bool M5HideCN=false;
extern bool M5HideHTF=true;
extern bool M5HideH4=true;
extern bool M5HideH1=true;
extern bool M5HideM15=true;
extern bool M5HidePin=false;
extern bool M5HideMNSwings=false;
extern bool M5HideWKSwings=false;

extern bool M15HideOpen=true;
extern bool M15HidePreLondon=true;
extern bool M15HideLO=true;
extern bool M15HideLOYesterday=true;
extern bool M15HideUSO=true;
extern bool M15HideYesterday=true;
extern bool M15HideCN=true;
extern bool M15HideHTF=false;
extern bool M15HideH4=true;
extern bool M15HideH1=true;
extern bool M15HideM15=true;
extern bool M15HidePin=false;
extern bool M15HideMNSwings=false;
extern bool M15HideWKSwings=false;

extern bool M30HideOpen=true;
extern bool M30HidePreLondon=true;
extern bool M30HideLO=true;
extern bool M30HideLOYesterday=true;
extern bool M30HideUSO=true;
extern bool M30HideYesterday=true;
extern bool M30HideCN=true;
extern bool M30HideHTF=false;
extern bool M30HideH4=true;
extern bool M30HideH1=true;
extern bool M30HideM15=true;
extern bool M30HidePin=false;
extern bool M30HideMNSwings=false;
extern bool M30HideWKSwings=false;

extern bool H1HideOpen=true;
extern bool H1HidePreLondon=true;
extern bool H1HideLO=true;
extern bool H1HideLOYesterday=true;
extern bool H1HideUSO=true;
extern bool H1HideYesterday=true;
extern bool H1HideCN=true;
extern bool H1HideHTF=false;
extern bool H1HideH4=true;
extern bool H1HideH1=true;
extern bool H1HideM15=true;
extern bool H1HidePin=false;
extern bool H1HideMNSwings=false;
extern bool H1HideWKSwings=false;

extern bool H4HideOpen=true;
extern bool H4HidePreLondon=true;
extern bool H4HideLO=true;
extern bool H4HideLOYesterday=true;
extern bool H4HideUSO=true;
extern bool H4HideYesterday=true;
extern bool H4HideCN=true;
extern bool H4HideHTF=true;
extern bool H4HideH4=true;
extern bool H4HideH1=true;
extern bool H4HideM15=true;
extern bool H4HidePin=true;
extern bool H4HideMNSwings=false;
extern bool H4HideWKSwings=false;

extern bool D1HideOpen=true;
extern bool D1HidePreLondon=true;
extern bool D1HideLO=true;
extern bool D1HideLOYesterday=true;
extern bool D1HideUSO=true;
extern bool D1HideYesterday=true;
extern bool D1HideCN=true;
extern bool D1HideHTF=true;
extern bool D1HideH4=true;
extern bool D1HideH1=true;
extern bool D1HideM15=true;
extern bool D1HidePin=true;
extern bool D1HideMNSwings=false;
extern bool D1HideWKSwings=true;

extern bool W1HideOpen=true;
extern bool W1HidePreLondon=true;
extern bool W1HideLO=true;
extern bool W1HideLOYesterday=true;
extern bool W1HideUSO=true;
extern bool W1HideYesterday=true;
extern bool W1HideCN=true;
extern bool W1HideHTF=true;
extern bool W1HideH4=true;
extern bool W1HideH1=true;
extern bool W1HideM15=true;
extern bool W1HidePin=true;
extern bool W1HideMNSwings=false;
extern bool W1HideWKSwings=true;

extern bool MN1HideOpen=true;
extern bool MN1HidePreLondon=true;
extern bool MN1HideLO=true;
extern bool MN1HideLOYesterday=true;
extern bool MN1HideUSO=true;
extern bool MN1HideYesterday=true;
extern bool MN1HideCN=true;
extern bool MN1HideHTF=true;
extern bool MN1HideH4=true;
extern bool MN1HideH1=true;
extern bool MN1HideM15=true;
extern bool MN1HidePin=true;
extern bool MN1HideMNSwings=false;
extern bool MN1HideWKSwings=true;




extern      int  Openlinestyle =  STYLE_SOLID ;
extern      int  Openthickness =2;
extern      color Opencol1 = Aqua;


extern      int  PreLondonlinestyle =  STYLE_SOLID ;
extern      int  PreLondonthickness =2;
extern      color PreLondoncol1 = Orange;


extern      int  LOlinestyle =  STYLE_SOLID ;
extern      int  LOthickness =2;
extern      color LOcol1 = Crimson;


extern      int  LOYesterdaylinestyle =  STYLE_SOLID ;
extern      int  LOYesterdaythickness =1;
extern      color LOYesterdaycol1 = Crimson;


extern      int  USOlinestyle =  STYLE_SOLID ;
extern      int  USOthickness =2;
extern      color USOcol1 = Blue;



extern      int    Yesterdaylinestyle =  STYLE_DASHDOT ;
extern      int    Yesterdaythickness =1;
extern      color  Yesterdaycol1 = Magenta;




extern      int  CNlinestyle =  STYLE_SOLID ;
extern      int  CNthickness =2;
extern      color CNcol1 = Red;


extern      int   HTFlinestyle =  STYLE_SOLID ;
extern      int   HTFthickness =2;
extern      color HTFcol1 = Magenta;


extern      int    H4linestyle =  STYLE_SOLID ;
extern      int    H4thickness =1;
extern      color  H4col1 = Goldenrod;


extern      int    H1linestyle =  STYLE_DASH ;
extern      int    H1thickness =1;
extern      color  H1col1 = Red;


extern      int    M15linestyle =  STYLE_DASHDOT ;
extern      int    M15thickness =1;
extern      color  M15col1 = Red;

extern      int    Pinlinestyle =  STYLE_DASH ;
extern      int    Pinthickness =1;
extern      color  Pincol1 = Goldenrod;

extern      int  MNlinestyle =  STYLE_SOLID ;
extern      int  MNthickness =2;
extern      color MNcol1 = Blue;

extern      int  WKlinestyle =  STYLE_SOLID ;
extern      int  WKthickness =1;
extern      color WKcol1 = Blue;

extern string UniqueID        = "minorsr_";







//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int deinit()
{
   
  DeleteObjects(UniqueID); 
  //DeleteObjects("Line_"); 
    
    
       
   return(0);
}


int init()
{
 deinit();
 
         
      
      if ( TextRightShift )
         {
            
            for (  int j=0; j<FillerCount; j++) filler = filler+ " ";
            TextOffset = 0;
         } 
 
ArrayResize(storeLineVals, 200); 
ArrayResize(storeLineTypes, 200);  
ArrayResize(storeLineComments, 200); 

storeLineVals[3]  = 1.4285;
storeLineTypes[3]         = 60000;
storeLineComments[3]      = "Open";
    
storeLineVals[1]  = 1.4327;
storeLineTypes[1]        =  60001 ;
storeLineComments[1]    = " PreLondon High";

storeLineVals[2]  = 1.4264;
storeLineTypes[2]         =  60001;
storeLineComments[2]      = " PreLondon Low";



storeLineVals[4]  = 1.4305;
storeLineTypes[4]         = 60002;
storeLineComments[4]      = "LOHigh";

storeLineVals[5] = 1.4253;
storeLineTypes[5]        = 60002;
storeLineComments[5]     = "LOLow ";

storeLineVals[6] = 1.44170 ;
storeLineTypes[6]        = 60003;
storeLineComments[6]     =  "LOHighYest_";


storeLineVals[7]  = 1.4135 ;
storeLineTypes[7]         = 60003;
storeLineComments[7]      = "LOLowYest ";

storeLineVals[8]  = 1.4321;
storeLineTypes[8]         = 60004;
storeLineComments[8]      = "USOHigh";

storeLineVals[9]  = 1.4256;
storeLineTypes[9]         = 60004;
storeLineComments[9]      = "USOLow";

storeLineVals[10] = 1.4102;
storeLineTypes[10]        = 50000;
storeLineComments[10]     = "Yest.Low_ ";


storeLineVals[11] = 1.4292;
storeLineTypes[11]          = 50000;
storeLineComments[11]       = "Yest.High_";

storeLineVals[104] = 1.4189;
storeLineTypes[104]          = 50000;
storeLineComments[104]       = "Yest.Open_";




storeLineVals[87]           = 1.4870;
storeLineTypes[87]                  = 50003;
storeLineComments[87]               = " HTF RB FLAT AREA supp";

storeLineVals[90]           = 1.4822;
storeLineTypes[90]                  = 50003;
storeLineComments[90]               = " HTF RB FLAT AREA supp";



storeLineVals[12]   = 1.4768;
storeLineTypes[12]         = 240;
storeLineComments[12]   = "FourHrRangeTop";

storeLineVals[13]    = 1.4710;
storeLineTypes[13]           = 60;
storeLineComments[13]        = "H1SR";

storeLineVals[78]           =1.4690;
storeLineTypes[78]                  = 240;
storeLineComments[78]               = "H4 SR";


storeLineVals[89]           = 1.4688;
storeLineTypes[89]                  = 50003;
storeLineComments[89]               = " HTF RB FLAT AREA supp";

storeLineVals[14]    = 1.4679;
storeLineTypes[14]           = 50002;
storeLineComments[14]        = " cn  and HTF RB FLAT AREA top ";



storeLineVals[15]     = 1.4668;
storeLineTypes[15]             = 15;
storeLineComments[15]         =" 15 strong";


storeLineVals[81]           =1.4651;
storeLineTypes[81]                  = 240;
storeLineComments[81]               = "H4 SR";


storeLineVals[16]      = 1.4649;
storeLineTypes[16]             = 50002;
storeLineComments[16 ]         = " cn and  MOFO bot and 1 hr range bot";

storeLineVals[17]      = 1.4626;
storeLineTypes[17]             = 50002;
storeLineComments[17]          = "  CN 1 hr range bot strong sup";

storeLineVals[18]      = 1.4613;
storeLineTypes[18]             = 60;
storeLineComments[18]          = " 30 m r top and lower 1 hr range bot";


storeLineVals[19]       = 1.4602;
storeLineTypes[19]             = 50003;
storeLineComments[19]          = " HTF RB FLAT AREA SUPP ";

storeLineVals[20]        = 1.4590;
storeLineTypes[20]              = 240;
storeLineComments[20]           = " 4hr supp and r top";



storeLineVals[21]      = 1.4586;
storeLineTypes[21]             = 50002;
storeLineComments[21]          =" CN and 15 tested Sr ";


storeLineVals[22]      = 1.4569;
storeLineTypes[22]             = 240;
storeLineComments[22]          = "4 hr range top";


storeLineVals[23]      = 1.4563;
storeLineTypes[23]             = 15;
storeLineComments[23]          = " 15 SUPP REVERSE";

storeLineVals[24]       = 1.4557;
storeLineTypes[24]             =50004;
storeLineComments[24]          = " 15 PIN REV";

storeLineVals[91]           = 1.4548;
storeLineTypes[91]                  = 50003;
storeLineComments[91]               = " HTF RB FLAT AREA supp";

storeLineVals[84]                = 1.4550;
storeLineTypes[84]                      =50004;
storeLineComments[84]                   = "H1pin ";


storeLineVals[83]           =1.4539;
storeLineTypes[83]                  = 60;
storeLineComments[83]               = "H1SR";

storeLineVals[25]       = 1.4532;
storeLineTypes[25]              = 240;
storeLineComments[25]           = "4 hr range top";

storeLineVals[26]       = 1.4524;
storeLineTypes[26]              = 50002;
storeLineComments[26]           = "CN and 4 hr range top and reversal";

storeLineVals[27]       = 1.4457;
storeLineTypes[27]              = 240;
storeLineComments[27]           = " 4 hr range bot  4 hr SH";



storeLineVals[28]       = 1.4501;
storeLineTypes[28]              = 50002;
storeLineComments[28]           = " CN";


storeLineVals[80]           =1.4492;
storeLineTypes[80]                  = 60;
storeLineComments[80]               = "H1 SR";

storeLineVals[29]       = 1.4486;
storeLineTypes[29]             = 60;
storeLineComments[29]          = "H1Range";


storeLineVals[92]           = 1.4488;
storeLineTypes[92]                  = 50003;
storeLineComments[92]               = " HTF RB FLAT AREA supp";


storeLineVals[82]           =1.4475;
storeLineTypes[82]                  = 15;
storeLineComments[82]               = "15m sr";

storeLineVals[30]        = 1.4466;
storeLineTypes[30]                = 50002;            
storeLineComments[30]            = " CN and 4 4 r bot proven 15 supp ";

storeLineVals[101]           = 1.4450;
storeLineTypes[101]                  = 50003;
storeLineComments[101]               = " CN and HTF RB FLAT AREA supp";




storeLineVals[31]       = 1.4444;
storeLineTypes[31]              =60;
storeLineComments[31]           =  "H1SR";



storeLineVals[32]        = 1.4422;
storeLineTypes[32]               = 50002;
storeLineComments[32]            = " CN & H4SR";


storeLineVals[93]           = 1.4415;
storeLineTypes[93]                  = 15;
storeLineComments[93]               = " 15m  SR";

storeLineVals[85]                = 1.4405;
storeLineTypes[85]                      =240;
storeLineComments[85]                   = "H4SR ";

storeLineVals[34]          = 1.4402;
storeLineTypes[34]                 = 50002;
storeLineComments[34]              = "CB";

storeLineVals[35]           = 1.4393;
storeLineTypes[35]                  = 50002;
storeLineComments[35]               = " CN 4 hr range bottom  and 15 m range t";

storeLineVals[36]           = 1.4380;
storeLineTypes[36]                  = 15;
storeLineComments[36]               = " 15  supp and reversal";


storeLineVals[86]                = 1.4371;
storeLineTypes[86]                      =50004;
storeLineComments[86]                   = "Multiple H4 Pins and 1 hr sr ";


storeLineVals[37]            = 1.4362;
storeLineTypes[37]                   = 15;
storeLineComments[37]                = " 15  supp and reversal";

storeLineVals[102]       = 1.4351;
storeLineTypes[102]              =60;
storeLineComments[102]           =  "Mult. H1SR";

storeLineVals[103]           = 1.3845;
storeLineTypes[103]                  = 50003;
storeLineComments[103]               = " HTF RB FLAT AREA supp";

storeLineVals[38]           = 1.4343;
storeLineTypes[38]                  = 50002;
storeLineComments[38]               = "CN and 4 hr reversalr 30 pin 45";

storeLineVals[39]           = 1.4332;
storeLineTypes[39]                  = 50002;
storeLineComments[39]               = "CN and4 hr pin and reverse";

storeLineVals[33]         = 1.4320;
storeLineTypes[33]                = 240;
storeLineComments[33]              = "H4 Range";



storeLineVals[40]           = 1.4324;
storeLineTypes[40]                  = 50003;
storeLineComments[40]               = " HTF RB FLAT 4 hr pin";


storeLineVals[41]            = 1.4310;
storeLineTypes[41]                   =50004;
storeLineComments[41]                = "1 hr pin and reverse";

storeLineVals[42]            = 1.4295;
storeLineTypes[42]                   = 50002;
storeLineComments[42]                = " CN 4 hr range bottom  and15  r t";



storeLineVals[43]             = 1.4265;
storeLineTypes[43]                    = 50002;
storeLineComments[43]                 = "CN and HTF RB FLAT AREA supp";

storeLineVals[44]             = 1.4280;
storeLineTypes[44]                    = 50002;
storeLineComments[44]                 = "CN";



storeLineVals[45]             = 1.4272;
storeLineTypes[45]                    = 50004;
storeLineComments[45]                 = " Multiple 4 hr pins 1 h suppt and 15 r ";

storeLineVals[94]           = 1.4270;
storeLineTypes[94]                  = 50003;
storeLineComments[94]               = " HTF RB FLAT AREA supp";


storeLineVals[46]              = 1.4264;
storeLineTypes[46]                     = 240;
storeLineComments[46]                  = "15 m r range and  prev 4 hr swing low";


storeLineVals[47]             = 1.4251;
storeLineTypes[47]                    = 50002;
storeLineComments[47]                 = "CN & 4 hr pin reverse last 4 SL";



storeLineVals[48]              = 1.4233;
storeLineTypes[48]                     = 50002;
storeLineComments[48]                  = "CN 1 hr pin and reverse";

storeLineVals[50]              = 1.4220;
storeLineTypes[50]                    = 50003;
storeLineComments[50]                 = "HTF RB FLAT AREA supp";


storeLineVals[95]           = 1.4205;
storeLineTypes[95]                  = 15;
storeLineComments[95]               = " 15m SR";

storeLineVals[51]             = 1.4192;
storeLineTypes[51]                    = 50002;
storeLineComments[51]                 = "CN";

storeLineVals[88]           = 1.4187;
storeLineTypes[88]                  = 50003;
storeLineComments[88]               = " HTF RB FLAT AREA supp";


storeLineVals[79]           =1.4182;
storeLineTypes[79]                  = 240;
storeLineComments[79]               = "H4 SR";


storeLineVals[52]            = 1.4171;
storeLineTypes[52]                   = 15;
storeLineComments[52]                = "M15SR";

storeLineVals[53]           = 1.4162;
storeLineTypes[53]                  = 50002;
storeLineComments[53]               = "CN";

storeLineVals[54]           = 1.4146;
storeLineTypes[54]                  = 50002;
storeLineComments[54]               = "CN";

storeLineVals[96]           = 1.4140;
storeLineTypes[96]                  = 50003;
storeLineComments[96]               = " HTF RB FLAT AREA supp";



storeLineVals[55]           = 1.4132;
storeLineTypes[55]                  =50004;
storeLineComments[55]               = "Mult. pinbars 1 hr";

storeLineVals[56]             = 1.4104;
storeLineTypes[56]                   = 15;
storeLineComments[56]                = "M15SR";

storeLineVals[57]            = 1.4088;
storeLineTypes[57]                   = 15;
storeLineComments[57]                = "M15SR";

storeLineVals[58]             = 1.4073;
storeLineTypes[58]                   = 50004;
storeLineComments[58]                = "h4 pin";

storeLineVals[59]              = 1.4068;
storeLineTypes[59]                   = 50003;
storeLineComments[59]                = "HTF RB FLAT AREA";

storeLineVals[60]             = 1.4042;
storeLineTypes[60]                    = 50002;
storeLineComments[60]                 = "CN Prev 4 hr swing low";

storeLineVals[61]              = 1.4033;
storeLineTypes[61]                    = 240;
storeLineComments[61]                 = "H4SR";

storeLineVals[62]                = 1.4026;
storeLineTypes[62]                      =50004;
storeLineComments[62]                   = "15m pin ";

storeLineVals[63]              = 1.4010;
storeLineTypes[63]                     =50004;
storeLineComments[63]                  = "4 hr  pin reversal";


storeLineVals[64]               = 1.4004;
storeLineTypes[64]                      = 240;
storeLineComments[64]                   = "4 hr  reversal";


storeLineVals[65]               = 1.3996;
storeLineTypes[65]                       =50004;
storeLineComments[65]                   = "4 hr supp and pin";

storeLineVals[66]                = 1.3970;
storeLineTypes[66]                      = 240;
storeLineComments[66]                   = "H4SR";

storeLineVals[100]           = 1.3965;
storeLineTypes[100]                  = 50003;
storeLineComments[100]               = " HTF RB FLAT AREA supp";



storeLineVals[67]               = 1.3940;
storeLineTypes[67]                      = 240;
storeLineComments[67]                   = "H4SR";

storeLineVals[68]               = 1.3870;
storeLineTypes[68]                      = 240;
storeLineComments[68]                   = "H4SR";


storeLineVals[69]                = 1.3853;
storeLineTypes[69]                       = 240;
storeLineComments[69]                    = "4 hr reversal";

storeLineVals[105]           = 1.3772;
storeLineTypes[105]                  = 50003;
storeLineComments[105]               = " HTF RB FLAT AREA supp";

storeLineVals[70]                = 1.3750;
storeLineTypes[70]                      = 240;
storeLineComments[79]                  = "4 hr reversal.";

storeLineVals[97]           = 1.3714;
storeLineTypes[97]                  = 50003;
storeLineComments[97]               = " HTF RB FLAT AREA supp";


storeLineVals[71]           = 1.3629;
storeLineTypes[71]                  = 50002;
storeLineComments[71]               = "CN";

storeLineVals[72]           =1.3622;
storeLineTypes[72]                  = 50002;
storeLineComments[72]               = "CN";

storeLineVals[73]           =1.3609;
storeLineTypes[73]                  = 50002;
storeLineComments[73]               = "CN";



storeLineVals[74]          = 1.3555;
storeLineTypes[74]                =50004;
storeLineComments[74]              = "1 hr  pin reversal.";

storeLineVals[75]           =1.3535;
storeLineTypes[75]                  = 50002;
storeLineComments[75]               = "CN";



storeLineVals[98]           = 1.3495;
storeLineTypes[98]                  = 50003;
storeLineComments[98]               = " HTF RB FLAT AREA supp";


storeLineVals[99]           = 1.3462;
storeLineTypes[99]                  = 50003;
storeLineComments[99]               = " HTF RB FLAT AREA supp";


storeLineVals[76]           =1.3346;
storeLineTypes[76]                  = 50002;
storeLineComments[76]               = "CN";

storeLineVals[77]           =1.3271;
storeLineTypes[77]                  = 50002;
storeLineComments[77]               = "CN";





storeLineVals[106]       = 1.4589;
storeLineTypes[106]             =50004;
storeLineComments[106]          = " 30 PIN REV";



storeLineVals[107]       = 1.4126;
storeLineTypes[107]             =50004;
storeLineComments[107]          = " Mult. 1-4 hr pins/reversals ";




storeLineVals[108]           =1.4379;
storeLineTypes[108]                  = 50002;
storeLineComments[108]               = "CN";


storeLineVals[109]           =1.4342;
storeLineTypes[109]                  = 50002;
storeLineComments[109]               = "CN";

storeLineVals[110]           =1.4152;
storeLineTypes[110]                  = 15;
storeLineComments[110]               = "15 m sr";

storeLineVals[111]           =1.4114;
storeLineTypes[111]                  = 15;
storeLineComments[111]               = "15 m sr";

storeLineVals[112]             = 1.4222;
storeLineTypes[112]                    = 50002;
storeLineComments[112]                 = "CN";

storeLineVals[113]             = 1.4198;
storeLineTypes[113]                    = 60;
storeLineComments[113]                 = "H1 SR";

storeLineVals[114]             = 1.4217;
storeLineTypes[114]                    = 60;
storeLineComments[114]                 = "H1 SR";


storeLineVals[115]        = 1.4321;
storeLineTypes[115]                = 50002;            
storeLineComments[115]            = " CN  ";


storeLineVals[116]        = 1.4345;
storeLineTypes[116]                = 240;            
storeLineComments[116]            = " 4 hr bot proven 15 supp ";



storeLineVals[117]           = 1.4335;
storeLineTypes[117]                  =50004;
storeLineComments[117]               = "4 HR pinbar";


storeLineVals[118]       = 1.4430;
storeLineTypes[118]             =50004;
storeLineComments[118]          = "  multiple 30 PIN REV";


storeLineVals[119]       = 1.4441;
storeLineTypes[119]             =240;
storeLineComments[119]          = "H4 SH";



storeLineVals[120]       = 1.4288;
storeLineTypes[120]             =60;
storeLineComments[120]          = "H1 Sr";

storeLineVals[121]       = 1.6038;
storeLineTypes[121]             =43200;
storeLineComments[121]          = "MN1 SH YH2006";

storeLineVals[122]       = 1.6038;
storeLineTypes[122]             =43200;
storeLineComments[122]          = "MN1 SH YH2006";

storeLineVals[123]       = 1.5143;
storeLineTypes[123]             =43200;
storeLineComments[123]          = "MN1 SH YH2009";

storeLineVals[124]       = 1.4936;
storeLineTypes[124]             =43200;
storeLineComments[124]          = "MN1 SH YH2011";


storeLineVals[125]       = 1.4281;
storeLineTypes[125]             =43200;
storeLineComments[125]          = "MN1 SH ";

storeLineVals[126]       = 1.3662;
storeLineTypes[126]             =43200;
storeLineComments[126]          = "MN1 SH YH2004";


storeLineVals[127]       = 1.4329;
storeLineTypes[127]             =43200;
storeLineComments[127]          = "MN1 SL YL2008";


storeLineVals[128]       = 1.1875;
storeLineTypes[128]             =43200;
storeLineComments[128]          = "MN1 SL YL2010";


storeLineVals[129]       = 1.2766;
storeLineTypes[129]             =43200;
storeLineComments[129]          = "MN1 SL 2006";

storeLineVals[129]       = 1.2442;
storeLineTypes[129]             =43200;
storeLineComments[129]          = "MN1 SL YL2005";

storeLineVals[130]       = 1.2978;
storeLineTypes[130]             =43200;
storeLineComments[130]          = "MN1 SH 2006";


storeLineVals[131]       = 1.2930;
storeLineTypes[131]             =43200;
storeLineComments[131]          = "MN1 SH 2004";

storeLineVals[132]       = 1.4535;
storeLineTypes[132]             =43200;
storeLineComments[132]          = "MN1 SH YH 1994 ";

storeLineVals[133]       = 1.4104;
storeLineTypes[133]             =43200;
storeLineComments[133]          = "MN1 SH YH 1992 ";

storeLineVals[134]       = 1.3353;
storeLineTypes[134]             =43200;
storeLineComments[134]          = "MN1 SH  1996 ";

storeLineVals[134]       = 1.2596;
storeLineTypes[134]             =43200;
storeLineComments[134]          = "MN1 SL 1996";


storeLineVals[135]       = 1.4719;
storeLineTypes[135]             =10080;
storeLineComments[135]          = "W1 SH 2008";

storeLineVals[136]       = 1.4867;
storeLineTypes[136]             =10080;
storeLineComments[136]          = "W1 SH 2008";

storeLineVals[137]       = 1.5284;
storeLineTypes[137]             =10080;
storeLineComments[137]          = "W1 SL 2008";

storeLineVals[138]       = 1.3881;
storeLineTypes[138]             =10080;
storeLineComments[138]          = "W1 SL 2008";


storeLineVals[139]       = 1.2329;
storeLineTypes[139]             =10080;
storeLineComments[139]          = "W1 SL 2008";


storeLineVals[140]       = 1.3737;
storeLineTypes[140]             =10080;
storeLineComments[140]          = "W1 SH 2009";


storeLineVals[141]       = 1.2884;
storeLineTypes[141]             =10080;
storeLineComments[141]          = "W1 SL 2009";


storeLineVals[142]       = 1.446;
storeLineTypes[142]             =10080;
storeLineComments[142]          = "W1 SH 2009";


storeLineVals[143]       = 1.4045;
storeLineTypes[143]             =10080;
storeLineComments[143]          = "W1 SL 2009";

storeLineVals[144]       = 1.4842;
storeLineTypes[144]             =10080;
storeLineComments[144]          = "W1 SH 2009";

storeLineVals[145]       = 1.4483;
storeLineTypes[145]             =10080;
storeLineComments[145]          = "W1 SL 2009";

storeLineVals[146]       = 1.5061;
storeLineTypes[146]             =10080;
storeLineComments[146]          = "W1 SH 2009";

storeLineVals[147]       = 1.4916;
storeLineTypes[147]             =10080;
storeLineComments[147]          = "W1 SL 2009";


storeLineVals[148]       = 1.4217;
storeLineTypes[148]             =10080;
storeLineComments[148]          = "W1 SL 2009";


storeLineVals[149]       = 1.4578;
storeLineTypes[149]             =10080;
storeLineComments[149]          = "W1 SH YH 2010";


storeLineVals[150]       = 1.3434;
storeLineTypes[150]             =10080;
storeLineComments[150]          = "W1 SL 2010";

storeLineVals[151]       = 1.3817;
storeLineTypes[151]             =10080;
storeLineComments[151]          = "W1 SH 2010";


storeLineVals[152]       = 1.3267;
storeLineTypes[152]             =10080;
storeLineComments[152]          = "W1 SL 2010";

storeLineVals[153]       = 1.3691;
storeLineTypes[153]             =10080;
storeLineComments[153]          = "W1 SL 2010";

storeLineVals[154]       = 1.3333;
storeLineTypes[154]             =10080;
storeLineComments[154]          = "W1 SH 2010";

storeLineVals[155]       = 1.4151;
storeLineTypes[155]             =10080;
storeLineComments[155]          = "W1 SH 2010";

storeLineVals[156]       = 1.3860;
storeLineTypes[156]             =10080;
storeLineComments[156]          = "W1 SH 2011";

storeLineVals[157]       = 1.3427;
storeLineTypes[157]             =10080;
storeLineComments[157]          = "W1 SL 2011";

storeLineVals[158]       = 1.3969;
storeLineTypes[158]             =10080;
storeLineComments[158]          = "W1 SL 2011";

storeLineVals[159]       = 1.4695;
storeLineTypes[159]             =10080;
storeLineComments[159]          = "W1 SH 2011";

storeLineVals[160]       = 1.4236;
storeLineTypes[160]             =50004;
storeLineComments[160]          = " H1 PIN Low";


storeLineVals[161]       = 1.4191;
storeLineTypes[161]             =50004;
storeLineComments[161]          = " H4 PIN Low";
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+

  
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
  
    int count;
       int i;
      
      
      
      switch (Period())
      {
         case PERIOD_M1  : 
                 
                  if (M1HideOpen==false) doOpen();
                  if (M1HidePreLondon==false) doPreLondon();
                  if (M1HideLO==false) doLO();
                  if (M1HideLOYesterday==false) doLOYesterday();
                  if (M1HideUSO==false) doUSO();
                  if (M1HideYesterday==false) doYesterday();
                  if (M1HideCN==false) doCN();
                  if (M1HideHTF==false) doHTF();
                  if (M1HideH4==false) doH4();
                  if (M1HideH1==false) doH1();
                  if (M1HideM15==false) doM15();
                  if (M1HidePin==false) doPin();
                  if (M1HideMNSwings==false) doMN();
                  if (M1HideWKSwings==false) doWK();
         break;
         
         case PERIOD_M5  : 
                
                  if (M5HideOpen==false) doOpen();
                  if (M5HidePreLondon==false) doPreLondon();
                  if (M5HideLO==false) doLO();
                  if (M5HideLOYesterday==false) doLOYesterday();
                  if (M5HideUSO==false) doUSO();
                  if (M5HideYesterday==false) doYesterday();
                  if (M5HideCN==false) doCN();
                  if (M5HideHTF==false) doHTF();
                  if (M5HideH4==false) doH4();
                  if (M5HideH1==false) doH1();
                  if (M5HideM15==false) doM15();
                  if (M5HidePin==false) doPin();
                  if (M5HideMNSwings==false) doMN();
                  if (M5HideWKSwings==false) doWK();
          
          break;
          
         case PERIOD_M15 :
          
                   
                  if (M15HideOpen==false) doOpen();
                  if (M15HidePreLondon==false) doPreLondon();
                  if (M15HideLO==false) doLO();
                  if (M15HideLOYesterday==false) doLOYesterday();
                  if (M15HideUSO==false) doUSO();
                  if (M15HideYesterday==false) doYesterday();
                  if (M15HideCN==false) doCN();
                  if (M15HideHTF==false) doHTF();
                  if (M15HideH4==false) doH4();
                  if (M15HideH1==false) doH1();
                  if (M15HideM15==false) doM15();
                  if (M15HidePin==false) doPin();
                  if (M15HideMNSwings==false) doMN();
                  if (M15HideWKSwings==false) doWK();
          
            break;
         case PERIOD_M30 :  
          
                  if (M30HideOpen==false) doOpen();
                  if (M30HidePreLondon==false) doPreLondon();
                  if (M30HideLO==false) doLO();
                  if (M30HideLOYesterday==false) doLOYesterday();
                  if (M30HideUSO==false) doUSO();
                  if (M30HideYesterday==false) doYesterday();
                  if (M30HideCN==false) doCN();
                  if (M30HideHTF==false) doHTF();
                  if (M30HideH4==false) doH4();
                  if (M30HideH1==false) doH1();
                  if (M30HideM15==false) doM15();
                  if (M30HidePin==false) doPin();
                  if (M30HideMNSwings==false) doMN();
                  if (M30HideWKSwings==false) doWK();
          
            
            break;
         case PERIOD_H1  :
          
                 
                  if (H1HideOpen==false) doOpen();
                  if (H1HidePreLondon==false) doPreLondon();
                  if (H1HideLO==false) doLO();
                  if (H1HideLOYesterday==false) doLOYesterday();
                  if (H1HideUSO==false) doUSO();
                  if (H1HideYesterday==false) doYesterday();
                  if (H1HideCN==false) doCN();
                  if (H1HideHTF==false) doHTF();
                  if (H1HideH4==false) doH4();
                  if (H1HideH1==false) doH1();
                  if (H1HideM15==false) doM15();
                  if (H1HidePin==false) doPin();
                  if (H1HideMNSwings==false) doMN();
                  if (H1HideWKSwings==false) doWK();
          
           break;
           
         case PERIOD_H4  :  
         
               
                  if (H4HideOpen==false) doOpen();
                  if (H4HidePreLondon==false) doPreLondon();
                  if (H4HideLO==false) doLO();
                  if (H4HideLOYesterday==false) doLOYesterday();
                  if (H4HideUSO==false) doUSO();
                  if (H4HideYesterday==false) doYesterday();
                  if (H4HideCN==false) doCN();
                  if (H4HideHTF==false) doHTF();
                  if (H4HideH4==false) doH4();
                  if (H4HideH1==false) doH1();
                  if (H4HideM15==false) doM15();
                  if (H4HidePin==false) doPin();
                  if (H4HideMNSwings==false) doMN();
                  if (H4HideWKSwings==false) doWK();
          
         break;
         
         case PERIOD_D1  :
           
              
                  if (D1HideOpen==false) doOpen();
                  if (D1HidePreLondon==false) doPreLondon();
                  if (D1HideLO==false) doLO();
                  if (D1HideLOYesterday==false) doLOYesterday();
                  if (D1HideUSO==false) doUSO();
                  if (D1HideYesterday==false) doYesterday();
                  if (D1HideCN==false) doCN();
                  if (D1HideHTF==false) doHTF();
                  if (D1HideH4==false) doH4();
                  if (D1HideH1==false) doH1();
                  if (D1HideM15==false) doM15();
                  if (D1HidePin==false) doPin();
                  if (D1HideMNSwings==false) doMN();
                  if (D1HideWKSwings==false) doWK();
          
          
           break;
         case PERIOD_W1  :
          
                
                  if (W1HideOpen==false) doOpen();
                  if (W1HidePreLondon==false) doPreLondon();
                  if (W1HideLO==false) doLO();
                  if (W1HideLOYesterday==false) doLOYesterday();
                  if (W1HideUSO==false) doUSO();
                  if (W1HideYesterday==false) doYesterday();
                  if (W1HideCN==false) doCN();
                  if (W1HideHTF==false) doHTF();
                  if (W1HideH4==false) doH4();
                  if (W1HideH1==false) doH1();
                  if (W1HideM15==false) doM15();
                  if (W1HidePin==false) doPin();
                  if (W1HideMNSwings==false) doMN();
                  if (W1HideWKSwings==false) doWK();
          
          
           break;
         case PERIOD_MN1 :
         
                                  if (MN1HideOpen==false) doOpen();
                  if (MN1HidePreLondon==false) doPreLondon();
                  if (MN1HideLO==false) doLO();
                  if (MN1HideLOYesterday==false) doLOYesterday();
                  if (MN1HideUSO==false) doUSO();
                  if (MN1HideYesterday==false) doYesterday();
                  if (MN1HideCN==false) doCN();
                  if (MN1HideHTF==false) doHTF();
                  if (MN1HideH4==false) doH4();
                  if (MN1HideH1==false) doH1();
                  if (MN1HideM15==false) doM15();
                  if (MN1HidePin==false) doPin();
                  if (MN1HideMNSwings==false) doMN();
                  if (MN1HideWKSwings==false) doWK();
          
          
           
           break;
      }
   
      
      
      
      
            
   
       
      
     
}

void SendModes( int aMode)
{


           int count;
            int i; 
            count=ArraySize(storeLineVals);
            for (  i=0; i<count; i++)  
            {
             
                     if  (storeLineTypes[i] == aMode)
                     {
                      SetLevel(theMode , "Line_ "+i, storeLineVals[i], storeLineTypes[i], storeLineComments[i]); 
                       } 
              } 




}



 void doOpen()
{
      theMode = 60000;
 
     SendModes(theMode) ;        
 }
 
void doPreLondon()
{
      theMode = 60001;
 
     SendModes(theMode) ;        
 }
 
void doLO()
{
      theMode = 60002;
 
     SendModes(theMode) ;        
 }
 
void doLOYesterday()
{
      theMode = 60003;
 
     SendModes(theMode) ;        
 }
 
 
    void doUSO()
{
      theMode = 60004;
 
     SendModes(theMode) ;        
 }

   void doYesterday()
{
      theMode = 50000;
 
     SendModes(theMode) ;        
 }
  
    void doPin()
{
      theMode = 50004;
 
     SendModes(theMode) ;        
 }
 
void doH4()
{
   theMode = 240;
   SendModes(theMode) ;        
 }
 
 void doCN()
{
     theMode = 50002;
     SendModes(theMode) ;        
 }
  void doHTF()
{
      theMode = 50003;
 
     SendModes(theMode) ;        
 }
 
   void doH1()
{
      theMode = 60;
 
     SendModes(theMode) ;        
 }

   void doM15()
{
      theMode = 15;
 
     SendModes(theMode) ;        
 }
 
    void doMN()
{
      theMode = 43200;
 
     SendModes(theMode) ;        
 }
 
     void doWK()
{
      theMode = 10080;
 
     SendModes(theMode) ;        
 }
 
 
   int start()
{
   
if(HideIndicator==true)
{
deinit();
}
  
   return(0);
}


//+------------------------------------------------------------------+
//| Helper                                                           |
//+------------------------------------------------------------------+
//void SetLevel(string text, double level, color col1, int linestyle, int thickness, string pricelevel, int visability1, int visability2,int visability3, int visability4, int visability5)
 void SetLevel(int themode1, string text1, double level1, string LineType, string LineComment1)

{
 // Comment(level);
     
      int  linestyle;
      int  thickness;
      color col1;
 switch(themode1)
  {  
  case 240:
       col1 =        H4col1;
       linestyle =   H4linestyle;
       thickness =   H4thickness ;
      
       col1 =        H4col1;
      break;
   case 50002: 
       col1         = CNcol1;
       linestyle =   CNlinestyle;
       thickness =   CNthickness ;
      
      break;
      
         case 50003: 
       col1         = HTFcol1;
       linestyle =   HTFlinestyle;
       thickness =   HTFthickness ;
   
      break;
   
        case 60: 
       col1         = H1col1;
       linestyle =   H1linestyle;
       thickness =   H1thickness ;
      
      break;
      
      
   
        case 15: 
       col1        = M15col1;
       linestyle   = M15linestyle;
       thickness   = M15thickness ;

      break;
      
      
       case 50000: 
       col1        = Yesterdaycol1;
       linestyle   = Yesterdaylinestyle;
       thickness   = Yesterdaythickness ;
     
      break;
      
          
       case 50004: 
       col1        = Pincol1;
       linestyle   = Pinlinestyle;
       thickness   = Pinthickness ;
  
       
       
      break;
      
            case 60000: 
       col1        = Opencol1;
       linestyle   = Openlinestyle;
       thickness   = Openthickness ;
      
      break;
      
            case 60001: 
       col1        = PreLondoncol1;
       linestyle   = PreLondonlinestyle;
       thickness   = PreLondonthickness ;
    
      break;
      
            case 60002: 
       col1        = LOcol1;
       linestyle   = LOlinestyle;
       thickness   = LOthickness ;
    
      break;
      
            case 60003: 
       col1        = LOYesterdaycol1;
       linestyle   = LOYesterdaylinestyle;
       thickness   = LOYesterdaythickness ;

      break;
      
            case 60004: 
       col1        = USOcol1;
       linestyle   = USOlinestyle;
       thickness   = USOthickness ;
  
      break;
      
           case 43200: 
       col1        = MNcol1;
       linestyle   = MNlinestyle;
       thickness   = MNthickness ;
  
      break;
      
                case 10080: 
       col1        = WKcol1;
       linestyle   = WKlinestyle;
       thickness   = WKthickness ;
  
      break;
      
      
      
   
   default:
      //Print("NOT A, B or C");
      break;
  }
   
   

   string labelname= UniqueID+text1 + " Label";
   string linename= UniqueID +text1 + " Line";
   //color Label_Color= Red;
    
   if (ObjectFind(labelname) != 0) 
   {
            
              
               ObjectCreate(labelname, OBJ_TEXT, 0, Time[TextOffset], level1);
              
               if (SHOWTEXT==true && HideIndicator==false)
                 {
                 
                   ObjectSetText(labelname, filler+DoubleToStr(level1,4)+" "+LineComment1 , FontSize, "Arial", Label_Color);
                  
                  
                
                   }
                  else
                  {
                   ObjectSetText(labelname, "" , 8, "Arial", Label_Color);
                  }
    }
    else
     {
            ObjectMove(labelname, 0, Time[20], level1);
      }
   
   if (ObjectFind(linename ) != 0 && HideIndicator==false) 
   {
   
     ObjectCreate(linename, OBJ_HLINE, 0, Time[0], level1);
      ObjectSet(linename, OBJPROP_STYLE, STYLE_DASH);
      ObjectSet(linename, OBJPROP_WIDTH, 2);
      ObjectSet(linename, OBJPROP_COLOR, col1);
      ObjectSet(linename, OBJPROP_STYLE, linestyle);
      ObjectSet(linename, OBJPROP_WIDTH, thickness);
     // ObjectSet(linename, OBJPROP_TIMEFRAMES, OBJ_PERIOD_M15 | OBJ_PERIOD_H1);
     
    
      }
         else {
      ObjectMove(linename, 0, Time[40], level1);
      
   }
   
  } 
  
  
  void DeleteObjects(string ObjName)
{
   for (int i=ObjectsTotal()-1; i >= 0; i--) 
   {
     string name = ObjectName(i);
     if (StringFind(name, ObjName) > -1) ObjectDelete(name);
   }
}   