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

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 - https://www.ninjatrader.com/support/...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 fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        7 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X