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

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.
      BertrandNinjaTrader Customer Service

      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.

        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.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            3 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Working...
            X