Show Ea result in Subwindow 1

 

Hi,

I'n my EA I show on the left of the chart the result of some calculation

Here is the code.

void DrawInfo() {
        
           color foo1 = ColorText;
           
           
           // lets assume that:
        int 
        CHFuchiu = 1*CHFbell, 
        CADuchiu = 1*CADbell,
        AUDuchiu = 1*AUDbell,
        USDuchiu = 1*USDbell, 
        GBPuchiu = 1*GBPbell, 
        JPYuchiu = 1*JPYbell, 
        NZDuchiu =1 *NZDbell,
        EURuchiu = 1*EURbell;
           
        
        
        // create and initialize arrays
        string currencies[] = {"CHF", "CAD", "AUD", "USD", "GBP", "JPY", "NZD", "EUR"};
        int num_array[8][2]; ArrayInitialize(num_array, 0);
           
        // put data in num_array and sort
        //    * as you can see, num_array[x][1] holds the index for the appropriate currency described in currencies[]
        num_array[0][0] = CHFuchiu; num_array[0][1] = 0;
        num_array[1][0] = CADuchiu; num_array[1][1] = 1;
        num_array[2][0] = AUDuchiu; num_array[2][1] = 2;
        num_array[3][0] = USDuchiu; num_array[3][1] = 3;
        num_array[4][0] = GBPuchiu; num_array[4][1] = 4;
        num_array[5][0] = JPYuchiu; num_array[5][1] = 5;
        num_array[6][0] = NZDuchiu; num_array[6][1] = 6;
        num_array[7][0] = EURuchiu; num_array[7][1] = 7;
        ArraySort(num_array);
           
        // print results
        for (int i = 0; i < ArrayRange(num_array, 0); i++)
           DrawStat (currencies[num_array[i][1]], num_array[i][0]);

           RowCount=1;
          }
        
        
        int RowCount;
        
        void DrawStat(string name,string value) {
           RowCount++;
           string col1 = name;
           string col2 = name+"_";
           
          // ObjectDelete(col1);
          // ObjectDelete(col2);
        
           ObjectCreate(col1,OBJ_LABEL,0,0,0,0,0);
           ObjectCreate(col2,OBJ_LABEL,0,0,0,0,0);
           
           ObjectSetText(col1,name+" :",FontSize,"Tahoma",ColorText);
           ObjectSet(col1,OBJPROP_XDISTANCE,11*FontSize);
           ObjectSet(col1,OBJPROP_YDISTANCE,FontSize*RowCount*1.8+20);
           ObjectSet(col1,OBJPROP_CORNER,1);
           ObjectSet(col1,OBJPROP_BACK,false);
           
           ObjectSetText(col2,value,FontSize,"Tahoma",ColorText);
           ObjectSet(col2,OBJPROP_XDISTANCE,2*FontSize);
           ObjectSet(col2,OBJPROP_YDISTANCE,FontSize*RowCount*1.8+20);
           ObjectSet(col2,OBJPROP_CORNER,1);
           ObjectSet(col2,OBJPROP_BACK,false);
           
          }
void DrawInfo() {
        
           color foo1 = ColorText;
           
           
           // lets assume that:
        int 
        CHFuchiu = 1*CHFbell, 
        CADuchiu = 1*CADbell,
        AUDuchiu = 1*AUDbell,
        USDuchiu = 1*USDbell, 
        GBPuchiu = 1*GBPbell, 
        JPYuchiu = 1*JPYbell, 
        NZDuchiu =1 *NZDbell,
        EURuchiu = 1*EURbell;
           
        
        
        // create and initialize arrays
        string currencies[] = {"CHF", "CAD", "AUD", "USD", "GBP", "JPY", "NZD", "EUR"};
        int num_array[8][2]; ArrayInitialize(num_array, 0);
           
        // put data in num_array and sort
        //    * as you can see, num_array[x][1] holds the index for the appropriate currency described in currencies[]
        num_array[0][0] = CHFuchiu; num_array[0][1] = 0;
        num_array[1][0] = CADuchiu; num_array[1][1] = 1;
        num_array[2][0] = AUDuchiu; num_array[2][1] = 2;
        num_array[3][0] = USDuchiu; num_array[3][1] = 3;
        num_array[4][0] = GBPuchiu; num_array[4][1] = 4;
        num_array[5][0] = JPYuchiu; num_array[5][1] = 5;
        num_array[6][0] = NZDuchiu; num_array[6][1] = 6;
        num_array[7][0] = EURuchiu; num_array[7][1] = 7;
        ArraySort(num_array);
           
        // print results
        for (int i = 0; i < ArrayRange(num_array, 0); i++)
           DrawStat (currencies[num_array[i][1]], num_array[i][0]);

           RowCount=1;
          }
        
        
        int RowCount;
        
        void DrawStat(string name,string value) {
           RowCount++;
           string col1 = name;
           string col2 = name+"_";
           
          // ObjectDelete(col1);
          // ObjectDelete(col2);
        
           ObjectCreate(col1,OBJ_LABEL,0,0,0,0,0);
           ObjectCreate(col2,OBJ_LABEL,0,0,0,0,0);
           
           ObjectSetText(col1,name+" :",FontSize,"Tahoma",ColorText);
           ObjectSet(col1,OBJPROP_XDISTANCE,11*FontSize);
           ObjectSet(col1,OBJPROP_YDISTANCE,FontSize*RowCount*1.8+20);
           ObjectSet(col1,OBJPROP_CORNER,1);
           ObjectSet(col1,OBJPROP_BACK,false);
           
           ObjectSetText(col2,value,FontSize,"Tahoma",ColorText);
           ObjectSet(col2,OBJPROP_XDISTANCE,2*FontSize);
           ObjectSet(col2,OBJPROP_YDISTANCE,FontSize*RowCount*1.8+20);
           ObjectSet(col2,OBJPROP_CORNER,1);
           ObjectSet(col2,OBJPROP_BACK,false);
           
          }


How Can I do if I want show it in subwindow 1?Thanks