Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Redraw

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

    Chart Redraw

    Hello,

    It appears the chart redraws just when there is a new tick....yes?

    I have an indicator that wants to DrawTextFixed on the chart every 1 second (under certain conditions).

    Is there any way to do this?

    Thanks

    #2
    Hello Turtle Trader,

    If you script is running on a 1 tick chart, or there is a 1 tick secondary series added to the script, or if the script is running with 'Calculate on bar close' set to false, then the script will update on each tick.

    To have a script update once per second, you would need to use a 1 second chart, add a 1 second secondary series, or use C# winform timer (with NinjaTrader 7).
    https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      reply

      Hi Chelsea,

      Yes, I have the indicator that executes DrawTextFixed every second with a winform timer as you indicate.

      The problem is this timer goes off every second, but on a slow chart, the ticks are slower, and then the DrawTextFixed (on the panel) is in synch with the ticks and not the (second) timer.

      (The DrawTextFixed is being executed every second, but it is only current on the chart panel when a new tick comes in...)

      Is there any way to have the DrawTextFixed update the panel immediately when it is executed? That is, every second?

      Thanks

      Comment


        #4
        Hello Turtle Trader,

        Ah, the Plot method is not being triggered until a tick comes in.

        To force the refresh in NT7 use ChartControl.Refresh();.
        Last edited by NinjaTrader_ChelseaB; 07-12-2016, 09:05 AM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          perfect

          works well...thank you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by judysamnt7, 03-13-2023, 09:11 AM
          4 responses
          59 views
          0 likes
          Last Post DynamicTest  
          Started by ScottWalsh, Today, 06:52 PM
          4 responses
          36 views
          0 likes
          Last Post ScottWalsh  
          Started by olisav57, Today, 07:39 PM
          0 responses
          7 views
          0 likes
          Last Post olisav57  
          Started by trilliantrader, Today, 03:01 PM
          2 responses
          21 views
          0 likes
          Last Post helpwanted  
          Started by cre8able, Today, 07:24 PM
          0 responses
          10 views
          0 likes
          Last Post cre8able  
          Working...
          X