Bei mir werden die Linien an der korrekten Position gezeichnet, allerdings ohne Text??
Code:
Code:
int OnInit(){
ObjectsDeleteAll();
string line = "Linie";
for (int i = 0; i < 5; i++) {
Draw(line + (string)i, iTime(NULL, 0, i));
}
return(INIT_SUCCEEDED);
}
void Draw(string name, datetime time_draw) {
ResetLastError();
if(ObjectFind(name)!=0)
if(!ObjectCreate(0,name,OBJ_VLINE,0,time_draw,0))
{ Print(__FUNCTION__," failed ",name," Code=",_LastError); return; }
//ObjectSetInteger(0,name,OBJPROP_TIME,VertTime);
ObjectSetInteger(0,name,OBJPROP_COLOR,clrGreen);
ObjectSetInteger(0,name,OBJPROP_STYLE,STYLE_DOT);
ObjectSetInteger(0,name,OBJPROP_WIDTH,1);
ObjectSetString(0,name,OBJPROP_TEXT,"Trend Trade Start");
ObjectSetInteger(0,name,OBJPROP_BACK,true);
ObjectSetInteger(0,name,OBJPROP_SELECTABLE,true); //make deleting possible
ObjectSetInteger(0,name,OBJPROP_SELECTED,false);
return;
}
traderdoc