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)
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:
if high=high[1] then
DRAWCANDLE(open, high, low, close) coloured(67,140,166)
endif
if low=low[1] then
DRAWCANDLE(open, high, low, close) coloured(124,55,203)
endif
return
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/
Thanks you so much, this is exactly what I wanted!