Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The Basics

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

    The Basics

    Hi guys,

    I know C# and I have read the NinjaScript help file about the basic concepts: DataSeries, Bars, Value, Values[] and so on.

    I still find it difficult to see the whole picture and the aforementioned terms are yet unclear to me. What should I do to get a better understanding about those concepts and how they work?

    Thanks.

    #2
    Originally posted by savekad View Post
    Hi guys,

    I know C# and I have read the NinjaScript help file about the basic concepts: DataSeries, Bars, Value, Values[] and so on.

    I still find it difficult to see the whole picture and the aforementioned terms are yet unclear to me. What should I do to get a better understanding about those concepts and how they work?

    Thanks.
    Work through the tutorials in the NT Help.

    Comment


      #3
      I did. It just seems that every reference in the NT help to the classes mentioned is not elaborating enough.

      Comment


        #4
        Originally posted by savekad View Post
        I did. It just seems that every reference in the NT help to the classes mentioned is not elaborating enough.
        Then I am not sure quite what you are asking. Maybe you can ask some more specific questions?

        Comment


          #5
          Sure. Let's take the DataSeries Class definition for example:

          A DataSeries is a special type of data structure that holds a series of double values (1) and always contains the same number of elements (2) as bars in a chart. If you have 200 bars loaded in your chart with a moving average plotted, the moving average itself holds a DataSeries object with 200 historical values of data, one for each bar. DataSeries objects can be used as input data for all indicator methods. The DataSeries class implements the IDataSeries interface.

          1. Does it mean that every DS object holds a structure of double values? if so, what are they? OHLCV?
          2. What exactly that means? Are there as many DS objects as bars on chart or is there only one DS object that holds all the double values of all bars on chart?

          Comment


            #6
            savekad,

            1. Does it mean that every DS object holds a structure of double values? if so, what are they? OHLCV?

            A data series is like an array with some more functionality. It holds a single double value per index.

            2. What exactly that means? Are there as many DS objects as bars on chart or is there only one DS object that holds all the double values of all bars on chart?

            Each plot is a data series, but you can add additional dataseries internally in your method. There are some data series that are preset and inherited by your indicator class, such as High, Low, Close, Open, etc. and these allow you to access chart data.

            I would suggest checking out our reference samples to see how different things are used.

            Adam P.NinjaTrader Customer Service

            Comment


              #7
              If I got it right, then:

              - A DS object is a dynamic array or a collection that holds as many double values as bars loaded on chart

              - The collection grows as new bars being created

              - Open, Close, High, Low and Volume are all DS objects

              - Every time the Add() method is being called, it creates a DS object and assigns it the Plot name

              Comment


                #8
                savekad,

                Yes essentially. An index of 0 is always the most current bar. One thing to note is that plots are setup in another section as well, the "Properties" region.

                Another thing to note is the "MaximumBarsLookBack" setting as it can be 256 or infinite. Plots automatically are set to "infinite".
                Adam P.NinjaTrader Customer Service

                Comment


                  #9
                  Great. I'll continue from here.

                  Thank you.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  605 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  351 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  560 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  561 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X