• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawings stuck on chart NT7

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

    Drawings stuck on chart NT7

    I have an indicator which draws horizontal lines on the chart
    and when I go to change my indicator settings the lines should dissapear
    but they just get stuck on the chart and the only way to get rid of them is to
    reload historical data.

    Any ideas on a fix?

    #2
    Hello trader3419,

    Thank you for your post.

    Upon a reload of NinjaScript after altering settings it should recalculate just as reloading historical data would force the instrument to recalculate
    Do you use specific tag strings for each drawing tool? Can you provide an example of a drawing tool method in your code that does not change after changing the settings in the indicator?

    I look forward to your response.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      I use only DrawRay() and DrawText()
      These objects get stuck on the chart after I change my indicator settings
      Why isn't it disposing of the old drawing objects?

      Comment


        #4
        Hello trader3419,

        Can you provide the lines of code for each object?
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Here is an example

          DrawRay("tag7",false,0, entryprice,1,entryprice, Color.White,DashStyle.Dash,1);

          Comment


            #6
            Hello trader3419,

            Thank you for your patience.

            In testing your DrawRay() syntax, the object is removed when the indicator is removed. Attached is my test, are you performing anything different such as looping through the IDrawObjects or anything else?
            Attached Files
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Thanks Patrick.
              I figured out my problem.
              I was overloading the dispose function while not removing those drawings in that function

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by yqksqhhh, Today, 09:12 PM
              0 responses
              1 view
              0 likes
              Last Post yqksqhhh  
              Started by CriticalMind, 11-29-2015, 12:39 PM
              3 responses
              1,321 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by novel168, 06-14-2019, 09:20 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by johnnybegoode, Today, 08:00 PM
              3 responses
              7 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by digibob, Today, 03:00 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X