Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot starts from the last visible bar

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

    Plot starts from the last visible bar

    Why my plot (red) starts from the center of the last visible bar? For comparison white plot is something 3rd party. Thanks


    Click image for larger version

Name:	image.png
Views:	42
Size:	15.2 KB
ID:	1324935

    #2
    Hello Marty125,

    That may be due to how the custom item is plotting, are you using AddPlot for your plot?

    Comment


      #3
      Hi Jesse, thanks for the quick response.

      Yes, I use AddPlot().

      Comment


        #4
        Hello Marty125,

        Thanks for confirming that.

        The custom item is likely using OnRender to draw that instead of AddPlot, when using Onrender you can use custom X locations which could be the left of the bar or center or right.

        Comment


          #5
          I thought, when you said OnRender, that they use RenderTarget.DrawLine().​ But when I click on theirs, it shows same bubles as my Plot (red). Or is there any way to plot Plot in OnRender?

          Click image for larger version

Name:	image.png
Views:	54
Size:	15.6 KB
ID:	1324944

          Comment


            #6
            Hello Marty125,

            The selection bubbles still appear if they added a plot, they can choose to hide the plot by using OnRender and still draw a custom line.

            Comment


              #7
              So if I understand correctly, there is AddPlot(), on every bar there is Value[0] = value, and Color of the plot is transparent (or they didnt put base.OnRender(chartControl, chartScale) in OnRender - I dont know what exactly it does with plot) and then rendered the line as i said line by line with values from the Plot series?

              Comment


                #8
                Hello Marty125,

                Yes that is an accurate understanding.

                You can use ShowTransparentPlotsInDataBox to toggle if the plot is used in the databox or not when using a transparent color and you can also not use base.OnRender() to prevent the rendering of plots. OnRender can then be used to render a line in whatever way you wanted. The original plot can be used to gather values from in OnRender so it is still useful for a series to store values.

                Comment


                  #9
                  Awesome, thank you Jesse.

                  Comment

                  Latest Posts

                  Collapse

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