Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DataSeries

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

    DataSeries

    See the attached ScreenShots.

    This is not possible in Ninja Trader 8. Why..?
    Attached Files

    #2
    DataSeries (now Series<T>) has been completely reworked under the hood. The property you mention was never supported and was not exposed in NT8 as there was not a known use case.

    If you can kindly let us know how/why you were using that we can either provide a workaround, or we can revisit with our development team if this property should be available again in NT8
    MatthewNinjaTrader Product Management

    Comment


      #3
      DataSeries

      I have a different kind of requirement where the condition is evaluated at runtime. For this scenario, I cannot hard code or provide condition while creating my own indicator. For example, the below condition will not be given in Indicator class and is not compiled in advance.

      SMA(14)[0][0] > SMA(21)[0][0] and (CCI(10)[0][0] < CCI(20)[0][0] or Bollinger(2,14)[0][0] > High[0])

      In my application, there is a textbox, where the user can type the above condition. I evaluate this expression at runtime using Reflection. Therefore, SMA, CCI or Bollinger(whatever the user selects) will be stored in DataSeries variable and compared with each other(in NinjaTrader 7).

      For example, it works in a loop. In loop's first iteration, DataSeries variable holds the first condition(SMA(14)[0][0] > SMA(21)[0][0])

      DataSeries ds1; // Holds SMA(14)
      DataSeries ds2; // Holds SMA(21)

      In code, I evaluate expression like below

      if(ds1.Indicator.Values[0][0] > ds2.Indicator.Values[0][0])
      {
      return true;
      }

      Next, in the loop's second iteration, as like the above, CCI will be compared and the third iteration, Bollinger values will be compared.

      Is there an equivalent type for DataSeries in NT8 that could hold the information of Indicator a runtime? How do I also decide the Plot and LookBackPeriod at runtime?

      Comment


        #4
        Thanks for your clarification, however I'm not sure why you would need a data series for this project. If you do not know the indicator type on complication, you can just use a generic Indicator object

        Code:
        Indicator indicator1;
        Indicator indicator2;
        Then after the user inputs the expression, you can assign that indicator to an SMA or CCI, or what have you at that time.

        Code:
        indicator1 = SMA(20);
        indicator2 = CCI(20);
        Then you can get the indicator value using

        Code:
        if(indicator1[0] > indicator2[0])
        {
         return true;
        }
        Please let me know if there is something with this approach that does not work for you.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        10 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        15 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Working...
        X