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

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 Waxavi, Today, 02:10 AM
                  1 response
                  17 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by Kaledus, Today, 01:29 PM
                  5 responses
                  13 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by Waxavi, Today, 02:00 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  23 views
                  0 likes
                  Last Post alifarahani  
                  Started by gentlebenthebear, Today, 01:30 AM
                  3 responses
                  17 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X