Coding documentation

i am trying to create a custom drawing tool. Is there any documentation as to what is variable, functions are available? For example the “anchors[0]” object has an x value and a y value. Where can i find documentation on this stuff?

Edit: A fully working drawing tool code would be extremely helpful. Something like releasing the code for the “Trend” drawing tool. I can work from that.

Not sure if you have figured this out, but, there are a couple of drawing tools available in the community indicators and from there you can click links to the files to view the source code and/or install them and then view the source code from the code editor. (I’m also trying to figure out how to create custom drawing tools.) Hope this helps.