//+------------------------------------------------------------------+
//|                                           MM-TimeFrame_v5.mq4 |
//|                      Copyright © 2006, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+

#property copyright "Copyright © 2006, MetaQuotes Software Corp."
#property link      " Modified by cja, Xard777 " 
#property link      "http://www.metaquotes.net"
#property copyright "Vladislav Goshkov (VG)."
#property link      "4vg@mail.ru"

#property indicator_chart_window
#define MMFrame "MMFrame"
#define MMTop "MMTop"
#define MMBot "MMBot"
extern color MMColor = C'0,6,60';
extern color MM2Color = C'100,5,60';
extern int P = 64;
extern int StepBack = 0;


double  dmml = 0,
        dvtl = 0,
        sum  = 0,
        v1 = 0,
        v2 = 0,
        mn = 0,
        mx = 0,
        x1 = 0,
        x2 = 0,
        x3 = 0,
        x4 = 0,
        x5 = 0,
        x6 = 0,
        y1 = 0,
        y2 = 0,
        y3 = 0,
        y4 = 0,
        y5 = 0,
        y6 = 0,
        octave = 0,
        fractal = 0,
        range   = 0,
        finalH  = 0,
        finalL  = 0,
        mml[13];
        
double s1[];

string  ln_txt[13],        
        buff_str = "";
        
