Hi, just started on ProBuilder.
I am creating a notional new indicator as follows: –
if IntradayBarIndex > 109 AND IntradayBarIndex < (16 * 12) + 3 THEN
atrupper = High + 2
ELSE
atrupper = Undefined
ENDIF
and would like to switch the indicator off on the charts overnight. I had thought the keyword ‘UnDefined’ would do this, but it does not appear to work; it simply holds the indicator constant without stopping it from displaying.
Any help greatly appreciated
Once a variable has been defined it is not possible to return it to undefined status.
You could try changing the contrast to zero in the COLOURED instruction.
once atrupper = Undefined
if IntradayBarIndex > 109 AND IntradayBarIndex < (16 * 12) + 3 THEN
atrupper = High + 2
c = 255
ELSE
c = 0
ENDIF
return atrupper coloured(128,0,0,c)
Many thanks for quick response; works perfectly
Regards