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

encapsulation of multiple timeframes

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

    #16
    similar question

    I'm going to hijack for a moment if folks don't mind:

    I am making a simple voume indicator;

    one data series tracks the voume throughout the day by expected percentage. The values basicaly break up the US equity trading session into 390 one minute bars, each with a % volume expected and store them in a hash table. This can be plotted on a graph so that at 4 PM it reaches 100% of the day's volume. It is not equity specific....it is a proxy for what a given stock "should" do on a ho-hum day.

    Now an example of my question:

    At noon I want to see if MSFT has traded more or less than usual, so I take the noon expected volume % which is, let's say, 50%.

    I multiple it by the 10 day average volume for MSFT. i then subtract MSFT's actual volume traded at noon that day. If the result is positive, MSFT is trading below day average expected. If negative it is trading more than expected.

    The calculation of the 10day SMA of the volume is easy and works fine on its own, but is there a way for me to utilize the variable within my one minute expected volume % indicator? it is a static number which remains unchanged all day, so it can be considered a "constant" in a real world setting, but it does average ten previously recorded "day bars" of volume, so im wondering if this presents a problem.

    Comment


      #17
      alabell, from what I understand you're trying to do here : you should be able to call this higher time-frame value simply in a MultiSeries script - http://www.ninjatrader.com/support/h...nstruments.htm
      BertrandNinjaTrader Customer Service

      Comment


        #18
        i think i am getting a sense of how to do this but i have another (perhaps final) question. The examples provided within the link suggest useful ways to create multiple timeframe bars, all of which are based on one minute data.

        My example asks about creating an indicator that plots a chart of one minute data, but includes a "math" coefficient based the SMA of the last 10 closed day bars. Does this concept add any additional complexity or make what I am attempting less possible?

        Thanks in advance.

        Comment


          #19
          alabell, those examples are for demonstration purposes - the MultiSeries framework is flexible, so daily and minute or weekly / tick could be worked together as well.
          BertrandNinjaTrader Customer Service

          Comment


            #20
            SMA Multiple data series

            I am trying to determine the moving average of the third and fourth data series using the following code:

            Condition21 = Closes[2][0] < SMA(Closes[2][0], 20)[1];
            Condition22 = Closes[3][0] > SMA(Closes[3][0], 20)[1];

            I get the following errors shown in attachment. The first 2 are for the first line, the second 2 are for the second line. Is there an example or answer for using moving averages with multiple data series?
            Attached Files

            Comment


              #21
              The SMA's would expect a series input and not a double, so please try -

              Condition21 = Closes[2][0] < SMA(Closes[2], 20)[1];
              Condition22 = Closes[3][0] > SMA(Closes[3], 20)[1];
              BertrandNinjaTrader Customer Service

              Comment


                #22
                Originally posted by NinjaTrader_Bertrand View Post
                we have this on our product enhancement list for future consideration though to provide an enhanced overload here.
                Would that be ID# 1280. As mentioned here? http://www.ninjatrader.com/support/f...ad.php?t=44247

                Comment


                  #23
                  Originally posted by DaveE View Post
                  Would that be ID# 1280. As mentioned here? http://www.ninjatrader.com/support/f...ad.php?t=44247
                  Correct Dave, thanks.
                  BertrandNinjaTrader 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
                  8 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