• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How convert DataSeries to MultiTimeframe

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

    How convert DataSeries to MultiTimeframe

    Code:
    private MAX testVariable;
    testVariable = MAX(Volume[0], 5);
    and This DataSeries Variable:

    Code:
    private DataSeries testData;
    
    testData = new DataSeries(this);

    How would you convert this "testVariable" and testData to use in multiTrame Object?
    Last edited by ginx10k; 03-05-2015, 07:30 PM.

    #2
    ginx10k, you can use Volumes here - http://www.ninjatrader.com/support/h...t7/volumes.htm

    A dataseries object could be synched to an additional series as well by following this approach - http://www.ninjatrader.com/support/f...ead.php?t=3572
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Once I make the variable testVariable.
      I tried to use the Volumes. it didn't work. Is there another way to put this into the code so that it compiles properly?


      Code:
      private MAX testVariable;
      testVariable = MAX(Volumes, 5)[1][0];
      actually I'm trying this specifically

      Code:
      volumeTest = SMA(Volume, 5);
      
      //I want to use  
      volumeTest = SMA(Volumes,5)[1][0]
      How do I make this happen?
      Last edited by ginx10k; 03-06-2015, 11:05 AM.

      Comment


        #4
        Hello,

        Are you trying to get the price value of the SMA of the second series of Volume for the last 5 bars?

        If so you could do it like the following:

        Code:
        double volumeTest = SMA(Volumes[1], 5)[0];
        The Volumes needs a index location to determine which data series you are trying to use, in this case the second series would be index 1.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pparmley, Today, 04:30 PM
        0 responses
        4 views
        0 likes
        Last Post pparmley  
        Started by tonynt, Today, 04:21 PM
        0 responses
        4 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by williamzz, Today, 03:44 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Miguel_88, Yesterday, 06:41 PM
        2 responses
        26 views
        0 likes
        Last Post Miguel_88  
        Started by williamzz, Today, 02:12 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jim  
        Working...
        X