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

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

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CommonWhale, Today, 09:55 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Gerik, Today, 09:40 AM
    2 responses
    7 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by RookieTrader, Today, 09:37 AM
    2 responses
    12 views
    0 likes
    Last Post RookieTrader  
    Started by alifarahani, Today, 09:40 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by KennyK, 05-29-2017, 02:02 AM
    3 responses
    1,285 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X