Reorder values for plots

Viewed 16

I'm writing a code where the script finds some level of interest but due to the nature of the script, on the next candle, it might recalculate the same levels but assigning them to new plots creating unnecessary diagonal lines along the chart or blank spaces if I make the line transparent when the plots change value.

eg.

A[1] = 3
B[1] = 2
C[1] = 4
D[1] = 1

A = 2
B = 5
C = 3
D = 1

Is there a function or other way to keep a value to the same plot if the value was present also in the last calculation?

0 Answers
Related