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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    68 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    150 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X