Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Line First Bar of Session

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

    Draw.Line First Bar of Session

    Hello,

    I am trying to Draw.Line to start from the first bar of the session and to end at last bar of session... How do I get the int values of first and last bar in session?

    Thanks

    #2
    Hello KINGKODA,

    Thanks for your post.

    You could get the bar index by checking the CurrentBar value for bars that are IsFirstBarOfSession or IsLastBarOfSession, or you could use a SessionIterator and ChartBars.GetBarIdxByTime to get the time of a session start/end and convert it to a bar index. Keep in mind that bar indexes will need to be converted to a barsAgo reference (CurrentBar - barIndex.)

    I've included publicly available documentation items on these items below.

    Please let us know if you have any additional questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    637 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X