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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X