Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

line not plotting visibly

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

    line not plotting visibly

    i have a level II indicator that plots orderbook volume as a line. It's plotting, but not visibly. similar to the picture shown in this post https://ninjatrader.com/support/foru...but-is-present

    for the extent of the plot it isnt visible. i tried barsrequiredtoplot, but no luck.

    #2
    Hello sampras010,

    Thank you for the post.

    Are you specifically seeing the same as the other post where the dots of the plot selection still show up or is the plot completely invisible and not selectable?

    One idea would be if you used OnRender but did not call the base method, this would look similar to that other post however the plot is not able to be selected. It will show up in the databox and have a price marker. If that is the case the fix is to call the base:

    Code:
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
        {
            base.OnRender(chartControl, chartScale);
    If that is not it, can you try plotting a non-calculated value such as Close[0] and only on the current bar like the following:

    Code:
    Value[0] = Close[0];
    Are you able to see that?


    I look forward to being of further assistance.

    Comment


      #3
      thanks Jesse, the render code got it a-plottin!

      Comment


        #4
        Hi, I have another question on this matter. When the current bar isnt displayed on the chart, the indicator stops plottting. It plots fine otherwise, and begins plotting again as soon as i position the chart back to the current bar. is there a simple way to fix this?

        Comment


          #5
          Hello sampras010,

          Are you seeing any errors in the log when you do that? If it stops plotting when moving the chart, that sounds similar to an error however you generally wouldn't see it start rendering again after moving back. This could relate to the logic being used.

          Can you provide more detail on what kind of logic is being used? Also you noted that the on render part got it plotting, if the script is using OnRender that may be part of the reason. The logic in OnRender could be looking for specifically the last bar in its logic and is having a problem when you scroll. OnRender is generally used to only render the datapoints from the first visible bar to the last visible bar on the chart. When you move it around those indexes change so that could be affecting some of the logic.


          I look forward to being of further assistance.

          Comment


            #6
            The indicator is eds level II. i found an updated version in the ninjatrader download section. as is, the indicator displays a live rendered histogram of the order book, and not much else, i added a delta plot to the on order update section. just totalbid minus totalask , then i added the render code you suggested to the render section. that all works well enough to use, but like i said the plot stops functioning, this also happens when minimizing the chart, im not an expert on this indicator, so if the only way is to rework a lot of the indicator, i may just stop while i do have an indicator

            Comment


              #7

              Hello sampras010 ,

              Thank you for that detail it helps.

              I took a quick look at the indicator and it looks like this is based on its logic, currently it checks if you are on a realtime bar or not to render:


              // if right-most bar is not a real-time updating bar, then do not display level 2 histogram
              if (ChartControl.LastSlotPainted < Bars.Count - 1)
              I am unsure if commenting this out would affect the indicators logic overall, you could try commenting the check out to see what the result is.

              I look forward to being of further assistance.

              Comment


                #8
                That seems to of done the trick, thanks again.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                650 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                574 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                577 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X