Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Update chart at all series events when only first series is visualized?

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

    Update chart at all series events when only first series is visualized?

    Situation:

    1. Primary series is visualized on chart.
    2. Active indicator contains >1 series, (not visualized in chart).

    In this situation the chart is updated only at events in the first series.

    Question:

    Is there a way to have the chart components updated on ALL series events?


    #2
    Hello FREEN,

    Thank you for the question.

    I believe in this case the simple answer is no, the chart will only relate to the primary that is applied there. What specifically are you trying to update in your described case? Are you drawing from one of the secondary series or what is the overall situation you are describing?
    ​​​​​​

    I look forward to being of further assistance.

    Comment


      #3
      Now, that´s a wonderful answere in all it´s simplicity : )

      What about force update from custom event... like a timer?

      Comment


        #4
        Guess I found the answere here;

        Comment


          #5
          Hello FREEN,

          Correct, that is the general suggestion anytime you need to inform the chart it needs updated. For some custom cases where a faster update may be needed like a button click event you can also add and remove a drawing object as that will cause a render.

          I look, forward to being of further assistance.

          Comment


            #6
            For some custom cases where a faster update may be needed like a button click event you can also add and remove a drawing object as that will cause a render.

            That doesn´t seem to be the case when I do this test:

            Code:
                    protected override void OnBarUpdate()
                    {            
                        // all series events should trigger this draw method, stil the chart is updated only at primary series
                        // does the draw method have to include data from the secondary (etc...) series in order to cause a render?
                        Draw.TextFixed(this, "label", labelText, TextPosition.Center...
                    }
            Last edited by FREEN; 09-09-2019, 01:32 PM.

            Comment


              #7
              Hello FREEN,

              You would also need to remove it right after that line, the removal is what causes the render. It also wouldn't matter from OnBarUpdate, this would be specifically for any out of event driven logic like in a button event handler. OnBarUpdate will be more or less synced with the rendering due to the market data coming in/frequency that it is called.


              I look forward to being of further assistance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              81 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              42 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              64 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              66 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              54 views
              0 likes
              Last Post CarlTrading  
              Working...
              X