Backgroundcolor between period

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #91948 quote
    Yves
    Participant
    Junior

    Hi all! I need your help. I tryed to build an indicator that draws a background color between two Dates. The problem is that i want the indicator to draw the backgroundcolor every year so i don’t want the year as a input parameter. Example: “Draw Backgroundcolor RED  Between 1.5. Until 15.10.” Thanks for help.

    #91955 quote
    robertogozzi
    Moderator
    Master
    #91956 quote
    Yves
    Participant
    Junior
    to use baclgroundcolor is not the problem. my problem is that its not working with day and month parameters.
    #91959 quote
    robertogozzi
    Moderator
    Master
    Since your refers to times 01:50 and 15:10 you need to use it ON TF’s <= 10 minutes. You can use it on any TF that CLOSES on that time. For Daily or greater TF’s you cannot refer times at all, since ProBuilder does not support Multiple Time Frames.
    #91961 quote
    Yves
    Participant
    Junior
    sorry perhaps i wrongly expressed. if we have the 1st of may then i want the backgroundcolor until 15th of october. I need that on daily TFs and i want it to work every year in the past and the future
    // Backgroundcolor between 10.5 - 12.12.
    
    Date1ADay = 10
    Date1AMonth=5
    
    
    
    If openday>Date1ADay and openmonth>Date1AMonth then
    BACKGROUNDCOLOR(255,0,0)
    endif
    
    return
    #91992 quote
    robertogozzi
    Moderator
    Master
    I did not test it:
    // Backgroundcolor between 10.5 - 12.12.
    ChangeBackground = (Day >= 5 AND Month = 5) OR (Day <= 12 AND Month = 12) OR (Month >= 6 AND Month <= 11)
    If ChangeBackground then
       BACKGROUNDCOLOR(255,0,0)
    endif
    return
    Yves thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Backgroundcolor between period


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Yves @yves_emm Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by robertogozzi
6 years, 11 months ago.

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