my function call line in start() is
LN(1,"+ 100", H, White);
my function is
void LN(double n, string nm, double val, color CL)
{
string NN = nm + DoubleToStr(n,0);
ObjectDelete(NN);
ObjectCreate(0,NN,OBJ_HLINE,0,0,val);
ObjectSet(NN,OBJPROP_COLOR,CL);
string nmL = NN + "_Label";
double VL = ObjectGet(NN,OBJPROP_PRICE1)
;
ObjectCreate(0,nmL,OBJ_LABEL,Time[0],VL);
ObjectSetText(nmL,nm,10,"Arial",CL);
}
my problem is that line labels are not being shown on chart, i know i am doing something wrong but after countless hours of wasting time i decided to look for expert opinion
please guide
LN(1,"+ 100", H, White);
my function is
void LN(double n, string nm, double val, color CL)
{
string NN = nm + DoubleToStr(n,0);
ObjectDelete(NN);
ObjectCreate(0,NN,OBJ_HLINE,0,0,val);
ObjectSet(NN,OBJPROP_COLOR,CL);
string nmL = NN + "_Label";
double VL = ObjectGet(NN,OBJPROP_PRICE1)
;
ObjectCreate(0,nmL,OBJ_LABEL,Time[0],VL);
ObjectSetText(nmL,nm,10,"Arial",CL);
}
my problem is that line labels are not being shown on chart, i know i am doing something wrong but after countless hours of wasting time i decided to look for expert opinion
please guide