Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AllowRemovalOfDrawObjects does not function

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

    AllowRemovalOfDrawObjects does not function

    hi
    I have indicator in which inside State == State.SetDefaults
    i set
    AllowRemovalOfDrawObjects = true;


    I draw Text on chart using SharpDx
    When i remove the text manually from chart - the indicator is removed from chart

    according to help guid :

    If true, draw objects from the indicator or strategy can be removed from the chart manually.

    i expect that the indicator wont be removed in this situation
    Last edited by doron; 11-29-2015, 01:25 AM.

    #2
    Originally posted by doron View Post
    I have indicator in which inside State == State.SetDefaults
    i set AllowRemovalOfDrawObjects = true; I draw Text on chart using SharpDx
    When i remove the text manually from chart - the indicator is removed from chart. according to help guid : If true, draw objects from the indicator or strategy can be removed from the chart manually. i expect that the indicator wont be removed in this situation
    Firstly, objects drawn in OnRender should not be selectable. The manual is referring to objects drawn using the Draw.DrawObject.. But your right, currently they are, and this is a know bug in B6 that should be fixed in B7.. Please refer to this thread for more detailed information..

    http://ninjatrader.com/support/forum...ad.php?t=79764


    -=Edge=-
    NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

    Comment


      #3
      Thx Edge for your help.

      I understand that at the moment the fact that an object draw by SharpDx is selectable is a bug, which will be fixed .

      I do want to draw by SharpDx several Objects , mark them together as a group , assign it a tag as if they are a single object and enable user to select it and remove it , without remove of the indicator .

      How this can be done ?

      Comment


        #4
        Originally posted by doron View Post
        Thx Edge for your help. I understand that at the moment the fact that an object draw by SharpDx is selectable is a bug, which will be fixed. I do want to draw by SharpDx several Objects , mark them together as a group , assign it a tag as if they are a single object and enable user to select it and remove it , without remove of the indicator. How this can be done ?
        I don't believe it can be using SharpDX in OnRender.. (If you can't manually select it, you can't manually delete it either)..


        -=Edge=-
        NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

        Comment


          #5
          this is a quote from

          https://ninjatrader.com/Downloads/Ma...njaTrader8.pdf

          All Draw Tools have been implemented as
          NinjaScript® objects allowing developers to build their own
          custom drawing tools.

          I understand from above that we can design and build draw objects with capabilities like draw objects supplied by ninja . Am i correct ? If i am please explain how to do it with example .
          Last edited by doron; 11-30-2015, 08:21 AM.

          Comment


            #6
            Originally posted by doron View Post
            I understand from above that we can design and build draw objects with capabilities like draw objects supplied by ninja . Am i correct ? If i am please explain how to do it with example .
            Your original question asked how to do this from an indicator, not a drawing tool.. Yes, you very well might be able to do what you want by creating your own drawing tool, but your also about to step into a whole new world of complexity..

            You might refer to this thread for a very basic example..

            http://ninjatrader.com/support/forum...ad.php?t=77396


            -=Edge=-
            NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

            Comment


              #7
              thx edge i will review it carefully

              Comment


                #8
                Thank you Edge for your assistance.

                Doron, please let us know if you have any questions.

                Comment


                  #9
                  At the moment I do not want to design a new predefined draw object.

                  I want to draw by SharpDx several Objects , mark them together as a group , assign a tag to the group as if they are a single object and enable user to select it and remove it , without remove of the indicator .

                  My imagination tell me that for that is needed a definition of a new draw object which does not include all the sub element ( sub objects ) needed to draw but kind of a hook on which all other element are added .

                  For example lets start with the definition of the Dot. Which is a draw object. The Dot will be the object the user can select and remove. Allow me to add to the dot , on the fly , from a script any other object made with SharpDx and refer to the whole collection as a single draw object call it "Extended Dot" if you like.

                  The point is that the only draw element which is predefind is the dot all the rest is "on the fly"

                  How this can be done ?

                  Comment


                    #10
                    Hello doron,

                    What you are looking for here would not be possible in OnRender as Edge had stated.

                    So to create a group of objects drawn and then have them grouped together under a tag, moved by user input, and removed by user input, you would need to build them as a drawing tool under the DrawingTool class: http://ninjatrader.com/support/helpG...wing_tools.htm

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by thaison316, Today, 10:25 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post thaison316  
                    Started by demarcog, Today, 05:40 PM
                    5 responses
                    19 views
                    0 likes
                    Last Post demarcog  
                    Started by cincai, Today, 08:16 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post cincai
                    by cincai
                     
                    Started by cincai, Today, 08:04 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post cincai
                    by cincai
                     
                    Started by demarcog, Today, 06:23 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post demarcog  
                    Working...
                    X