I have use following code to write rectangle as per my requirements, but want to draw right extended rectangle. Kindly let me know what change need to do for expected drawing output.
GfxRectangle( x1, y1, x2, y2 )
RETURNS NOTHING
FUNCTION: Draws a rectangle using the current pen. The interior of the rectangle is filled using the current brush.
Parameters
x1 - x-coordinate of the upper left corner of the rectangle
y1 - y-coordinate of the upper left corner of the rectangle
x2 - x-coordinate of the lower right corner of the rectangle
y2 - y-coordinate of the lower right corner of the rectangle
Hello,
If you break down the GFXrectangle Coordinates you could interpret what is going on.
The X coordinates relate to Bars and the Y coordinates relate to price.
The first X1 coordinate is the Start bar and the next X2 coordinate is the End bar. So to extend past
last bar : X2 + 1 etc.
just change GfxSetCoordsMode() 's mode to 2
then use the value of status("pxwidth" ) or status("pxchartwidth") ,
by placing it on third argrument of GfxRectangle , you are able to extend your rectangle