Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Attach Drawing Object from strategy

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

    Attach Drawing Object from strategy

    Hi ninjas!

    my strategy creates a global drawing object (HorizontalLine) that I can freely move on the charts. However, in some cases, I would like to attach it to an indicator also present on the chart. Is it possible? When I open the drawing object properties, the attach option is greyed out.

    Thanks!

    #2
    Hi RT001, thanks for writing in.

    The strategy will need to add the indicator to itself and use the indicator value within the strategy to plot the line on the indicator data. See "Referencing indicator methods" on this page for a small example of hosting an indicator in a script:


    Kind regards,
    -ChrisL

    Comment


      #3
      Hi again! After some time I am still trying to figure this out, but I realize my question is of a larger scope. It seems none of the drawing object support the chart "attach" feature as shown in my image - only orders.

      Is it possible to attach any drawing object to an indicator with the ctrl + attach feature?

      Thanks

      Click image for larger version

Name:	strategy stop loss attach.jpg
Views:	122
Size:	137.3 KB
ID:	1193525

      Comment


        #4
        Hi, thanks for the follow up. The non-manually drawn tools can not be attached to chart indicators. I attached a test script if you would like to try it.

        Kind regards,
        -ChrisL
        Attached Files

        Comment


          #5
          Awesome, thanks for the help Chris!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          52 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
          70 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
          48 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X