Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Update indicator plot value OnMarketData()

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

    Update indicator plot value OnMarketData()

    Hi. I have an indicator value that is calculated on each OnMarketData() call. The plot is located in the OnBarUpdate() method and only seems to get updated whenever the last price moves in any one direction. This is not the desired result. Is it possible to have the indicator plot update whenever the OnMarketData() method is called? If I put the plot in the OnMarketData() method, only the close[0] dataseries is shown for the indicator value.

    Thanks.

    #2
    Tight Face, have you already tried setting the Indicator OnBarUpdate() to CalculateOnBarClose = false, this would trigger updates to the plotted value on each incoming tick then.

    Comment


      #3
      Yes I always have calculateonbarclose = false. I tried to lower the refresh rate to 0 in the chart properties, but that locked up the program. I set it to 0.01 and that seemed to do a better job at updating every tick.

      Comment


        #4
        You should never really be calling Plot(). Calling it directly can mess things up pretty badly due to race conditions.

        Instead you should call invalidate, which triggers Plot() to be called when it is ok to call. You do so something like the following:

        ChartControl.ChartPanel.Invalidate();

        Comment


          #5
          Sorry, I did not quite read your comments correctly. You are not calling Plot, but trying to set a plot value.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          621 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          359 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          562 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          567 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X