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 RideMe, 04-07-2024, 04:54 PM
          5 responses
          28 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by f.saeidi, Today, 08:13 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by DavidHP, Today, 07:56 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by kujista, Today, 06:23 AM
          3 responses
          9 views
          0 likes
          Last Post kujista
          by kujista
           
          Started by Mindset, Yesterday, 02:04 AM
          2 responses
          18 views
          0 likes
          Last Post NinjaTrader_RyanS  
          Working...
          X