Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator with single plot. Is additional DataSeries necessary?

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

    Indicator with single plot. Is additional DataSeries necessary?

    I'm creating an indicator that plots a single (changing) line. I used the wizard to create the skeleton of the indicator. The wizard added a Plot0 DataSeries property. However since I want my indicator to display a single plot and there is already the built-in Value object, I'm wondering if this Plot0 DataSeries is necessary.

    Is the Plot0 really for having two plots?

    I found in OnBarUpdate() whether I do Plot0.Set() or Value.Set() the outcome is the same (unless I'm doing something wrong). So for indicators with a single plot, what is the best practice, use the built-in Value object or use the additional DataSeries property?

    #2
    Originally posted by overflowing View Post
    I'm creating an indicator that plots a single (changing) line. I used the wizard to create the skeleton of the indicator. The wizard added a Plot0 DataSeries property. However since I want my indicator to display a single plot and there is already the built-in Value object, I'm wondering if this Plot0 DataSeries is necessary.

    Is the Plot0 really for having two plots?

    I found in OnBarUpdate() whether I do Plot0.Set() or Value.Set() the outcome is the same (unless I'm doing something wrong). So for indicators with a single plot, what is the best practice, use the built-in Value object or use the additional DataSeries property?
    More a matter of preference. I prefer to always use a named Plot. I never know when I might choose to call it from another indicator. At that time, having a name makes my code easier for me to read when I come back to it later, and have forgotten what the heck I was doing at the time that I wrote the code.

    Comment


      #3
      Oh that's cool I was wondering how you refer to a user developed indicator from another indicator. So what you're saying is when referencing your custom indicator from another indicator you prefer: MyIndicator.MySpecificPlot[] rather than MyIndicator.Value[]

      Actually with this new information I think I prefer the Value[] option because it seems like it's more consistent with the built-in indicators (at least SMA().Value[]. But then I guess it depends, because some indicators like Bollinger do go for the named properties (out of necessity) (e.g. Upper, Middle, Lower)

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 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
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X