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

Multi timeframe question

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

    Multi timeframe question

    Hello,

    when adding a new bars series to a strategy and defining the bar period (for example 30 minutes), the bars in the series are generated at the xx0000 times and xx3000 (e.g. 120000, 123000, 130000, 133000 etc ...).

    I would like to know if it there is a way to add a bars series where the bars time stamps are offseted by a userd efined offset for example a 5 minute offset. Reproducing the example above, the bars would be generated with time stamps at 120500, 123500, 130500, 133500 etc ...

    Thanks in advance for your help. Regards

    #2
    Unfortunately this is not supported. However, I would not see the value of this requirement since you always could add e.g. 5 mins to bar timestamp like:
    Code:
    DateTime newTimeStamp = Time[0].AddMinutes(5);

    Comment


      #3
      Hello,

      Thanks for the answer,

      the value of having that is that the OHLCV would be calculated based on a different time start and end period. It is not the same executing a strategy starting at 1300 with 30 mins bars than the same strategy starting at 1310 with 30 mins bars. The first bar for the first strategy (current NT implementation) would use the OHLCV from 12:30 to 12:59:59 and the second strategy would use the OHLCV from 12.40 to 13:09:59. All the indicators woul throw result in different values and consequently different trade decisions. This is the reason why I was asking if it is possible to build a bars object (OHLCV) with an arbitrary offset.

      regards

      Comment


        #4
        Thanks for clarification.

        Comment


          #5
          Is this something that could be supported in future NT releases? Is this a feature that is already in the roadmap?

          Thx

          Comment


            #6
            I'll add this to the list of future considerations. Unfortunately there is no ETA yet.

            Comment


              #7
              Originally posted by oclop View Post
              Hello,

              Thanks for the answer,

              the value of having that is that the OHLCV would be calculated based on a different time start and end period. It is not the same executing a strategy starting at 1300 with 30 mins bars than the same strategy starting at 1310 with 30 mins bars. The first bar for the first strategy (current NT implementation) would use the OHLCV from 12:30 to 12:59:59 and the second strategy would use the OHLCV from 12.40 to 13:09:59. All the indicators woul throw result in different values and consequently different trade decisions. This is the reason why I was asking if it is possible to build a bars object (OHLCV) with an arbitrary offset.

              regards

              Why dont you delay your windows clock the offset you want?

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by benmarkal, Yesterday, 12:52 PM
              3 responses
              22 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by helpwanted, Today, 03:06 AM
              1 response
              17 views
              0 likes
              Last Post sarafuenonly123  
              Started by Brevo, Today, 01:45 AM
              0 responses
              11 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              6 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              244 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Working...
              X