Same high/low as previous candle

Forums ProRealTime English forum ProBuilder support Same high/low as previous candle

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

    Hello, I do not know how to code at all and I have tried around a little. I think it’s a relativly easy indicator to write, but I can’t figure out how.

    What I want is the indicator to do is:

    if 2 candles that are next to eachother have the same high, change the candle colour of the second/or both candles  to R67 G140 B166

    and if 2 candles that are next to eachother have the same low, change the candle colour of the second/ or both candles R124 G55 B203

     

    I have made it work on tradingview with this code if that helps in any way.

    barcolor((high == high[1] ) ? color.navy : na)
    barcolor((low == low[1] ) ? color.black: na)
    plot (close)

    #180034

    Hello, and welcome on PRC forums,

    you need to use the drawcandle command, as code is progressing through loaded history you can color your second candle at each occurence this way:

    You then need to validate this code first as a created indicator below the price window.

    Once this is done, the indicator becomes available in your list of available custom indicators that can be added to price, and this can be done this way:

    https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-indicator-on-price-prorealtime/

    1 user thanked author for this post.
    #180038

    Thanks you so much, this is exactly what I wanted!

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