Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dataseries not plotting problem (solved)

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

    Dataseries not plotting problem (solved)

    This isn't a question, just logging for posterity something I learned. Maybe it will help someone in a future google search. I developed an indicator which has some additional dataseries which I would put values in on a certain bars.

    This plotted fine and I continued work on my indicator. After a time I noticed that it was no longer drawing the dataseries dots as it had before although it was still drawing custom labels I drew via DrawText. I couldn't figure out what I had changed (if anything) to cause them to not draw. It was mysterious and driving me crazy.

    Finally I realized that I had overridden the Plot method and I did not call the base.Plot. Adding the call to the base class's Plot method immediately fixed it.

    public override void Plot(Graphics graphics,
    Rectangle bounds, double min, double max)
    {
    // I had forgot the following line!!
    base.Plot(graphics, bounds, min, max);
    ...
    // your code

    #2
    Originally posted by overflowing View Post
    This isn't a question, just logging for posterity something I learned. Maybe it will help someone in a future google search. I developed an indicator which has some additional dataseries which I would put values in on a certain bars.

    This plotted fine and I continued work on my indicator. After a time I noticed that it was no longer drawing the dataseries dots as it had before although it was still drawing custom labels I drew via DrawText. I couldn't figure out what I had changed (if anything) to cause them to not draw. It was mysterious and driving me crazy.

    Finally I realized that I had overridden the Plot method and I did not call the base.Plot. Adding the call to the base class's Plot method immediately fixed it.
    Interesting... can you post a sample image of what it was before and after?

    Of course, remove any logic related to your secrets..

    Comment


      #3
      Sure this is before, without the call to base.Plot():

      Click image for larger version

Name:	indicator-without-base-plot.jpg
Views:	1
Size:	3.2 KB
ID:	869095

      And this is the indicator after adding the call to base.Plot() (the dot is the dataseries with the plot style set to Dot):

      Click image for larger version

Name:	indicator-with-base-plot.jpg
Views:	1
Size:	3.3 KB
ID:	869096

      Comment

      Latest Posts

      Collapse

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