Can I draw rectangles already?

Created at 06 Jun 2016, 11:04
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
BE

belonohy

Joined 06.06.2016

Can I draw rectangles already?
06 Jun 2016, 11:04


I saw a thread from 2013 saying that painting of rectangles will be available in new version.

Is it already possible? I would need to paint gap indicator that would show boxes where hidden gaps (aka 123gap) are...

Regards,

Roman

 


@belonohy
Replies

Spotware
07 Jun 2016, 15:00 ( Updated at: 21 Dec 2023, 09:20 )

Dear Trader,

We already provide users with the ability to draw rectangles on the chart. You just select the rectangle from the toolbar and draw it on the chart.


@Spotware

belonohy
07 Jun 2016, 18:21

Sorry I did not highlight that I need it programatically. In cAlgo.

Roman

 


@belonohy

Spotware
08 Jun 2016, 16:27

RE:

Dear Trader,

Currently, we don't provide users with the ability to draw objects programatically. We will consider providing it in the future. Stay tuned.

Additionally, you can post your ideas/suggestions to http://vote.spotware.com/

belonohy said:

Sorry I did not highlight that I need it programatically. In cAlgo.

Roman

 

 


@Spotware

Jiri
09 Jun 2016, 21:28

Hi. You can draw rectangle by using lines. See the sample.

private void DrawRectangle(string objectName, int x, double y, int width, double height, Colors color, int thickness, LineStyle style)
{
    ChartObjects.DrawLine(objectName + "a", x, y, x + width, y, color, thickness, style);
    ChartObjects.DrawLine(objectName + "b", x + width, y, x + width, y + height, color, thickness, style);
    ChartObjects.DrawLine(objectName + "c", x + width, y + height, x, y + height, color, thickness, style);
    ChartObjects.DrawLine(objectName + "d", x, y + height, x, y, color, thickness, style);
}

private void RemoveRectangle(string objectName)
{
    ChartObjects.RemoveObject(objectName + "a");
    ChartObjects.RemoveObject(objectName + "b");
    ChartObjects.RemoveObject(objectName + "c");
    ChartObjects.RemoveObject(objectName + "d");
}

 


@Jiri

MaVe
11 Jun 2016, 16:39

If you are looking for a gap indicator, you can find it there:

/algos/indicators/show/1308

Happy gapping!

 


@MaVe

andreforex
11 Jul 2016, 02:07

extend time

its possible extend Time2 automatically to the last candle?

cheers


@andreforex