Anchor point coordinates are set in pixels. You can select button anchoring corner from ENUM_BASE_CORNER.
The following script creates and moves Button object on the chart. Special functions have been developed to create and change graphical object's properties. You can use these functions "as is" in your own applications.