Page 1 of 1

Issue with Draw and Drawing Tools?

PostPosted: Fri Dec 01, 2017 12:01 am
by imxuf92
Hello!

I have an owner-drawn indicator that draws a large rectangle on the center of the chart area during stage 0 of the Draw() method. (I'm using stage0 because I want the candles to paint on top of the rectangle.)

I've noticed that when I add drawing tools within that indicator-drawn rectangle (arrows, additional rectangles, etc.) I am unable to re-select them once they've been sited on the chart.

It's almost as if they get drawn behind the indicator's drawing layer.

Thoughts? Is this expected? Is there a way to prevent this behavior?

Thanks in advance!

Re: Issue with Draw and Drawing Tools?

PostPosted: Fri Dec 01, 2017 3:36 am
by Apprentice
Hi,
Can you share your code?

Re: Issue with Draw and Drawing Tools?

PostPosted: Fri Dec 01, 2017 11:36 am
by imxuf92
1) Add the attached indicator to your chart.

2) Then, draw a chart element "rectangle" within the owner-drawn rectangle.

You'll notice you lose the ability to access the element just added.

It always seems to be an issue with the rectangle chart element. It only seems to be an issue some of the time with other chart elements.

Not a huge deal, but a bit irritating at times.

Regards.