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 rocketman7, Today, 02:12 AM
    5 responses
    21 views
    0 likes
    Last Post rocketman7  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    7 responses
    27 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by samish18, 04-17-2024, 08:57 AM
    17 responses
    65 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by briansaul, Today, 05:31 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by PaulMohn, Today, 03:49 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X