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

Add(PeriodType.Tick, 1) ;

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

    Add(PeriodType.Tick, 1) ;

    Looking for granularity on entry on say a 5 minute bar and adding the tick component within a 5 minute bar as below -

    Add(PeriodType.Tick, 1) ;

    But how can this be used if you want the difference between the two - something like

    Var MyVal = Close(0) - (PeriodType.Tick,1) ;

    without errors!


    Thanks
    Last edited by alpha_bet; 07-09-2015, 06:53 AM.

    #2
    Hello alpha_bet,

    Thanks for your post and welcome to the forums!

    When adding a dataseries you are creating a multitimeframe strategy and to reference a dataseries requires using an added index. Please review this section of the helpguide as it is critical to understanding how it all works: http://ninjatrader.com/support/helpG...nstruments.htm

    To answer your question:

    Var MyVal = Closes[0][0] - Closes[1][0]; // diff between current 5 minute bar Close and current tick Close.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AttiM, 02-14-2024, 05:20 PM
    11 responses
    184 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by fernandobr, Today, 09:11 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by timmbbo, Today, 08:59 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by KennyK, 05-29-2017, 02:02 AM
    2 responses
    1,281 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by itrader46, Today, 09:04 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X