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 cmoran13, 04-16-2026, 01:02 PM
      0 responses
      51 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      31 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      165 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      100 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      160 views
      2 likes
      Last Post CaptainJack  
      Working...
      X