Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Timeframes?

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

    Multiple Timeframes?

    Hello

    Lets say I have a strategy whose base timeframe is 5 minutes and then I use AddDataSeries to add a 30 minute bar to use for tracking trend direction.

    It is my understanding that on the instances where the 5 and 30 minute bars end at the same time the, the 5 minute bar will be processed first in OnBarUpdate. In this scenario I would like to be able to have the updated values from the 30 minute time frame when evaluating whether or not to make a trade in the 5 minute timeframe, but it doesn't seem like this is possible. Is there a way to get around this?

    I also want to use SetStopLoss when I submit an order and the documentation states that it needs to be called on the base bar object, so I can see running into the same issue as above.

    #2
    Hello calebsandfort,

    Thanks for your post.

    With live or playback with market replay data, you can use a strategy setting of Calculate.OnEeachTick or Calculate.OnPriceChange and either of these will allow you to access the value of the currently forming 30 minute bar. Please see the help guide here for a detailed view: https://ninjatrader.com/support/help...taIsReferenced

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X