Different color background for pit session

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #108492 quote
    zaghloulzaghloul
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    zaghloulzaghloul
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 zaghloulzaghloul
7 years, 1 month ago.

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