Originally Posted by Enivid
I think that you can greatly reduce the indicator's load by placing this part of the code in the OnInit() function:
ObjectCreate(0, "myCCInow", OBJ_LABEL, 0, 0, 0);
ObjectSetString(0, "myCCInow", OBJPROP_FONT, font_face);
ObjectSetInteger(0, "myCCInow", OBJPROP_FONTSIZE, font_size);
ObjectSetInteger(0, "myCCInow", OBJPROP_COLOR, White);
ObjectSetInteger(0, "myCCInow", OBJPROP_CORNER, corner);
ObjectSetInteger(0, "myCCInow", OBJPROP_XDISTANCE, 1+distance_x);
ObjectSetInteger(0, "myCCInow", OBJPROP_YDISTANCE, 1+distance_y);
And this one leave in the OnCalculate():
ObjectSetString(0, "myCCInow", OBJPROP_TEXT,"CCI @ "+DoubleToString(myCCInow,1));
|