Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Aviram Y, Today, 05:29 AM
      0 responses
      2 views
      0 likes
      Last Post Aviram Y  
      Started by quantismo, 04-17-2024, 05:13 PM
      3 responses
      25 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by ScottWalsh, 04-16-2024, 04:29 PM
      7 responses
      34 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cls71, Today, 04:45 AM
      0 responses
      6 views
      0 likes
      Last Post cls71
      by cls71
       
      Started by mjairg, 07-20-2023, 11:57 PM
      3 responses
      217 views
      1 like
      Last Post PaulMohn  
      Working...
      X