Hi
I came across a potential issue when using BACKGROUNDCOLOR in that it doesn’t behave as I believe it should. I wanted to know if this intended behavior or a known issue.
I have included some sample code to show the problem. If VerticalLines (in the code below/attachment) is set as a configurable variable on this indicator, it does not remove the BACKGROUNDCOLOR by toggling it on/off, whereas toggling DRAWARROW does.
Thanks
Rob
DEFPARAM DRAWONLASTBARONLY = False
// VerticalLines is a boolean, true or false toggle option as a variable for the indicator setting
// Arrows is a boolean, true or false toggle option as a variable for the indicator setting
// Donchian
hh = highest[30](High)
ll = lowest[30](Low)
IF VerticalLines = 1 THEN
// Long signal
IF close = hh THEN
BACKGROUNDCOLOR (10,255,10,50)
ENDIF
// Short signal
IF close = ll THEN
BACKGROUNDCOLOR (255,10,10,50)
ENDIF
ENDIF
IF Arrows = 1 THEN
// Long signal
IF close = hh THEN
DRAWARROW(barindex-1,hh) COLOURED (10,255,10,50)
ENDIF
// Short signal
IF close = ll THEN
DRAWARROW(barindex-1,ll) COLOURED (255,10,10,50)
ENDIF
ENDIF
RETURN
You are right, I can replicate the issue, I will report it.
I had confirmation that this bug is no longer present in the current version of PRT.