Help on object of rectangle type

 
Has anyone dealt with drawing a rectangle on a chart? How did you go about it. And pst. Im not talking about a thick line running across the chart. A nice rectangle with spaces all round it.
 
tonny:
Has anyone dealt with drawing a rectangle on a chart? How did you go about it. And pst. Im not talking about a thick line running across the chart. A nice rectangle with spaces all round it.
It's just an Object of type OBJ_RECTANGLE what is your difficulty ?
 
How is it positioned(X and Y style) and color set? Ive the X and Y distances from corner top-left but its not appearing. Its like im missing some parameter. Like which objectset parameters will i need?
 

RTFM datetime time1, double price1, datetime time2, double price2. Top Left is irrelevant

RTFM int index, double value

Or Use this and you would have found this

 
tonny:
How is it positioned(X and Y style) and color set? Ive the X and Y distances from corner top-left but its not appearing. Its like im missing some parameter. Like which objectset parameters will i need?
It uses two sets of Time and Price coordinates . . . not pixel values, to set the colour use ObjectSet(name, OBJPROP_COLOR, your_color)
 
RaptorUK:
It uses two sets of Time and Price coordinates . . . not pixel values, to set the colour use ObjectSet(name, OBJPROP_COLOR, your_color)


So its impossible to use X and Y style? I was planning some kind of gauge whose length is determined by the size of some percentage.
WHRoeder:

RTFM datetime time1, double price1, datetime time2, double price2. Top Left is irrelevant

RTFM int index, double value

Or Use this and you would have found this

Yer ive read all about the objects in book and docs but they didnt quite give the info in depth.
 

This is for sure not working.

   ObjectCreate("Rect", OBJ_RECTANGLE,0, D'2013.10.30 18:00', 1.360, D'2013.10.30 20:00', 1.365 );
   ObjectSet("Rect",OBJPROP_COLOR,Red);
 

And this too is not working.

   ObjectCreate("Rect", OBJ_RECTANGLE,0, Time[3], High[3], Time[1], High[1] );
   ObjectSet("Rect",OBJPROP_COLOR,Red);
 
Oh sorry they work. I found the issue. Lol the EA had been detached from the chart ha ha lol.
 
But if i cant use X Y style then its not that helpful after all.
 
tonny:
But if i cant use X Y style then its not that helpful after all.
Unfortunately, no you can't. You can with mql5 using OBJ_RECTANGLE_LABEL