Different color background for pit session

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #108492 quote
    zaghloul
    Participant
    New

    I’m trying to figure out how I can color the background of my crude oil chart to show a different color during pit session (8am-1:30pm Chicago time).  I can see there are some indicators that color the background based on price value or indicator value, but I can’t find any based on time.

    #108494 quote
    Nicolas
    Keymaster
    Master

    To color the background based on a time conditions, you can do is as follow:

    timec= time>080000 and time<120000
    
    if timec then 
     backgroundcolor(0,168,0,60)
    endif
    
    return

    Useful links about coloring the background of charts:

    https://www.prorealcode.com/topics-tag/backgroundcolor/

    BACKGROUNDCOLOR

    #108504 quote
    zaghloul
    Participant
    New

    @Nicolas It worked like a charm.  You are the man!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Different color background for pit session


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
zaghloul @zaghloul Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by zaghloul
6 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/26/2019
Status: Active
Attachments: No files
Logo Logo
Loading...