Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator no more rendered or disapear on tick dataseries

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

    Indicator no more rendered or disapear on tick dataseries

    Hello

    i ve developped an indicator wich render delta with circle for each bar, it is calculated "OnEachTick" and while i have no issue with data series in minutes, i have some issues with data series in tick :
    *First issue : indicator is correctly rendered an suddently when a new candle is built no circle are rendered even on the past bars
    * Second issue : i ve tried to set "Maximum bars look back" to infinite, the past is rendered, some real time bar also and at a certain time, no more circle are rendered, i have to remove and had the indicator in order to render the circles


    Thank you for your help

    #2
    Hello xMCoo,

    It sounds like you may be getting an error, I would suggest checking the control center log tab and NinjaScript output window while the script runs to check for errors. If the rendering disappears at a certain point that would usually be caused by a runtime error, if the indicator encounters an error it stops displaying.

    If you see that the historical rendering stays but no new rendering happens that would be based on your logic, something i the logic stops working right at a certain point. In that case you would need to use prints to find out what part of the logic stopped working to know how to fix it.

    Comment


      #3
      Thanks,

      the only error i see is "Error on calling 'OnBarUpdate' method on bar 816: Index was outside the bounds of the array", i have added a check "CurrentBar<mySerie.Lengh"

      Comment


        #4
        Hello xMCoo,

        Yes that would be a reason it would stop rendering. CurrentBar less than the series length should prevent the logic from working all together, the series length will match the bars on the chart, you should have a slot for each bar. You generally need to use CurrentBar < the total amount of BarsAgo that you used in your code.

        Comment


          #5
          So there is no more error, but i reproduced the issue, at some moment of the journey circles stopped to be rendered after 17:12 (CET), fortunately my script output showed me that the OnRender was looping despite the last Candle on the chart was at 17h30 and i saw this :
          16/03/2023 17:11:25//-100
          16/03/2023 17:12:06//-110
          16/03/2023 17:12:34//-200
          16/03/2023 17:12:36//-193
          16/03/2023 17:12:39//104
          16/03/2023 17:11:25//-100
          16/03/2023 17:12:06//-110
          16/03/2023 17:12:34//-200
          16/03/2023 17:12:36//-193
          16/03/2023 17:12:39//104
          16/03/2023 17:11:25//-100
          16/03/2023 17:12:06//-110
          16/03/2023 17:12:34//-200
          16/03/2023 17:12:36//-193
          16/03/2023 17:12:39//104
          16/03/2023 17:11:25//-100
          16/03/2023 17:12:06//-110
          16/03/2023 17:12:34//-200
          16/03/2023 17:12:36//-193
          16/03/2023 17:12:39//104​
          ....

          so a loop unti candle at 17:12:39

          The loop in OnRender is standard :
          for(int i= ChartBars.FromIndex;i<=ChartBars.ToIndex;i++) {
          Print(Bars.GetTime(i)+"//"+mysSerie.GetValueAt(i));
          //Some specific code

          }

          So i don't know what to think about it ...



          Comment


            #6
            Hello xMCoo,

            Unfortunately this output really doesn't mean anything to me, I don't know what code you are using for rendering that is not working. The Print you provided is just showing the currently visible bars data.

            ChartBars.FromIndex is the left most bar on the chart which is currently visible. ChartBars.ToIndex is the rightmost bar that is visible. The loop is going over that set of bars. The Print is printing the bar times and your series values.

            Comment


              #7
              Yep, but is this loop normal, i mean it loops for ever and ever on these 5 first candle every second, despite there are 50 candle displayed, it loops on the first five endeless. If i remove and put again the indicator i have no more issue for several hours

              Comment


                #8
                Hello xMCoo,

                The loop you have shown loops over the visible bars so it will often loop over the same bars. OnRender is called very frequently and for efficiency you should only loop over the currently visible data set. That does not provide any insight on what may have been wrong in your logic which is causing it to not render, only that you are looping over the currently visible bars. The loop will only change when a new bar is generated or if you manually move the chart around.

                The error you had observed was from OnBarUpdate so you likely don't need to look at the OnRender logic. You would need to make sure the OnBarUpdate logic is correct.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                578 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                334 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                553 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X