i made a few functions that makes it easier for visuals, since you guys have helped me i thought i would donate these
void LineMaker(string name,color LineColor,double price, string Description){
ObjectCreate(name, OBJ_HLINE, 0,TimeCurrent(),price);
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(name, OBJPROP_COLOR, LineColor);
ObjectSet(name, OBJPROP_BACK, true);
ObjectSetText(name,Description,8,"Arial",LineColor);
return(0);
}
void LabelMaker(string lblname,int x,int y,string window,string txt,int size,string font,color txtcolor){
ObjectCreate(lblname, OBJ_LABEL, WindowFind(window), 0, 0);
ObjectSet(lblname, OBJPROP_CORNER, 0);
ObjectSet(lblname, OBJPROP_XDISTANCE, x);
ObjectSet(lblname, OBJPROP_YDISTANCE, y);
ObjectSetText(lblname,txt,size,font, txtcolor);
return(0);
}
example to make a line
LineMaker("linename",LineColor,Price,"Description");
example to make a label
LabelMaker("labelname",X,Y,"SeperateWindowName","what you want it to say",fontSize,"Arial",fontColor);
void LineMaker(string name,color LineColor,double price, string Description){
ObjectCreate(name, OBJ_HLINE, 0,TimeCurrent(),price);
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(name, OBJPROP_COLOR, LineColor);
ObjectSet(name, OBJPROP_BACK, true);
ObjectSetText(name,Description,8,"Arial",LineColor);
return(0);
}
void LabelMaker(string lblname,int x,int y,string window,string txt,int size,string font,color txtcolor){
ObjectCreate(lblname, OBJ_LABEL, WindowFind(window), 0, 0);
ObjectSet(lblname, OBJPROP_CORNER, 0);
ObjectSet(lblname, OBJPROP_XDISTANCE, x);
ObjectSet(lblname, OBJPROP_YDISTANCE, y);
ObjectSetText(lblname,txt,size,font, txtcolor);
return(0);
}
example to make a line
LineMaker("linename",LineColor,Price,"Description");
example to make a label
LabelMaker("labelname",X,Y,"SeperateWindowName","what you want it to say",fontSize,"Arial",fontColor);