Announcement

Collapse
No announcement yet.

Coloring Overnight Bars

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

  • Coloring Overnight Bars

    I want the bars that occur overnight to be colored grey. I understand how to use the setPriceBarColor command, but I don't see how identify which bars are the overnight bars. All the commands related to time seem to use the current system time (rather than a time identifier associated with the bar itself).

    What commands can I use to color bars grey if the occur after 1300 and before 0630 for all historical days that may show on my chart?

  • #2
    ronblack
    if((getHour()*100)+getMinute()>=1300 || (getHour()*100)+getMinute() < 630)
    setPriceBarColor(Color.lightgrey)

    Alex

    Comment


    • #3
      Alexis,

      Perfect! Thank you for your help.

      Ron

      Comment

      Working...
      X