Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing a draw object's second x anchor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing a draw object's second x anchor

    Hello, I have an automated strategy that, currently, draws highlights at the significant levels. However, I would like to make them rectangle objects that anchor at creation, and constantly adjust their ending x anchor to bar[0]. Is there some way to change a draw objects second x anchor in this manor? Or if someone has a better idea to achieve this, please let me know.

    Best,

    Ryan Beckmann

    #2
    Hello rbeckmann05,

    That would not be possible in the builder because you cannot use variables for a drawing objects anchors. In order to extend a rectangle would require that you make a variable for the first anchor and then call the drawing method again to update the existing object. You would need to pass in the original anchor so it stays at the original location and then use a new value for the second anchor so it updates the rectangle to be the size you wanted. Calling a drawing object with the same tag name will update the existing drawing object. The builder does not have the ability to use variables for bars ago in the drawing tools menu so this would only be able to be accomplished by unlocking the code.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X