int     
        bn_v1   = 0,
        bn_v2   = 0,
        OctLinesCnt = 13,
        mml_thk = 8,
        mml_clr[13],
        mml_shft = 3,
        nTime = 0,
        CurPeriod = 0,
        nDigits = 0,
        i = 0;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init() {
IndicatorShortName("MM");
//---- indicators
   ln_txt[0]  = "[-2/8]                                           ";
   ln_txt[1]  = "[-1/8]                                           ";
   ln_txt[2]  = "[0/8]                                           ";
   ln_txt[3]  = "[1/8]                                           ";
   ln_txt[4]  = "[2/8]                                           ";
   ln_txt[5]  = "[3/8]                                           ";
   ln_txt[6]  = "[4/8]                                           ";
   ln_txt[7]  = "[5/8]                                           ";
   ln_txt[8]  = "[6/8]                                           ";
   ln_txt[9]  = "[7/8]                                           ";
   ln_txt[10] = "[8/8]                                           ";
   ln_txt[11] = "[+1/8]                                           ";
   ln_txt[12] = "[+2/8]                                           ";

   mml_shft = 3;//original was 3
   mml_thk  = 3;

    
   mml_clr[0]  = Red;
   mml_clr[1]  = OrangeRed;
   mml_clr[2]  = DeepSkyBlue;
   mml_clr[3]  = Yellow;
   mml_clr[4]  = HotPink;
   mml_clr[5]  = Lime;
   mml_clr[6]  = DeepSkyBlue;
   mml_clr[7]  = Lime;
   mml_clr[8]  = HotPink;
   mml_clr[9]  = Yellow;
   mml_clr[10] = DeepSkyBlue;
   mml_clr[11] = OrangeRed;
   mml_clr[12] = Red;
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit() {
//---- TODO: add your code here
Comment("\n","  ");   
for(i=0;i<OctLinesCnt;i++) {
    buff_str = "mml"+i;
    ObjectDelete(buff_str);
    buff_str = "mml_txt"+i;
    ObjectDelete(buff_str);
    }
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start() 
{
CreateMM();
}
void CreateObj(string objName, double start, double end, color clr)
  {
   ObjectCreate(objName, OBJ_RECTANGLE, 0, iTime(NULL,CurPeriod,P), start, Time[0], end);
   ObjectSet(objName, OBJPROP_COLOR, clr);
   }
   void DeleteObjects()
   {
   ObjectDelete(MMFrame);
   ObjectDelete(MMTop);
   ObjectDelete(MMBot);
   }
   void CreateMM()
   {
   DeleteObjects();
   
//---- TODO: add your code here
  
   
// Start Data window code
double Value = finalH; //8/8th 
double Value1 = finalL; //0/8th

double myFirstValue = iMA(Symbol(),0,1,0,MODE_EMA,PRICE_CLOSE,0);
double XHI = iMA(Symbol(),PERIOD_D1,1,0,MODE_HIGH,PRICE_HIGH,0);
  double xLO = iMA(Symbol(),PERIOD_D1,1,0,MODE_LOW,PRICE_LOW,0);
  
	double g;
   int m,s,k;
   m=Time[0]+Period()*60-CurTime();
   g=m/60.0;
   s=m%60;
   m=(m-m%60)/60;
   //Comment(m + " minutes " + s + " seconds left to bar end");
   g=NormalizeDouble(g,1);
   for (k=1;k<=Bars-1;k++) s1[k]=0.0000001;
   for (k=1;k<=2;k++) s1[k]=g;
	//(m,Digits-4)
          
  //Top Line of Data figures
    ObjectCreate("high", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("high",DoubleToStr(XHI,Digits), 15, "Arial Bold", Coral);
        ObjectSet("high", OBJPROP_CORNER, 0);
        ObjectSet("high", OBJPROP_XDISTANCE, 175);
        ObjectSet("high", OBJPROP_YDISTANCE, 42);
        
    ObjectCreate("high2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("high2","DailyHigh", 9, "Arial Bold", Coral);
        ObjectSet("high2", OBJPROP_CORNER, 0);
        ObjectSet("high2", OBJPROP_XDISTANCE, 180);
        ObjectSet("high2", OBJPROP_YDISTANCE, 30);
        
    ObjectCreate("low", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("low",DoubleToStr(xLO,Digits), 15, "Arial Bold", Coral);
        ObjectSet("low", OBJPROP_CORNER, 0);
        ObjectSet("low", OBJPROP_XDISTANCE, 315);
        ObjectSet("low", OBJPROP_YDISTANCE, 42);
        
    ObjectCreate("low2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("low2","DailyLow", 9, "Arial Bold", Coral);
        ObjectSet("low2", OBJPROP_CORNER, 0);
        ObjectSet("low2", OBJPROP_XDISTANCE, 322);
        ObjectSet("low2", OBJPROP_YDISTANCE, 30);
   
    ObjectCreate("lab2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab2","8/8th ", 10, "Arial Bold", SteelBlue);
        ObjectSet("lab2", OBJPROP_CORNER, 0);
        ObjectSet("lab2", OBJPROP_XDISTANCE, 195);
        ObjectSet("lab2", OBJPROP_YDISTANCE, 0);
 
    ObjectCreate("lab3", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab3","0/8th ", 10, "Arial Bold", SteelBlue);
        ObjectSet("lab3", OBJPROP_CORNER, 0);
        ObjectSet("lab3", OBJPROP_XDISTANCE, 330);
        ObjectSet("lab3", OBJPROP_YDISTANCE, 0);
  
    ObjectCreate("lab4", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab4","Trend ", 10, "Arial Bold", Silver);
        ObjectSet("lab4", OBJPROP_CORNER, 0);
        ObjectSet("lab4", OBJPROP_XDISTANCE, 258);
        ObjectSet("lab4", OBJPROP_YDISTANCE, 3);
   
    ObjectCreate("lab5", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab5",DoubleToStr(myFirstValue,Digits),15, "Arial Bold", Silver);
        ObjectSet("lab5", OBJPROP_CORNER, 0);
        ObjectSet("lab5", OBJPROP_XDISTANCE, 246);
        ObjectSet("lab5", OBJPROP_YDISTANCE, 26);   
    
    ObjectCreate("lab52", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab52",DoubleToStr(Value,Digits),15, "Arial Bold", SteelBlue);
        ObjectSet("lab52", OBJPROP_CORNER, 0);
        ObjectSet("lab52", OBJPROP_XDISTANCE, 175);
        ObjectSet("lab52", OBJPROP_YDISTANCE, 10);
    
    ObjectCreate("lab53", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab53",DoubleToStr(Value1,Digits),15, "Arial Bold", SteelBlue);
        ObjectSet("lab53", OBJPROP_CORNER, 0);
        ObjectSet("lab53", OBJPROP_XDISTANCE, 315);
        ObjectSet("lab53", OBJPROP_YDISTANCE, 10);
    
   /* ObjectCreate("RSIData13", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("RSIData13","TREND", 12, "Arial Bold", Silver);
        ObjectSet("RSIData13", OBJPROP_CORNER, 0);
        ObjectSet("RSIData13", OBJPROP_XDISTANCE, 250);
        ObjectSet("RSIData13", OBJPROP_YDISTANCE, 45); */ 
        
    ObjectCreate("lab6", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab6",DoubleToStr(m,-4),12, "Arial Bold", SlateGray);
        ObjectSet("lab6", OBJPROP_CORNER, 0);
        ObjectSet("lab6", OBJPROP_XDISTANCE, 417);
        ObjectSet("lab6", OBJPROP_YDISTANCE, 0);
   
    ObjectCreate("lab7", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab7",DoubleToStr(s,-4), 12, "Arial Bold", SlateGray);
        ObjectSet("lab7", OBJPROP_CORNER, 0);
        ObjectSet("lab7", OBJPROP_XDISTANCE, 417);
        ObjectSet("lab7", OBJPROP_YDISTANCE, 15);
        
    ObjectCreate("lab8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab8","Mins ", 9, "Arial Bold", SlateGray);
        ObjectSet("lab8", OBJPROP_CORNER, 0);
        ObjectSet("lab8", OBJPROP_XDISTANCE, 387);
        ObjectSet("lab8", OBJPROP_YDISTANCE, 2);     
        
    ObjectCreate("lab9", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab9","Secs ", 9, "Arial Bold", SlateGray);
        ObjectSet("lab9", OBJPROP_CORNER, 0);
        ObjectSet("lab9", OBJPROP_XDISTANCE, 385);
        ObjectSet("lab9", OBJPROP_YDISTANCE, 17);
//End Data Window     


{
if( (nTime != Time[0]) || (CurPeriod != Period()) ) {
   
   v1=(Close[Lowest(NULL,0,MODE_CLOSE,P+StepBack,0)]);
   v2=(Close[Highest(NULL,0,MODE_CLOSE,P+StepBack,0)]);
}
//determine fractal.....
   if( v2<=250000 && v2>25000 )
   fractal=100000;
   else
     if( v2<=25000 && v2>2500 )
     fractal=10000;
     else
       if( v2<=2500 && v2>250 )
       fractal=1000;
       else
         if( v2<=250 && v2>25 )
         fractal=100;
         else
           if( v2<=25 && v2>12.5 )
           fractal=12.5;
           else
             if( v2<=12.5 && v2>6.25)
             fractal=12.5;
             else
               if( v2<=6.25 && v2>3.125 )
               fractal=6.25;
               else
                 if( v2<=3.125 && v2>1.5625 )
                 fractal=3.125;
                 else
                   if( v2<=1.5625 && v2>0.390625 )
                   fractal=1.5625;
                   else
                     if( v2<=0.390625 && v2>0)
                     fractal=0.1953125;
     
   range=(v2-v1);
   sum=MathFloor(MathLog(fractal/range)/MathLog(2));
   octave=fractal*(MathPow(0.5,sum));
   mn=MathFloor(v1/octave)*octave;
   if( (mn+octave)>v2 )
   mx=mn+octave; 
   else
     mx=mn+(2*octave);

// calculating xx
//x2
    if( (v1>=(3*(mx-mn)/16+mn)) && (v2<=(9*(mx-mn)/16+mn)) )
    x2=mn+(mx-mn)/2; 
    else x2=0;
//x1
    if( (v1>=(mn-(mx-mn)/8))&& (v2<=(5*(mx-mn)/8+mn)) && (x2==0) )
    x1=mn+(mx-mn)/2; 
    else x1=0;

//x4
    if( (v1>=(mn+7*(mx-mn)/16))&& (v2<=(13*(mx-mn)/16+mn)) )
    x4=mn+3*(mx-mn)/4; 
    else x4=0;

//x5
    if( (v1>=(mn+3*(mx-mn)/8))&& (v2<=(9*(mx-mn)/8+mn))&& (x4==0) )
    x5=mx; 
    else  x5=0;

//x3
    if( (v1>=(mn+(mx-mn)/8))&& (v2<=(7*(mx-mn)/8+mn))&& (x1==0) && (x2==0) && (x4==0) && (x5==0) )
    x3=mn+3*(mx-mn)/4; 
    else x3=0;

//x6
    if( (x1+x2+x3+x4+x5) ==0 )
    x6=mx; 
    else x6=0;

     finalH = x1+x2+x3+x4+x5+x6;
// calculating yy
//y1
    if( x1>0 )
    y1=mn; 
    else y1=0;

//y2
    if( x2>0 )
    y2=mn+(mx-mn)/4; 
    else y2=0;

//y3
    if( x3>0 )
    y3=mn+(mx-mn)/4; 
    else y3=0;

//y4
    if( x4>0 )
    y4=mn+(mx-mn)/2; 
    else y4=0;

//y5
    if( x5>0 )
    y5=mn+(mx-mn)/2; 
    else y5=0;

//y6
    if( (finalH>0) && ((y1+y2+y3+y4+y5)==0) )
    y6=mn; 
    else y6=0;

    finalL = y1+y2+y3+y4+y5+y6;

    for( i=0; i<OctLinesCnt; i++) {
         mml[i] = 0;
         }
         
   dmml = (finalH-finalL)/8;

   mml[0] =(finalL-dmml*2); //-2/8
   for( i=1; i<OctLinesCnt; i++) {
        mml[i] = mml[i-1] + dmml;
        }
   for( i=0; i<OctLinesCnt; i++ ){
        buff_str = "mml"+i;
        if(ObjectFind(buff_str) == -1) {
           ObjectCreate(buff_str, OBJ_HLINE, 0, Time[0], mml[i]);
           ObjectSet(buff_str, OBJPROP_STYLE, STYLE_SOLID);
           ObjectSet(buff_str, OBJPROP_COLOR, mml_clr[i]);
           ObjectSet(buff_str, OBJPROP_WIDTH,2);
           ObjectMove(buff_str, 0, Time[0],  mml[i]);
           }
        else {
           ObjectMove(buff_str, 0, Time[0],  mml[i]);
           } 
        buff_str = "mml_txt"+i;
        if(ObjectFind(buff_str) == -1) {
           ObjectCreate(buff_str, OBJ_TEXT, 0, Time[mml_shft], mml_shft);
           ObjectSetText(buff_str, ln_txt[i], 12, "Verdana", mml_clr[i]);
           ObjectMove(buff_str, 0, Time[mml_shft],  mml[i]);
           }
        else {
           ObjectMove(buff_str, 0, Time[mml_shft],  mml[i]);
           }
        } // for( i=1; i<=OctLinesCnt; i++ ){
//Comment("\n"," ");
   nTime    = Time[0];
   CurPeriod= Period();
CreateObj(MMFrame, finalH, finalL, MMColor);
CreateObj(MMBot, finalL, mml[0], MM2Color);
CreateObj(MMTop, finalH, mml[12], MM2Color);
   }
 //Data Spool
 double z1,f8,f7,f6,f5,f4,f3,f2,f1;
 double z2,b8,b7,b6,b5,b4,b3,b2,b1;
 double z3,c8,c7,c6,c5,c4,c3,c2,c1;
 double c11,c12,c13,c14,b11,b12,b13,b14,c15,c16,c17,c18;
 
 z1 = (MathFloor(myFirstValue/(fractal/8))*(fractal/8));
 f8 = z1+((fractal/64)*8);
 f7 = z1+((fractal/64)*7);
 f6 = z1+((fractal/64)*6);
 f5 = z1+((fractal/64)*5);
 f4 = z1+((fractal/64)*4);
 f3 = z1+((fractal/64)*3);
 f2 = z1+((fractal/64)*2);
 f1 = z1+((fractal/64)*1);
  
 //b8 = z1+((fractal/512)*0);
 
 z2 = (MathFloor(myFirstValue/(fractal/64))*(fractal/64));
 b8 = z2+((fractal/512)*8);
 b7 = z2+((fractal/512)*7);
 b6 = z2+((fractal/512)*6);
 b5 = z2+((fractal/512)*5);
 b4 = z2+((fractal/512)*4);
 b3 = z2+((fractal/512)*3);
 b2 = z2+((fractal/512)*2);
 b1 = z2+((fractal/512)*1);
 b11 = z2-((fractal/512)*1);
 b12 = z2-((fractal/512)*2);
 b13 = z2+((fractal/512)*9);
 b14 = z2+((fractal/512)*10);
 
 z3 = (MathFloor(myFirstValue/(fractal/512))*(fractal/512));
 c8 = z3+((fractal/4096)*8);
 c7 = z3+((fractal/4096)*7);
 c6 = z3+((fractal/4096)*6);
 c5 = z3+((fractal/4096)*5);
 c4 = z3+((fractal/4096)*4);
 c3 = z3+((fractal/4096)*3);
 c2 = z3+((fractal/4096)*2);
 c1 = z3+((fractal/4096)*1);
 c11 = z3-((fractal/4096)*1);
 c12 = z3-((fractal/4096)*2);
 c13 = z3+((fractal/4096)*9);
 c14 = z3+((fractal/4096)*10);
 c15 = z3+((fractal/4096)*11);
 c16 = z3+((fractal/4096)*12);
 c17 = z3-((fractal/4096)*3);
 c18 = z3-((fractal/4096)*4);
  
 ObjectCreate("lab8/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab8/8","8/8", 8, "Tahoma Bold", DodgerBlue);
        ObjectSet("lab8/8", OBJPROP_CORNER, 0);
        ObjectSet("lab8/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab8/8", OBJPROP_YDISTANCE, 50);
 
 ObjectCreate("lab7/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab7/8","7/8", 8, "Tahoma Bold", Yellow);
        ObjectSet("lab7/8", OBJPROP_CORNER, 0);
        ObjectSet("lab7/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab7/8", OBJPROP_YDISTANCE, 60);       
 
 ObjectCreate("lab6/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab6/8","6/8", 8, "Tahoma Bold", HotPink);
        ObjectSet("lab6/8", OBJPROP_CORNER, 0);
        ObjectSet("lab6/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab6/8", OBJPROP_YDISTANCE, 70);
 
 ObjectCreate("lab5/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab5/8","5/8", 8, "Tahoma Bold", Lime);
        ObjectSet("lab5/8", OBJPROP_CORNER, 0);
        ObjectSet("lab5/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab5/8", OBJPROP_YDISTANCE, 80);
 
 ObjectCreate("lab4/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab4/8","4/8", 8, "Tahoma Bold", DodgerBlue);
        ObjectSet("lab4/8", OBJPROP_CORNER, 0);
        ObjectSet("lab4/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab4/8", OBJPROP_YDISTANCE, 90);
 
 ObjectCreate("lab3/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab3/8","3/8", 8, "Tahoma Bold", Lime);
        ObjectSet("lab3/8", OBJPROP_CORNER, 0);
        ObjectSet("lab3/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab3/8", OBJPROP_YDISTANCE, 100);
        
 ObjectCreate("lab2/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab2/8","2/8", 8, "Tahoma Bold", HotPink);
        ObjectSet("lab2/8", OBJPROP_CORNER, 0);
        ObjectSet("lab2/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab2/8", OBJPROP_YDISTANCE, 110);       
 
 ObjectCreate("lab1/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab1/8","1/8", 8, "Tahoma Bold", Yellow);
        ObjectSet("lab1/8", OBJPROP_CORNER, 0);
        ObjectSet("lab1/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab1/8", OBJPROP_YDISTANCE, 120);
 
 ObjectCreate("lab0/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab0/8","0/8", 8, "Tahoma Bold", DodgerBlue);
        ObjectSet("lab0/8", OBJPROP_CORNER, 0);
        ObjectSet("lab0/8", OBJPROP_XDISTANCE, 10);
        ObjectSet("lab0/8", OBJPROP_YDISTANCE, 130);
 
 ObjectCreate("lab+1/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab+1/8","+1/8", 8, "Tahoma Bold", Yellow);
        ObjectSet("lab+1/8", OBJPROP_CORNER, 0);
        ObjectSet("lab+1/8", OBJPROP_XDISTANCE, 45);
        ObjectSet("lab+1/8", OBJPROP_YDISTANCE, 40);
 
 ObjectCreate("lab+2/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab+2/8","+2/8", 8, "Tahoma Bold", HotPink);
        ObjectSet("lab+2/8", OBJPROP_CORNER, 0);
        ObjectSet("lab+2/8", OBJPROP_XDISTANCE, 45);
        ObjectSet("lab+2/8", OBJPROP_YDISTANCE, 30);
        
 ObjectCreate("lab+3/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab+3/8","3/8", 8, "Tahoma Bold", Lime);
        ObjectSet("lab+3/8", OBJPROP_CORNER, 0);
        ObjectSet("lab+3/8", OBJPROP_XDISTANCE, 98);
        ObjectSet("lab+3/8", OBJPROP_YDISTANCE, 20);
        
 ObjectCreate("lab+4/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab+4/8","4/8", 8, "Tahoma Bold", DodgerBlue);
        ObjectSet("lab+4/8", OBJPROP_CORNER, 0);
        ObjectSet("lab+4/8", OBJPROP_XDISTANCE, 98);
        ObjectSet("lab+4/8", OBJPROP_YDISTANCE, 10);             
 
 ObjectCreate("lab-1/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab-1/8","-1/8", 8, "Tahoma Bold", Yellow);
        ObjectSet("lab-1/8", OBJPROP_CORNER, 0);
        ObjectSet("lab-1/8", OBJPROP_XDISTANCE, 49);
        ObjectSet("lab-1/8", OBJPROP_YDISTANCE, 140);
 
 ObjectCreate("lab-2/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab-2/8","-2/8", 8, "Tahoma Bold", HotPink);
        ObjectSet("lab-2/8", OBJPROP_CORNER, 0);
        ObjectSet("lab-2/8", OBJPROP_XDISTANCE, 49);
        ObjectSet("lab-2/8", OBJPROP_YDISTANCE, 150);
        
 ObjectCreate("lab-3/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab-3/8","5/8", 8, "Tahoma Bold", Lime);
        ObjectSet("lab-3/8", OBJPROP_CORNER, 0);
        ObjectSet("lab-3/8", OBJPROP_XDISTANCE, 98);
        ObjectSet("lab-3/8", OBJPROP_YDISTANCE, 160);
        
 ObjectCreate("lab-4/8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("lab-4/8","4/8", 8, "Tahoma Bold", DodgerBlue);
        ObjectSet("lab-4/8", OBJPROP_CORNER, 0);
        ObjectSet("lab-4/8", OBJPROP_XDISTANCE, 98);
        ObjectSet("lab-4/8", OBJPROP_YDISTANCE, 170);              
 
 ObjectCreate("labf8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf8",DoubleToStr(f8,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labf8", OBJPROP_CORNER, 0);
        ObjectSet("labf8", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf8", OBJPROP_YDISTANCE, 50);
        
 ObjectCreate("labf7", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf7",DoubleToStr(f7,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labf7", OBJPROP_CORNER, 0);
        ObjectSet("labf7", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf7", OBJPROP_YDISTANCE, 60);
        
 ObjectCreate("labf6", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf6",DoubleToStr(f6,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labf6", OBJPROP_CORNER, 0);
        ObjectSet("labf6", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf6", OBJPROP_YDISTANCE, 70);
        
 ObjectCreate("labf5", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf5",DoubleToStr(f5,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labf5", OBJPROP_CORNER, 0);
        ObjectSet("labf5", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf5", OBJPROP_YDISTANCE, 80);
        
 ObjectCreate("labf4", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf4",DoubleToStr(f4,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labf4", OBJPROP_CORNER, 0);
        ObjectSet("labf4", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf4", OBJPROP_YDISTANCE, 90);
        
 ObjectCreate("labf3", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf3",DoubleToStr(f3,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labf3", OBJPROP_CORNER, 0);
        ObjectSet("labf3", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf3", OBJPROP_YDISTANCE, 100);
 
 ObjectCreate("labf2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf2",DoubleToStr(f2,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labf2", OBJPROP_CORNER, 0);
        ObjectSet("labf2", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf2", OBJPROP_YDISTANCE, 110);
        
 ObjectCreate("labf1", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labf1",DoubleToStr(f1,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labf1", OBJPROP_CORNER, 0);
        ObjectSet("labf1", OBJPROP_XDISTANCE, 35);
        ObjectSet("labf1", OBJPROP_YDISTANCE, 120);
        
 ObjectCreate("labz1", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labz1",DoubleToStr(z1,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labz1", OBJPROP_CORNER, 0);
        ObjectSet("labz1", OBJPROP_XDISTANCE, 35);
        ObjectSet("labz1", OBJPROP_YDISTANCE, 130);
        
 ObjectCreate("labb8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb8",DoubleToStr(b8,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labb8", OBJPROP_CORNER, 0);
        ObjectSet("labb8", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb8", OBJPROP_YDISTANCE, 50);                                                               
  
 ObjectCreate("labb7", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb7",DoubleToStr(b7,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labb7", OBJPROP_CORNER, 0);
        ObjectSet("labb7", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb7", OBJPROP_YDISTANCE, 60);
 
 ObjectCreate("labb6", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb6",DoubleToStr(b6,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labb6", OBJPROP_CORNER, 0);
        ObjectSet("labb6", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb6", OBJPROP_YDISTANCE, 70);
 
 ObjectCreate("labb5", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb5",DoubleToStr(b5,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labb5", OBJPROP_CORNER, 0);
        ObjectSet("labb5", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb5", OBJPROP_YDISTANCE, 80);
 
 ObjectCreate("labb4", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb4",DoubleToStr(b4,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labb4", OBJPROP_CORNER, 0);
        ObjectSet("labb4", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb4", OBJPROP_YDISTANCE, 90);
 
 ObjectCreate("labb3", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb3",DoubleToStr(b3,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labb3", OBJPROP_CORNER, 0);
        ObjectSet("labb3", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb3", OBJPROP_YDISTANCE, 100);
 
 ObjectCreate("labb2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb2",DoubleToStr(b2,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labb2", OBJPROP_CORNER, 0);
        ObjectSet("labb2", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb2", OBJPROP_YDISTANCE, 110);
 
 ObjectCreate("labb1", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb1",DoubleToStr(b1,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labb1", OBJPROP_CORNER, 0);
        ObjectSet("labb1", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb1", OBJPROP_YDISTANCE, 120);
 
 ObjectCreate("labz2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labz2",DoubleToStr(z2,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labz2", OBJPROP_CORNER, 0);
        ObjectSet("labz2", OBJPROP_XDISTANCE, 80);
        ObjectSet("labz2", OBJPROP_YDISTANCE, 130);
 
 ObjectCreate("labc8", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc8",DoubleToStr(c8,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labc8", OBJPROP_CORNER, 0);
        ObjectSet("labc8", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc8", OBJPROP_YDISTANCE, 50);
 
 ObjectCreate("labc7", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc7",DoubleToStr(c7,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labc7", OBJPROP_CORNER, 0);
        ObjectSet("labc7", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc7", OBJPROP_YDISTANCE, 60);
 
 ObjectCreate("labc6", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc6",DoubleToStr(c6,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labc6", OBJPROP_CORNER, 0);
        ObjectSet("labc6", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc6", OBJPROP_YDISTANCE, 70);
 
 ObjectCreate("labc5", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc5",DoubleToStr(c5,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labc5", OBJPROP_CORNER, 0);
        ObjectSet("labc5", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc5", OBJPROP_YDISTANCE, 80);
 
 ObjectCreate("labc4", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc4",DoubleToStr(c4,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labc4", OBJPROP_CORNER, 0);
        ObjectSet("labc4", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc4", OBJPROP_YDISTANCE, 90);
 
 ObjectCreate("labc3", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc3",DoubleToStr(c3,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labc3", OBJPROP_CORNER, 0);
        ObjectSet("labc3", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc3", OBJPROP_YDISTANCE, 100);
 
 ObjectCreate("labc2", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc2",DoubleToStr(c2,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labc2", OBJPROP_CORNER, 0);
        ObjectSet("labc2", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc2", OBJPROP_YDISTANCE, 110);
 
 ObjectCreate("labc1", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc1",DoubleToStr(c1,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labc1", OBJPROP_CORNER, 0);
        ObjectSet("labc1", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc1", OBJPROP_YDISTANCE, 120);
 
 ObjectCreate("labz3", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labz3",DoubleToStr(z3,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labz3", OBJPROP_CORNER, 0);
        ObjectSet("labz3", OBJPROP_XDISTANCE, 125);
        ObjectSet("labz3", OBJPROP_YDISTANCE, 130);
 
 ObjectCreate("labc11", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc11",DoubleToStr(c11,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labc11", OBJPROP_CORNER, 0);
        ObjectSet("labc11", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc11", OBJPROP_YDISTANCE, 140);
 
 ObjectCreate("labc12", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc12",DoubleToStr(c12,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labc12", OBJPROP_CORNER, 0);
        ObjectSet("labc12", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc12", OBJPROP_YDISTANCE, 150);
        
 ObjectCreate("labc17", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc17",DoubleToStr(c17,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labc17", OBJPROP_CORNER, 0);
        ObjectSet("labc17", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc17", OBJPROP_YDISTANCE, 160); 
        
 ObjectCreate("labc18", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc18",DoubleToStr(c18,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labc18", OBJPROP_CORNER, 0);
        ObjectSet("labc18", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc18", OBJPROP_YDISTANCE, 170);              
 
 ObjectCreate("labc13", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc13",DoubleToStr(c13,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labc13", OBJPROP_CORNER, 0);
        ObjectSet("labc13", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc13", OBJPROP_YDISTANCE, 40);
 
 ObjectCreate("labc14", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc14",DoubleToStr(c14,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labc14", OBJPROP_CORNER, 0);
        ObjectSet("labc14", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc14", OBJPROP_YDISTANCE, 30);
        
 ObjectCreate("labc15", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc15",DoubleToStr(c15,Digits),8, "Tahoma Bold", Lime);
        ObjectSet("labc15", OBJPROP_CORNER, 0);
        ObjectSet("labc15", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc15", OBJPROP_YDISTANCE, 20); 
        
 ObjectCreate("labc16", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labc16",DoubleToStr(c16,Digits),8, "Tahoma Bold", DodgerBlue);
        ObjectSet("labc16", OBJPROP_CORNER, 0);
        ObjectSet("labc16", OBJPROP_XDISTANCE, 125);
        ObjectSet("labc16", OBJPROP_YDISTANCE, 10);             
 
 ObjectCreate("labb11", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb11",DoubleToStr(b11,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labb11", OBJPROP_CORNER, 0);
        ObjectSet("labb11", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb11", OBJPROP_YDISTANCE, 140);
 
 ObjectCreate("labb12", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb12",DoubleToStr(b12,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labb12", OBJPROP_CORNER, 0);
        ObjectSet("labb12", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb12", OBJPROP_YDISTANCE, 150);
 
 ObjectCreate("labb13", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb13",DoubleToStr(b13,Digits),8, "Tahoma Bold", Yellow);
        ObjectSet("labb13", OBJPROP_CORNER, 0);
        ObjectSet("labb13", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb13", OBJPROP_YDISTANCE, 40);
 
 ObjectCreate("labb14", OBJ_LABEL, WindowFind("PT"), 0, 0);
        ObjectSetText("labb14",DoubleToStr(b14,Digits),8, "Tahoma Bold", HotPink);
        ObjectSet("labb14", OBJPROP_CORNER, 0);
        ObjectSet("labb14", OBJPROP_XDISTANCE, 80);
        ObjectSet("labb14", OBJPROP_YDISTANCE, 30);
 
 
//---- End Of Program

  return(0);
  }
//+------------------------------------------------------------------+