The following code is an example of how I set up some of my custom watchlist columns. It displays "1.0" when the condition is met and highlights in the color I want. When the condition is not met, it displays "NaN". Is there a way to have the result display nothing (blank) instead of "NaN"? Again, the main function of the following code is irrelevant. I am only concerned with how it is displayed and simply want to be able to apply a workaround or fix to my other codes. Thanks.
Code:
plot value = if StochasticSlow()."SlowK" is greater than StochasticSlow()."SlowK" from 1 bars ago and
StochasticSlow()."SlowK" from 1 bars ago is greater than StochasticSlow()."SlowK" from 2 bars ago
then
StochasticSlow()."SlowK" is greater than StochasticSlow()."SlowK" from 1 bars ago and
StochasticSlow()."SlowK" from 1 bars ago is greater than StochasticSlow()."SlowK" from 2 bars ago else double.naN;
assignbackgroundcolor(if value is true then color.green else color.black);
Last edited: