Conditional statement for differences between two lines?


New member
Could someone tell me how to script :
I am trying to say that when the difference between two lines is less than 1, then change the colors of the two lines to yellow.

Signal line is blue
Main line is red
length = 20

If Signal line is within 1 bar of Main line
then change the color of both Signal and Main lines to line yellow
Last edited by a moderator:


New member
Thank you for your help. To assign a color I put:

if spread < 1 then assignvaluecolor.magenta
else if spread > 1 then

The color assignments did not work. What should I have put?

Similar threads