Using OBJ_BITMAP_LABEL for loading a picture in new chart

 

hi everyone

i have an Ea and i want when it put on the chart it open a new chart and put a an image on the chart with  OBJ_BITMAP_LABEL

i use the below code in the OnInit() function to make that when i change chart id of object to current chart it works good but when i use new chart id the image doesn't show on the new chart

  CI= ChartOpen(Symbol(),0);
        ChartSetInteger( CI,CHART_MODE,CHART_LINE);
      ChartSetInteger( CI,CHART_COLOR_FOREGROUND,clrBlack);
      ChartSetInteger( CI,CHART_COLOR_CHART_LINE,clrBlack);
      ChartSetInteger( CI,CHART_COLOR_BACKGROUND,clrBlack);
      ChartSetInteger( CI,CHART_COLOR_GRID,clrBlack);
      ObjectCreate( CI,"ImageOne",OBJ_BITMAP_LABEL,0,0,0);
      ObjectSetString( CI,"ImageOne",OBJPROP_BMPFILE,0,InpFile);
      ObjectSetString( CI,"ImageOne",OBJPROP_BMPFILE,1,InpFile);
      ObjectSetInteger( CI,"ImageOne",OBJPROP_XDISTANCE,0);
      ObjectSetInteger( CI,"ImageOne",OBJPROP_YDISTANCE,0);
      ObjectSetInteger( CI,"ImageOne",OBJPROP_XSIZE,605);
      ObjectSetInteger( CI,"ImageOne",OBJPROP_YSIZE,346);
      ObjectSetInteger( CI,"ImageOne",OBJPROP_HIDDEN,false);
Reason: