Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetBarofSession

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

    GetBarofSession

    I am trying to get an indicator to only work if the current bar count of the session is 5 or less.

    if
    (Bars.GetSessionBar <= 5)
    {

    if (Close[1] >= Open[1] )
    {
    do something
    }
    }

    Where am I going wrong? NT7 does not like the "<="

    thanks

    #2
    Hello Velocity,

    I believe you're after Bars.BarsSinceSession instead.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    131 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    106 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    87 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    107 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    87 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X