Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Daily bars loading within indicators called by modules on minute bars

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

    #16
    IsValidPlot & ContainsValue

    Hello Brett,

    Currently ContainsValue() has only been implemented for when the user specifies a particular implementation of iDataSeries (for example SMA(4).Value which is DataSeries).
    But if the user is writing a generic indicator the idataseries has no specified name or type (only refered to as Input).
    When working with Input ContainsValue() is not available, but IsValidPlot is.
    So if IsValidPlot is not going to be officially supported, can NT implement ContainsValue() on Input?

    I am assuming that ContainsValue is just the specific implementation of IsValidPlot in each implementation of iDataSeries, so this should not be difficult.

    Comment


      #17
      Dave, correct ContainsValue is documented and supported in the specific DataSeries context.

      Thanks for your suggestions though.

      Comment


        #18
        Hello,

        DataSeries does have the ability to use .ContainsValue()



        If this is not what your looking for can you please further clarify with possibly an example not sure I understand what your referencing here or trying to do.

        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment


          #19
          ContainsValue on Input

          Hello Brett,
          Re
          DataSeries does have the ability to use .ContainsValue()
          This is not currently true if the DataSeries is obtained from Input.
          Example code:
          if (Input.ContainsValue(0)) return; //generates error "NinjaTrader.Data.IDataSeries does not contain a definition for ContainsValue"
          if (Input.IsValidPlot(0)) return; //this works but is "unsupported"
          I think that Bertrand has understood that implementing ContainsValue on Input would make NT more consistent.

          P.S. I just noticed that although
          Input.IsValidPlot(0)
          compiles, it always returns false. In other words there does not seem to be a way of finding whether the source indicator Set a value or used Reset, when this output is used for Input to another (generic) indicator.
          I thought my original question could be answered by a short reply from Josh. But since it turns out to be more complicated than first thought, I will open a new thread.
          Last edited by DaveE; 11-14-2010, 04:37 AM.

          Comment


            #20
            Dave, we looked into and the difference is unfortunately expected, for Input (IDataSeries) you would only see the IsValidPlot offered, which is usable but not supported.

            For all regular DataSeries, such as for example the Plots, Value or custom ones the ContainsValue can be used and would be supported (you can use IsValidPlot here of course, too as DataSeries are a special case of the IDataSeries).
            Last edited by NinjaTrader_Bertrand; 11-15-2010, 12:15 PM.

            Comment

            Latest Posts

            Collapse

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