Is it possible to make the color change if the line is in an up trend to green and the down trend to red on the Double Smoothed Stochastic. I have pasted the code.
declare lower;
input rLength = 9;
input sLength = 5;
input length = 10;
def divisor = ExpAverage(ExpAverage(Highest(high, length) - Lowest(low, length), sLength), rLength);
plot DSS = if divisor == 0 then 0 else 100 * ExpAverage(ExpAverage(close - Lowest(low , length), sLength), rLength) / divisor;
DSS.SetDefaultColor(GetColor(8));
declare lower;
input rLength = 9;
input sLength = 5;
input length = 10;
def divisor = ExpAverage(ExpAverage(Highest(high, length) - Lowest(low, length), sLength), rLength);
plot DSS = if divisor == 0 then 0 else 100 * ExpAverage(ExpAverage(close - Lowest(low , length), sLength), rLength) / divisor;
DSS.SetDefaultColor(GetColor(8));