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

List of subset of input series

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

    List of subset of input series

    Hi everyone

    Let's say I start with a chart with, say, 1,000 data points.

    Next, I'd like to make a subset of these points. Let's say, for simplicity, these are the points on the chart which are greater/less than the three either side. Let's say there are 100 of these points.

    Is it possible for NT7 to make a list of these 100 points so that, say, a moving average can be applied to them?

    Also, would it be possible to make a chart of this subset? (I guess this part would be more difficult.)

    Many thanks in advance.

    #2
    Originally posted by arbuthnot View Post
    Hi everyone

    Let's say I start with a chart with, say, 1,000 data points.

    Next, I'd like to make a subset of these points. Let's say, for simplicity, these are the points on the chart which are greater/less than the three either side. Let's say there are 100 of these points.

    Is it possible for NT7 to make a list of these 100 points so that, say, a moving average can be applied to them?

    ...
    Put them in a Generic List, and go from there. It is just another collection of doubles.

    Comment


      #3
      Hi arbuthnot,

      As koganam said, use an array, list, (or some other array like structure), or use a dataseries if you want one value for each bar.

      array - http://www.dotnetperls.com/array

      dataseries - http://ninjatrader.com/support/helpG...ries_class.htm
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thanks koganam and Chelsea.

        I've never incorporated the list method into any of my indicators, but I guess this is the time to start.

        If I get totally stuck at some point, I may post back here but I'll try my best on my own.

        Chelsea - that dotnetperls site looks very helpful.

        Cheers.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Christopher Leggit, 02-15-2024, 09:00 AM
        3 responses
        45 views
        0 likes
        Last Post rdtdale
        by rdtdale
         
        Started by DavidHP, Today, 07:56 AM
        0 responses
        2 views
        0 likes
        Last Post DavidHP
        by DavidHP
         
        Started by Aviram Y, 08-09-2023, 09:04 AM
        10 responses
        298 views
        0 likes
        Last Post MrHump
        by MrHump
         
        Started by jpapa, Today, 07:22 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by kevinenergy, 02-17-2023, 12:42 PM
        116 responses
        2,758 views
        1 like
        Last Post kevinenergy  
        Working...
        X