//+------------------------------------------------------------------+ //| sTestArea.mq5 | //| Copyright 2011, MetaQuotes Software Corp. | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2011, MetaQuotes Software Corp." #property link "http://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart(){ //--- Bar generation option: 1 - no weekend bars, 2 - 4 bars at the end of Sunday, 3 - all weekend bars, 4 - Saturday bars but no Sunday bars int Variant=1; //--- ObjectsDeleteAll(0); color Colors[]={clrGreen,clrBlue,0,0,0,clrRed,clrMagenta}; int ColorIndex=-1; datetime ta[]; int size=0; int i; switch(Variant){ case 1: size=24*2; ArrayResize(ta,size); for(i=0;i<24;i++){ ta[i]=86400+i*3600; } for(i=24;i