Can a 'expert' TOS thinkscripter help me write some code to create a study? I am trying to write code for a Stochastic indicator (%K) for when it gets over 80, or below 20 where it turns the background a dark gray- I have started this, but cant seen to get it to work properly:
plot Data = close and StochasticSlow("k period" = 5, "d period" = 3)."SlowK" is greater than or equal to 80 and StochasticSlow("k period" = 5, "d period" = 3)."SlowK" is less than or equal to 20;
assignbackgroundColor(if "SlowK" is less than or equal to 20"SlowK" is less than or equal to 80 then color.gray else if close < lowerband then color.gray else color.current);
I'd love some suggestions !!!
Thank you in advance.