drawing a horizontal line on mql 5

 
I am having problems getting my horizontal line to appear on mql5. it says there are no errors but no object is ever created in the object list or appears on the chart. What is the basic code to produce a simple horizontal line with an EA at the current price and time on a M1 chart so I can see what I am doing wrong
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
 
fxpa:
What is the basic code to produce a simple horizontal line
void OnStart()
  {
   long cid=ChartID();
   double bid=SymbolInfoDouble(Symbol(),SYMBOL_BID);
   ResetLastError();
   if(!ObjectCreate(cid,"test",OBJ_HLINE,0,0,bid) || GetLastError()!=0)
      Print("Error creating object: ",GetLastError());
   else
      ChartRedraw(cid);
  }