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

Refresh text on bar

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

    Refresh text on bar

    Hi,

    I created an indicator in order to add some text on bars. Whenever the added text is not needed anymore, I remove it throw the method RemoveDrawObject("tag1"). So, the text is added and removed according to my expectations.
    Now, I noticed many times that the text on the chart is not updated immediately. I always have to press "F5" to get the last status. I tried to add in the code the following methods: ForceRefresh() and Update() without success.

    How can I fix this issue?

    Thank you.

    #2
    Hello Apeppo,

    Thanks for your post.

    If you leave your script to run (without using F5 refresh) is the text removed as expected but just not quick enough?

    Is your code running with Calculate.OnBarClose = true or = false?
    Last edited by NinjaTrader_PaulH; 02-04-2019, 07:17 AM. Reason: Changed calculate question for NT7.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi PaulH,

      If I leave the script running the text is not updated even if the chart has the focus.

      The code is running with Calculate = Calculate.OnEachTick;

      Comment


        #4
        Hello Apeppo,

        Thanks for your reply.

        Can you post a working example that demonstrates the behavior you are reporting?

        If you would prefer to not to post the code, you are always welcome to write into PlatformSupport[at] NinjaTrader[dot]Com with your code example. In the e-mail please add "Atten Paul" in the subject line and a link to this thread in the body of the e-mail for reference.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi PaulH,

          sorry for the late answer but I finally found a mistake. There was a timing issue in my code.

          Thank you for your support.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, Yesterday, 10:57 PM
          0 responses
          6 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          158 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Yesterday, 09:29 PM
          0 responses
          7 views
          0 likes
          Last Post Belfortbucks  
          Started by zstheorist, Yesterday, 07:52 PM
          0 responses
          7 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          151 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Working...
          X