Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting high and low of first n bars of session

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

    Getting high and low of first n bars of session

    Hello

    I am trying to get the high and the low of first n bars of session. Code is attached. I have run with different number of bars and every time first bar of session is excluded. How can I fix it?

    Thans in advance
    Attached Files

    #2
    Hello Impeesa,

    I took a look at the code you used and I am not completely clear on what you are seeing. Are you saying that the logic is executed on every bar except the first bar of the session? If you are otherwise trying to include more data, for example 1 more bar to include a farther back range you could add 1 to Bars.BarsSinceNewTradingDay. Bars.BarsSinceNewTradingDay + 1.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

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