Announcement

Collapse
No announcement yet.

Finding A Bar Index By Time

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

  • Finding A Bar Index By Time

    I have a 24-hour template. If I start a script during the day, I'd like it to look at the open for the bar which started at 9:30am. I was just going to use open(ndxValue) and set ndxValue to the bar index for the 9:30am bar. I'm having a little trouble trying to set that index value.

    I can't seem to find anything by searching. Can someone point me to some help?

    Thanks.

  • #2
    Re: Finding A Bar Index By Time

    AssetHound
    Create a condition that evaluates when the time of a bar is equal to the one you want and assign the Open of that bar to a global variable
    Alex


    Originally posted by AssetHound
    I have a 24-hour template. If I start a script during the day, I'd like it to look at the open for the bar which started at 9:30am. I was just going to use open(ndxValue) and set ndxValue to the bar index for the 9:30am bar. I'm having a little trouble trying to set that index value.

    I can't seem to find anything by searching. Can someone point me to some help?

    Thanks.

    Comment

    Working...
    X