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-time frame

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

    Multi-time frame

    I would like to know if i understand the PeriodType and how it works. We will keep it simple in that the additional bars will all be for the same instrument.

    Let's assume that the chart is running a 2-minute time interval. So my primary bars will be of a 2-minute data set. I now want to add a 5 minute bars object so I code:
    Add(PeriodType.Minute, 5);
    Now I add another a 1 minute bars object. So
    Add(PeriodType.Minute, 1);
    Is this legal? Can I add a bars object whose time frame is smaller than the primary bars?
    I am assuming that I could not go to a Tick or Volume because those would be considered smaller than a 1-minute. Correct?

    Let's go in the other direction. My primary bars are Tick. Can I add a 2 minute bars object:
    Add(PeriodType.Minute, 2);
    Or am I limited to adding bars object that are either Tick or Volume?

    Thanks,

    #2
    Let's assume that the chart is running a 2-minute time interval. So my primary bars will be of a 2-minute data set. I now want to add a 5 minute bars object so I code:
    Add(PeriodType.Minute, 5);
    Now I add another a 1 minute bars object. So
    Add(PeriodType.Minute, 1);
    Is this legal? Can I add a bars object whose time frame is smaller than the primary bars?
    I am assuming that I could not go to a Tick or Volume because those would be considered smaller than a 1-minute. Correct?
    Yes this is legal. There are no restrictions on supplementary bar interval type and compression. You can add a 1 tick bar as a secondary series if you want.

    Let's go in the other direction. My primary bars are Tick. Can I add a 2 minute bars object:
    Add(PeriodType.Minute, 2);
    Or am I limited to adding bars object that are either Tick or Volume?
    Absultely. Same answer as above. You have complete flexibility.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, 05-01-2024, 05:22 AM
    6 responses
    42 views
    0 likes
    Last Post ageeholdings  
    Started by tony_28217, Today, 07:04 PM
    0 responses
    11 views
    0 likes
    Last Post tony_28217  
    Started by flybuzz, Today, 10:33 AM
    1 response
    9 views
    0 likes
    Last Post flybuzz
    by flybuzz
     
    Started by spencerp92, 10-10-2023, 09:56 AM
    4 responses
    308 views
    0 likes
    Last Post flybuzz
    by flybuzz
     
    Started by samish18, Yesterday, 10:13 AM
    1 response
    26 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Working...
    X