Change backgroundcolour of previous candles

Forums ProRealTime English forum ProBuilder support Change backgroundcolour of previous candles

Viewing 3 posts - 1 through 3 (of 3 total)
  • #202820

    Dear Members of the Forum,

    I want to highlight Morning Star Patterns in my chart by changing the background behind the Morning Star Pattern to green. However, with the BACKGROUNDCOLOUR(r,g,b,<o>) command, I can only highlight the most recent candle’s background of the pattern that satisfies my conditions.
    What I want to do is to highlight also the 2 previous candles that belong to the pattern in the same colour.
    Do you have a solution for this problem.

    My Code so far: (I have attached a screenshort of the result of my code):

    Thank you so much!

    PS: If your solution involves arrays, I would be very thankful if you could provide some sample code, because I am not yet the most comfortable with implementing arrays.

    Greetings,
    Nils

    #202822

    To color the background in the history, a simple trick is to use an infinite rectangle, example:

    https://www.prorealcode.com/topic/couleur-du-background-fond-decran/#post-166531

    use any barindex in the past to locate your background color where it is needed.

    1 user thanked author for this post.
    #202823

    Dear Nicolas,

    Thank you for the workaround!

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login