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:	132
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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          88 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          135 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          119 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          69 views
          0 likes
          Last Post PaulMohn  
          Working...
          X