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 Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Started by Waxavi, Today, 02:10 AM
        1 response
        21 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Working...
        X