Download MetaTrader 5

ObjectSetInteger and ObjectMove is not work

To add comments, please log in or register
kuolung1967
39
kuolung1967  

I have a labelObject in the charts , and i can show it on the charts

but i use the function to move the label to an other place is not work like this code

      msg = StringFormat("%.4f", nowLow);
      dvolue = nowLow - dWHigh;
      td = Time[itime];
      objname = sNameList[32];
       
      bC = ObjectMove(IDK1, objname, 0, td, dvolue);
      if (bC == false) {
         ierr = GetLastError();
      }
      bC = ObjectSetString(IDK1, objname, OBJPROP_TEXT, msg);
      if (bC == false) {
         ierr = GetLastError();
      }
     
      bC = ObjectSetInteger(IDK1, objname, OBJPROP_COLOR, StockColor[1]);
      if (bC == false) {
         ierr = GetLastError();
      }     
     
      ChartRedraw(IDK1);


and i check the return code bC always is true , but is not change the labelobject where i go wrong

To add comments, please log in or register