Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

User drawn objects CANNOT be removed from via NinjaScript

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

    User drawn objects CANNOT be removed from via NinjaScript

    In Ninjatrader 7 I found this solution to remove all drawing objects from chart:

    System.Reflection.BindingFlags bfObject = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic;
    System.Reflection.MethodInfo methodNT = typeof(ChartControl).GetMethod("RemoveDrawingObjec tsAfterBar", bfObject);
    methodNT.Invoke(this.ChartControl, new Object [] { 0 });

    How can I do it in NinjaTrader 8?



    #2
    Have you tried this?

    Comment


      #3
      Hello Goldy,

      Welcome to the NinjaTrader support forums.

      In this case, because you are working with manually drawn objects you would not be able to use the standard drawing object removal methods. There are currently no methods intended for removing manually drawn objects so this is something I will need to put in a feature request for. Are you specifically trying to remove all objects or a specific object?

      It appears you had previously found an unsupported way to achieve the goal however this would not be something I could detail if this is still possible in NT8. The method being referenced in your reflection statement was not a documented method for NT7 so I would not be certain if this still exists in NT8 in some way. You can certainly explore further using the intellesense in visual studio to try and locate a way to do this however I would not have a suggestion here of a similar method.


      I look forward to being of further assistance.

      JesseNinjaTrader Customer Service

      Comment


        #4
        Hello Jesse,
        in NT7 I use often manually drawn objects like triangles, lines, text ect to read there anchor for furthter evaluate. Then I can delete them directly via skript. I'm working to recode my many developments from NT7 to NT8. I would be glad if I could find as suitable solution in NT8 as well. Of course it would be even better if I could choose special objects.

        @bitdavid:
        there is no probleme, if the objects are drawn via script.

        Goldy


        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rocketman7, Today, 01:00 AM
        0 responses
        1 view
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 04-23-2024, 09:53 PM
        2 responses
        74 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        193 views
        0 likes
        Last Post Hasadafa  
        Working...
        X