I want to draw Levels on Chart Through code

 

I want to add line in specific range OBJ_HLine Draw line in Complete Window i just want to draw line in specific range  

 

What you are looking for is lines with two anchors. Use OBJ_TREND instead of OBJ_HLINE.

Doerk