Changing properties of a Study in AFL

Is it possible to change properties of a study in AFL? Searched a lot but could not find answer to this question. For eg. I draw a rectangle on a price chart. I am able to get the study id as well as start bar and end bar of the study within AFL. I would like to change the 'Start Y', 'End Y', Z-order and Fill color of the study.

I referred to but it is different from my question.

Information below is additional to the question asked above.
'Start Y' and 'End Y' will be the High and Low within the rectangle. Will be calculated within AFL.
Z-order and Fill color will be constant.

If you want to draw rectangle from AFL just draw it directly via GfxRectange

There is no reason to go more convoluted way.

I will not be able to predict within AFL where to draw a rectangle. I draw multiple rectangles (not overlapped) and perform analysis of the bars contained within the rectangle. I also modify rectangle horizontally depending on the change in prices. So, it will be preferable to be able to change properties of the Rectangle study. Z-order, Fill color do not change on modification but 'Start Y', 'End Y' are required to be changed on modification. Other than manually changing the properties, everything else is working fine.

Other way I can think of is using a parameter that accepts a delimited string of multiple start and end times. In this case, I can use GfxRectangle. But it will be cumbersome especially when rectangles need to be modified.

Being able to change properties will be the best option. But, do let me know if there is a better way than parameter for string of start and end times.

Instead of drawing manual rectangles, I decided to capture keystrokes and note the start and end bars for drawing the rectangle. I am using GfxRectangle and able to set all the required properties, but ran into a different issue and raised a new topic for the same.
Same Keypress captured across multiple charts ids

@Tomasz Thanks for the suggestion as it made me look out for a different solution.