Announcement

Collapse
No announcement yet.

Using BARSTATE_NEWBAR

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

  • Using BARSTATE_NEWBAR

    question interpreting this statement:
    if (nState == BARSTATE_NEWBAR)...

    when is the function (BARSTATE_NEWBAR) not true?
    is it while the current new bar is forming? (say 5 mins),
    or immeadiately after the new bar has formed?

    will a function that calls BARSTATE-NEWBAR continue looping until the new bar has formed?

    hope this makes sense.
    thanks for any guidance.
    peter

  • #2
    Re: Using BARSTATE_NEWBAR

    peter
    BARSTATE_NEWBAR is true only on the first tick of each new bar (and obviously on each bar on historical bars)
    Alex


    Originally posted by peterjerome
    question interpreting this statement:
    if (nState == BARSTATE_NEWBAR)...

    when is the function (BARSTATE_NEWBAR) not true?
    is it while the current new bar is forming? (say 5 mins),
    or immeadiately after the new bar has formed?

    will a function that calls BARSTATE-NEWBAR continue looping until the new bar has formed?

    hope this makes sense.
    thanks for any guidance.
    peter

    Comment


    • #3
      now it makes sense.
      thanks alex.

      Comment


      • #4
        peter
        You are welcome
        Alex


        Originally posted by peterjerome
        now it makes sense.
        thanks alex.

        Comment

        Working...
        X