Announcement

Collapse
No announcement yet.

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    94 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    81 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    75 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Working...
    X