OBJ_HLINE between two points in time

 
I am trying to get mql4 to create a horizontal line between two points in time. It should NOT extend the whole width of the chart. Is there any way to do this??

Here is a sample of my code

ObjName = GetName("SSTD", i);
// ObjectCreate(ObjName, OBJ_HLINE, 0, NULL, SetupSHiPrice );
ObjectCreate(ObjName, OBJ_HLINE, 0, SetupSBeginDt, SetupSHiPrice, SetupSEndDt, SetupSHiPrice );
ObjectSet(ObjName, OBJPROP_TIME1, SetupSBeginDt);
ObjectSet(ObjName, OBJPROP_TIME2, SetupSEndDt);
ObjectSet(ObjName, OBJPROP_COLOR, Yellow);
ObjectSet(ObjName, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(ObjName, OBJPROP_WIDTH, 2);


thanks in advance for your help
 
Add
ObjectSet(ObjName, OBJPROP_RAY,true);
 
That did not seem to work, on another forum someone said change OBJ_HLINE to OBJ_TREND and set OBJPROP_Ray to false, which works fine. Here is the revised code for anyones future reference.

It is basically a horizontal trendline between two points in time.

ObjectCreate(ObjName, OBJ_TREND, 0, SetupSBeginDt, SetupSHiPrice, SetupSEndDt, SetupSHiPrice );
ObjectSet(ObjName, OBJPROP_COLOR, Yellow);
ObjectSet(ObjName, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(ObjName, OBJPROP_WIDTH, 2);
ObjectSet(ObjName, OBJPROP_RAY, False);


Rosh:
Add
ObjectSet(ObjName, OBJPROP_RAY,true);
 
Yes, you are right.
Reason: