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

Alternative to tick based/bar based strategy calculation? (i.e every minute/X ticks)

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

    Alternative to tick based/bar based strategy calculation? (i.e every minute/X ticks)

    I'm using 15 minute bars for my strategy and I'm wondering how to make it calculate more frequently than every 15 minutes and less frequently than every tick? (Calculate on bar close)

    The obvious downside of per-tick calculation is the CPU power required, and the difference between calculating everytick and every 15 minutes is enormous. Is a compromise possible? I.e. calculate every minute or every x number of ticks?

    #2
    You could try a multi-series strategy where the additional series is e.g. 1 minute based.

    Comment


      #3
      How would this apply to "calculate on close" for indicators rather than strategies?

      Some can be very CPU intensive as you know. The option to calcuate every other tick or every x ticks could make a dramatic difference in system performance while still giving the benefits of per tick calcuation.

      Aside from reprogrogramming every indicator, is there currently a way to do this? If not, is this feature in the planning/implenentation stage (i.e. NT7) or in the 'consideration list' stage?

      Comment


        #4
        Not sure I follow. You could have one series 15 mins and another one on a different (smaller?) time frame. No need to go CalculateOnBarClose=false, which basically has nothing to do with this issue.

        Comment


          #5
          I'm using 15 minute bars but I want the indicators on the chart to update (be calculated) more frequently than once every 15 minutes but less frequently than every tick. Changing the time frame would completely change how the indicators are plotted because the parameters are tied to the time interval.

          Does that make sense?

          Comment


            #6
            Let's make sure we are on the same page:
            - your strategy runs on a 15 mins series
            - you can add another series to this strategy which .e.g. runs 15 secs. You then could use this additional series to trigger your orders

            Comment


              #7
              For the time being I'm referring simply to the indicators themselves independent of any specific strategy. I read your previous response regarding multi-series strategies which is a valid solution for strategies (albeit slightly cumbersome to code every time) but doesn't seem to be applicable in a non-strategy context. I also realize this is the strategy forum, but didn't want to start a second redundant thread on the same issue.

              For example, I'm using the chart trader on 15 minute bars and all indicators are based on a 15 minute time interval. With Calculate on bar close set to true in the indicators parameters it updates once every 15 minutes while the price changes every tick. I would like the refreshing of the indicators to occur more frequently than every 15 minutes.

              Setting calculate on bar close to false will recalculate every tick which can easily bring a powerful computer to a crawl with multiple instruments and indicators.

              If I understand correctly, the solution you suggest is to use multiple charts for the same instrument, one with a shorter time frame to have the indicators recalculated more frequently. The problem is that MACD (13,26,9) on a tick based chart will look completely different than MACD (13,26,9) on a 15 minute chart, which is not what I want.

              Potentially I could use a minute chart and simply multiply the indicator parameters by 15 to approximate the look of the 15 minute indicators, but this solution isn't very eloquent. Updating in tick based intervals in this way also would not be possible because there is no set number of ticks in a time based bar.



              Basically, I think it would be very useful to have a parameter to "Calculate every..." as opposed to only the simple Boolean true or false for "Calculate on bar close". Load a chart with multiple intensive indicators on a fast moving market and the reason for this request should be readily apparent. There can easily be hundreds of ticks in a 15 minute bar and only having the option to update the indicators once every 15 minutes or hundreds of times every 15 minutes is inflexible and I believe there should be some middle ground.

              Comment


                #8
                We have multi series indicators on our list for NT7 yet.

                Comment


                  #9
                  Originally posted by Elliott Wave View Post
                  I'm using 15 minute bars but I want the indicators on the chart to update (be calculated) more frequently than once every 15 minutes but less frequently than every tick. Changing the time frame would completely change how the indicators are plotted because the parameters are tied to the time interval.

                  Does that make sense?
                  You can try this http://www.ninjatrader-support.com/v...ead.php?t=6651

                  Comment


                    #10
                    When working with TradeStation, I had a similar issue and solved it by accessing the system clock (ticks), tracking the system tick count, and then immediately returning from the strategy/indicator if the tick count had not progressed far enough. This works well if the overhead is mostly in executing the strategy/indicator logic. Haven't tried this yet with NT.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by GLFX005, Today, 03:23 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post GLFX005
                    by GLFX005
                     
                    Started by XXtrader, Yesterday, 11:30 PM
                    2 responses
                    11 views
                    0 likes
                    Last Post XXtrader  
                    Started by Waxavi, Today, 02:10 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post Waxavi
                    by Waxavi
                     
                    Started by TradeForge, Today, 02:09 AM
                    0 responses
                    14 views
                    0 likes
                    Last Post TradeForge  
                    Started by Waxavi, Today, 02:00 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post Waxavi
                    by Waxavi
                     
                    Working...
                    X