• 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 user1986, Today, 07:28 PM
        0 responses
        3 views
        0 likes
        Last Post user1986  
        Started by jertrade, Today, 06:57 PM
        0 responses
        5 views
        0 likes
        Last Post jertrade  
        Started by Emma1, Today, 02:42 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_DrewO  
        Started by fx.practic, Today, 03:10 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jertrade, Today, 02:50 PM
        2 responses
        14 views
        0 likes
        Last Post jertrade  
        Working...
        X